lol

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")

+2 -3
+2 -3
pkgs/development/compilers/gcc/common/pre-configure.nix
··· 116 116 117 117 # Normally (for host != target case) --without-headers automatically 118 118 # enables 'inhibit_libc=true' in gcc's gcc/configure.ac. But case of 119 - # gcc->clang "cross"-compilation manages to evade it: there 119 + # gcc->clang or dynamic->static "cross"-compilation manages to evade it: there 120 120 # hostPlatform != targetPlatform, hostPlatform.config == targetPlatform.config. 121 121 # We explicitly inhibit libc headers use in this case as well. 122 122 + lib.optionalString (targetPlatform != hostPlatform && 123 123 withoutTargetLibc && 124 - targetPlatform.config == hostPlatform.config && 125 - (stdenv.cc.isClang || stdenv.targetPlatform.useLLVM or false)) '' 124 + targetPlatform.config == hostPlatform.config) '' 126 125 export inhibit_libc=true 127 126 '' 128 127