mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
Merge pull request #163489 from alyssais/gcc-static-lib
pkgsStatic.stdenv.cc.cc: put static libs in $lib
This commit is contained in:
commit
ed07c3b1a2
@ -8,12 +8,7 @@
|
||||
, profiledCompiler ? false
|
||||
, langJit ? false
|
||||
, staticCompiler ? false
|
||||
, # N.B. the defult is intentionally not from an `isStatic`. See
|
||||
# https://gcc.gnu.org/install/configure.html - this is about target
|
||||
# platform libraries not host platform ones unlike normal. But since
|
||||
# we can't rebuild those without also rebuilding the compiler itself,
|
||||
# we opt to always build everything unlike our usual policy.
|
||||
enableShared ? true
|
||||
, enableShared ? !stdenv.targetPlatform.isStatic
|
||||
, enableLTO ? !stdenv.hostPlatform.isStatic
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
@ -266,7 +261,7 @@ stdenv.mkDerivation ({
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
inherit enableMultilib enableShared;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
@ -8,12 +8,7 @@
|
||||
, profiledCompiler ? false
|
||||
, langJit ? false
|
||||
, staticCompiler ? false
|
||||
, # N.B. the defult is intentionally not from an `isStatic`. See
|
||||
# https://gcc.gnu.org/install/configure.html - this is about target
|
||||
# platform libraries not host platform ones unlike normal. But since
|
||||
# we can't rebuild those without also rebuilding the compiler itself,
|
||||
# we opt to always build everything unlike our usual policy.
|
||||
enableShared ? true
|
||||
, enableShared ? !stdenv.targetPlatform.isStatic
|
||||
, enableLTO ? !stdenv.hostPlatform.isStatic
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
@ -269,7 +264,7 @@ stdenv.mkDerivation ({
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
inherit enableShared enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
@ -8,12 +8,7 @@
|
||||
, profiledCompiler ? false
|
||||
, langJit ? false
|
||||
, staticCompiler ? false
|
||||
, # N.B. the defult is intentionally not from an `isStatic`. See
|
||||
# https://gcc.gnu.org/install/configure.html - this is about target
|
||||
# platform libraries not host platform ones unlike normal. But since
|
||||
# we can't rebuild those without also rebuilding the compiler itself,
|
||||
# we opt to always build everything unlike our usual policy.
|
||||
enableShared ? true
|
||||
, enableShared ? !stdenv.targetPlatform.isStatic
|
||||
, enableLTO ? !stdenv.hostPlatform.isStatic
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
@ -295,7 +290,7 @@ stdenv.mkDerivation ({
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
inherit enableShared enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
@ -8,12 +8,7 @@
|
||||
, profiledCompiler ? false
|
||||
, langJit ? false
|
||||
, staticCompiler ? false
|
||||
, # N.B. the defult is intentionally not from an `isStatic`. See
|
||||
# https://gcc.gnu.org/install/configure.html - this is about target
|
||||
# platform libraries not host platform ones unlike normal. But since
|
||||
# we can't rebuild those without also rebuilding the compiler itself,
|
||||
# we opt to always build everything unlike our usual policy.
|
||||
enableShared ? true
|
||||
, enableShared ? !stdenv.targetPlatform.isStatic
|
||||
, enableLTO ? !stdenv.hostPlatform.isStatic
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
@ -311,7 +306,7 @@ stdenv.mkDerivation ({
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
inherit enableShared enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
@ -9,12 +9,7 @@
|
||||
, profiledCompiler ? false
|
||||
, langJit ? false
|
||||
, staticCompiler ? false
|
||||
, # N.B. the defult is intentionally not from an `isStatic`. See
|
||||
# https://gcc.gnu.org/install/configure.html - this is about target
|
||||
# platform libraries not host platform ones unlike normal. But since
|
||||
# we can't rebuild those without also rebuilding the compiler itself,
|
||||
# we opt to always build everything unlike our usual policy.
|
||||
enableShared ? true
|
||||
, enableShared ? !stdenv.targetPlatform.isStatic
|
||||
, enableLTO ? !stdenv.hostPlatform.isStatic
|
||||
, texinfo ? null
|
||||
, flex
|
||||
@ -325,7 +320,7 @@ stdenv.mkDerivation ({
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
inherit enableShared enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
@ -7,12 +7,7 @@
|
||||
, profiledCompiler ? false
|
||||
, langJit ? false
|
||||
, staticCompiler ? false
|
||||
, # N.B. the defult is intentionally not from an `isStatic`. See
|
||||
# https://gcc.gnu.org/install/configure.html - this is about target
|
||||
# platform libraries not host platform ones unlike normal. But since
|
||||
# we can't rebuild those without also rebuilding the compiler itself,
|
||||
# we opt to always build everything unlike our usual policy.
|
||||
enableShared ? true
|
||||
, enableShared ? !stdenv.targetPlatform.isStatic
|
||||
, enableLTO ? !stdenv.hostPlatform.isStatic
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
@ -280,7 +275,7 @@ stdenv.mkDerivation ({
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
inherit enableShared enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
@ -7,12 +7,7 @@
|
||||
, profiledCompiler ? false
|
||||
, langJit ? false
|
||||
, staticCompiler ? false
|
||||
, # N.B. the defult is intentionally not from an `isStatic`. See
|
||||
# https://gcc.gnu.org/install/configure.html - this is about target
|
||||
# platform libraries not host platform ones unlike normal. But since
|
||||
# we can't rebuild those without also rebuilding the compiler itself,
|
||||
# we opt to always build everything unlike our usual policy.
|
||||
enableShared ? true
|
||||
, enableShared ? !stdenv.targetPlatform.isStatic
|
||||
, enableLTO ? !stdenv.hostPlatform.isStatic
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
@ -259,7 +254,7 @@ stdenv.mkDerivation ({
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
inherit enableShared enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
@ -9,12 +9,7 @@
|
||||
, profiledCompiler ? false
|
||||
, langJit ? false
|
||||
, staticCompiler ? false
|
||||
, # N.B. the defult is intentionally not from an `isStatic`. See
|
||||
# https://gcc.gnu.org/install/configure.html - this is about target
|
||||
# platform libraries not host platform ones unlike normal. But since
|
||||
# we can't rebuild those without also rebuilding the compiler itself,
|
||||
# we opt to always build everything unlike our usual policy.
|
||||
enableShared ? true
|
||||
, enableShared ? !stdenv.targetPlatform.isStatic
|
||||
, enableLTO ? !stdenv.hostPlatform.isStatic
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
@ -285,7 +280,7 @@ stdenv.mkDerivation ({
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
inherit enableMultilib;
|
||||
inherit enableShared enableMultilib;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
|
@ -222,6 +222,10 @@ postInstall() {
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.dll.a" "${!outputLib}"
|
||||
moveToOutput "share/gcc-*/python" "${!outputLib}"
|
||||
|
||||
if [ -z "$enableShared" ]; then
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.a" "${!outputLib}"
|
||||
fi
|
||||
|
||||
for i in "${!outputLib}/${targetConfig}"/lib/*.{la,py}; do
|
||||
substituteInPlace "$i" --replace "$out" "${!outputLib}"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user