diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-10 09:46:49 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-10 10:58:44 +0000 |
commit | 69b9532a7400ede6a75474f2927b4da254ef85ef (patch) | |
tree | cb60724c9717c6a0e91eb182d319dd62cdc97e9f /pkgs/development/compilers | |
parent | b37de078e5e73ea69bb5175c5d8348792f247109 (diff) | |
download | nixpkgs-69b9532a7400ede6a75474f2927b4da254ef85ef.tar nixpkgs-69b9532a7400ede6a75474f2927b4da254ef85ef.tar.gz nixpkgs-69b9532a7400ede6a75474f2927b4da254ef85ef.tar.bz2 nixpkgs-69b9532a7400ede6a75474f2927b4da254ef85ef.tar.lz nixpkgs-69b9532a7400ede6a75474f2927b4da254ef85ef.tar.xz nixpkgs-69b9532a7400ede6a75474f2927b4da254ef85ef.tar.zst nixpkgs-69b9532a7400ede6a75474f2927b4da254ef85ef.zip |
gcc: always inhibit libc in cross with same configs
It's not just gcc->clang cross compilation that produces different platforms with equal configs — dynamic->static cross compilation can have the same result (e.g. pkgsMusl.pkgsStatic). So, remove the check for LLVM, but keep the check that the configs match. This fixes pkgsMusl.nix on x86_64-linux, which depends on pkgsMusl.pkgsStatic.buildPackages.gccWithoutTargetLibc.cc. Fixes: 926c920c1270 ("gcc: tighten condition for inhibit_libc=true")
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/gcc/common/pre-configure.nix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index 6c36c0a21e2..77179d73976 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -116,13 +116,12 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' # Normally (for host != target case) --without-headers automatically # enables 'inhibit_libc=true' in gcc's gcc/configure.ac. But case of -# gcc->clang "cross"-compilation manages to evade it: there +# gcc->clang or dynamic->static "cross"-compilation manages to evade it: there # hostPlatform != targetPlatform, hostPlatform.config == targetPlatform.config. # We explicitly inhibit libc headers use in this case as well. + lib.optionalString (targetPlatform != hostPlatform && withoutTargetLibc && - targetPlatform.config == hostPlatform.config && - (stdenv.cc.isClang || stdenv.targetPlatform.useLLVM or false)) '' + targetPlatform.config == hostPlatform.config) '' export inhibit_libc=true '' |