From f9c292eea0318534a220b6734c9185ca03780277 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 22:36:59 +0100 Subject: [PATCH 1/4] nghttp2: remove obsolete aligned allocation workaround --- pkgs/by-name/ng/nghttp2/package.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/by-name/ng/nghttp2/package.nix b/pkgs/by-name/ng/nghttp2/package.nix index ff4d4bfa88c68..86a223f5cbef9 100644 --- a/pkgs/by-name/ng/nghttp2/package.nix +++ b/pkgs/by-name/ng/nghttp2/package.nix @@ -88,14 +88,6 @@ stdenv.mkDerivation rec { (lib.enableFeature enableHttp3 "http3") ]; - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals - (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") - [ - "-faligned-allocation" - ] - ); - # Unit tests require CUnit and setting TZDIR environment variable doCheck = enableTests; nativeCheckInputs = lib.optionals (enableTests) [ From 1bf298f1b1f2d7862e0b43666748709b856bbb02 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 22:36:59 +0100 Subject: [PATCH 2/4] nodejs: remove obsolete aligned allocation workaround --- pkgs/development/web/nodejs/nodejs.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 2c4f996aa2a64..fece685a4fa43 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -148,10 +148,6 @@ let # Note: do not set TERM=dumb environment variable globally, it is used in # test-ci-js test suite to skip tests that otherwise run fine. NINJA = "TERM=dumb ninja"; - } // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { - # Make sure libc++ uses `posix_memalign` instead of `aligned_alloc` on x86_64-darwin. - # Otherwise, nodejs would require the 11.0 SDK and macOS 10.15+. - NIX_CFLAGS_COMPILE = "-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=101300 -Wno-macro-redefined"; }; # NB: technically, we do not need bash in build inputs since all scripts are From ef48c26bada8f2e91d0efb4b353f81787d28162f Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 22:36:59 +0100 Subject: [PATCH 3/4] python312Packages.pybind11: remove obsolete aligned allocation workaround --- .../python-modules/pybind11/default.nix | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix index d5cbf75a5c69f..1c1933537a00c 100644 --- a/pkgs/development/python-modules/pybind11/default.nix +++ b/pkgs/development/python-modules/pybind11/default.nix @@ -26,27 +26,6 @@ let pythonSitePackages = "${python}/${python.sitePackages}"; }; } ./setup-hook.sh; - - # clang 16 defaults to C++17, which results in the use of aligned allocations by pybind11. - # libc++ supports aligned allocations via `posix_memalign`, which is available since 10.6, - # but clang has a check hard-coded requiring 10.13 because that’s when Apple first shipped a - # support for C++17 aligned allocations on macOS. - # Tell clang we’re targeting 10.13 on x86_64-darwin while continuing to use the default SDK. - stdenv' = - if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then - python.stdenv.override (oldStdenv: { - buildPlatform = oldStdenv.buildPlatform // { - darwinMinVersion = "10.13"; - }; - targetPlatform = oldStdenv.targetPlatform // { - darwinMinVersion = "10.13"; - }; - hostPlatform = oldStdenv.hostPlatform // { - darwinMinVersion = "10.13"; - }; - }) - else - python.stdenv; in buildPythonPackage rec { pname = "pybind11"; @@ -69,8 +48,6 @@ buildPythonPackage rec { buildInputs = lib.optionals (pythonOlder "3.9") [ libxcrypt ]; propagatedNativeBuildInputs = [ setupHook ]; - stdenv = stdenv'; - dontUseCmakeBuildDir = true; # Don't build tests if not needed, read the doInstallCheck value at runtime From 1114f4f7d6aa523158a9253c9a6adde3268e38f1 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 22:36:59 +0100 Subject: [PATCH 4/4] qt6.qtquick3dphysics: remove obsolete aligned allocation workaround --- pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix b/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix index 6c74677b337ca..b49c286f9df07 100644 --- a/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix +++ b/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix @@ -12,8 +12,5 @@ qtModule { qtbase qtquick3d ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString ( - stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 - ) "-faligned-allocation"; meta.mainProgram = "cooker"; }