gcc: tighten condition for inhibit_libc=true
The situation described in the comment preceding `export inhibit_libc=true` does not match the conditional which follows it. Specifically, the comment says that this line is meant for "clang builds gcc" situations, yet it is enabled even when `!stdenv.cc.isClang`. This commit tightens the conditional to make it match the situation described in the comment.
This commit is contained in:
@@ -108,7 +108,10 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
||||
# gcc->clang "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) ''
|
||||
+ lib.optionalString (targetPlatform != hostPlatform &&
|
||||
withoutTargetLibc &&
|
||||
targetPlatform.config == hostPlatform.config &&
|
||||
(stdenv.cc.isClang || stdenv.targetPlatform.useLLVM)) ''
|
||||
export inhibit_libc=true
|
||||
''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user