diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index e386693b22c7a..5a74c5647293a 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -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 ''