mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-21 12:52:41 +03:00
gcc: add linkLib32toLib to create lib32->lib links
Our gcc builder creates lib64->lib links to ensure that the "primary" libraries for the targetPlatform wind up in $PREFIX/lib. This is required in order for make-bootstrap-files.nix to work correctly. On mips, gcc follows the somewhat awkward IRIX convention of putting mips32 binaries in `lib` and mips64n32 binaries in `lib32`. So we need similar symlinks there. This may come up on other ILP32 platforms as well, so a general-purpose variable name is provided.
This commit is contained in:
parent
b02b965b0d
commit
cbc80ff32b
@ -197,6 +197,11 @@ preInstall() {
|
||||
ln -s lib "$out/${targetConfig}/lib64"
|
||||
ln -s lib "${!outputLib}/${targetConfig}/lib64"
|
||||
fi
|
||||
# Make ‘lib32’ symlinks to ‘lib’.
|
||||
if [ -n "$linkLib32toLib" ]; then
|
||||
ln -s lib "$out/${targetConfig}/lib32"
|
||||
ln -s lib "${!outputLib}/${targetConfig}/lib32"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,3 +78,13 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
||||
+ lib.optionalString (targetPlatform != hostPlatform && crossStageStatic) ''
|
||||
export inhibit_libc=true
|
||||
''
|
||||
|
||||
# On mips platforms, gcc follows the IRIX naming convention:
|
||||
#
|
||||
# $PREFIX/lib = mips32
|
||||
# $PREFIX/lib32 = mips64n32
|
||||
# $PREFIX/lib64 = mips64
|
||||
#
|
||||
+ lib.optionalString (targetPlatform.isMips64n32) ''
|
||||
export linkLib32toLib=1
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user