summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily <vcs@emily.moe>2024-10-05 21:50:14 +0100
committerEmily <vcs@emily.moe>2024-11-07 23:05:26 +0000
commit2bb6cec0c85d367e36aaa8361d3d9caf2f6627d8 (patch)
tree177849b65637fc8cb590b28d99a5d9eafeb9bf86
parentcctools: remove code for macOS < 11 (diff)
downloadnixpkgs-2bb6cec0c85d367e36aaa8361d3d9caf2f6627d8.tar.gz
gcc: remove code for macOS < 11
-rw-r--r--pkgs/development/compilers/gcc/common/pre-configure.nix36
1 files changed, 0 insertions, 36 deletions
diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix
index 9e1764eae916..6e22a59d5792 100644
--- a/pkgs/development/compilers/gcc/common/pre-configure.nix
+++ b/pkgs/development/compilers/gcc/common/pre-configure.nix
@@ -32,42 +32,6 @@ lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
export GFORTRAN_FOR_TARGET=${pkgsBuildTarget.gfortran}/bin/${stdenv.targetPlatform.config}-gfortran
''
-# NOTE 2020/3/18: This environment variable prevents configure scripts from
-# detecting the presence of aligned_alloc on Darwin. There are many facts that
-# collectively make this fix necessary:
-# - Nix uses a fixed set of standard library headers on all MacOS systems,
-# regardless of their actual version. (Nix uses version 10.12 headers.)
-# - Nix uses the native standard library binaries for the build system. That
-# means the standard library binaries may not exactly match the standard
-# library headers.
-# - The aligned_alloc procedure is present in MacOS 10.15 (Catalina), but not
-# in earlier versions. Therefore on Catalina systems, aligned_alloc is
-# linkable (i.e. present in the binary libraries) but not present in the
-# headers.
-# - Configure scripts detect a procedure's existence by checking whether it is
-# linkable. They do not check whether it is present in the headers.
-# - GCC throws an error during compilation because aligned_alloc is not
-# defined in the headers---even though the linker can see it.
-#
-# This fix would not be necessary if ANY of the above were false:
-# - If Nix used native headers for each different MacOS version, aligned_alloc
-# would be in the headers on Catalina.
-# - If Nix used the same library binaries for each MacOS version, aligned_alloc
-# would not be in the library binaries.
-# - If Catalina did not include aligned_alloc, this wouldn't be a problem.
-# - If the configure scripts looked for header presence as well as
-# linkability, they would see that aligned_alloc is missing.
-# - If GCC allowed implicit declaration of symbols, it would not fail during
-# compilation even if the configure scripts did not check header presence.
-#
-+ lib.optionalString (buildPlatform.isDarwin) ''
- export build_configargs=ac_cv_func_aligned_alloc=no
-'' + lib.optionalString (hostPlatform.isDarwin) ''
- export host_configargs=ac_cv_func_aligned_alloc=no
-'' + lib.optionalString (targetPlatform.isDarwin) ''
- export target_configargs=ac_cv_func_aligned_alloc=no
-''
-
# In order to properly install libgccjit on macOS Catalina, strip(1)
# upon installation must not remove external symbols, otherwise the
# install step errors with "symbols referenced by indirect symbol