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: 926c920c12
("gcc: tighten condition for inhibit_libc=true")
This commit is contained in:
parent
b37de078e5
commit
69b9532a74
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
''
|
||||
|
||||
|
|
Loading…
Reference in a new issue