Merge pull request #192459 from danielfullmer/fix-cc-wrapper-libdir
This commit is contained in:
commit
fa3a4a18c0
1 changed files with 3 additions and 1 deletions
|
@ -107,6 +107,8 @@ let
|
||||||
&& !(stdenv.targetPlatform.useAndroidPrebuilt or false)
|
&& !(stdenv.targetPlatform.useAndroidPrebuilt or false)
|
||||||
&& !(stdenv.targetPlatform.isiOS or false)
|
&& !(stdenv.targetPlatform.isiOS or false)
|
||||||
&& gccForLibs != null;
|
&& gccForLibs != null;
|
||||||
|
gccForLibs_solib = getLib gccForLibs
|
||||||
|
+ optionalString (targetPlatform != hostPlatform) "/${targetPlatform.config}";
|
||||||
|
|
||||||
# older compilers (for example bootstrap's GCC 5) fail with -march=too-modern-cpu
|
# older compilers (for example bootstrap's GCC 5) fail with -march=too-modern-cpu
|
||||||
isGccArchSupported = arch:
|
isGccArchSupported = arch:
|
||||||
|
@ -374,7 +376,7 @@ stdenv.mkDerivation {
|
||||||
''
|
''
|
||||||
+ optionalString useGccForLibs ''
|
+ optionalString useGccForLibs ''
|
||||||
echo "-L${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version}" >> $out/nix-support/cc-ldflags
|
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
|
echo "-L${gccForLibs_solib}/lib" >> $out/nix-support/cc-ldflags
|
||||||
''
|
''
|
||||||
|
|
||||||
# TODO We would like to connect this to `useGccForLibs`, but we cannot yet
|
# TODO We would like to connect this to `useGccForLibs`, but we cannot yet
|
||||||
|
|
Loading…
Reference in a new issue