cc-wrapper: deunify clang/gcc handling of -B flag

Closes #225779
Closes #225780
This commit is contained in:
Adam Joseph 2023-04-11 23:49:48 -07:00
parent 6f8a69ee31
commit c1e956e0a9

View file

@ -334,9 +334,11 @@ stdenv.mkDerivation {
##
## GCC libs for non-GCC support
##
+ optionalString useGccForLibs ''
+ optionalString (useGccForLibs && isClang) ''
echo "-B${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version}" >> $out/nix-support/cc-cflags
''
+ optionalString useGccForLibs ''
echo "-L${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version}" >> $out/nix-support/cc-ldflags
echo "-L${gccForLibs.lib}/${targetPlatform.config}/lib" >> $out/nix-support/cc-ldflags
''