mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
gcc: allow stripping gcc libraries
When cross compiling to the same kernel / arch combination, it is safe to use strip of libraries. This happens when cross-compiling musl programs. dontStrip is now set in each gcc compiler instead of in gcc/builder.sh. Fixes #75476
This commit is contained in:
parent
27c8ef972c
commit
4bdcddf9aa
6 changed files with 13 additions and 13 deletions
|
@ -28,8 +28,8 @@
|
|||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
&& stdenv.targetPlatform == stdenv.hostPlatform
|
||||
stripped ? stdenv.hostPlatform.system == stdenv.buildPlatform.system
|
||||
&& stdenv.targetPlatform.system == stdenv.hostPlatform.system
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, buildPackages
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
&& stdenv.targetPlatform == stdenv.hostPlatform
|
||||
stripped ? stdenv.hostPlatform.system == stdenv.buildPlatform.system
|
||||
&& stdenv.targetPlatform.system == stdenv.hostPlatform.system
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, buildPackages
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
&& stdenv.targetPlatform == stdenv.hostPlatform
|
||||
stripped ? stdenv.hostPlatform.system == stdenv.buildPlatform.system
|
||||
&& stdenv.targetPlatform.system == stdenv.hostPlatform.system
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, buildPackages
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
&& stdenv.targetPlatform == stdenv.hostPlatform
|
||||
stripped ? stdenv.hostPlatform.system == stdenv.buildPlatform.system
|
||||
&& stdenv.targetPlatform.system == stdenv.hostPlatform.system
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, buildPackages
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
, threadsCross ? null # for MinGW
|
||||
, crossStageStatic ? false
|
||||
, # Strip kills static libs of other archs (hence no cross)
|
||||
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
&& stdenv.targetPlatform == stdenv.hostPlatform
|
||||
stripped ? stdenv.hostPlatform.system == stdenv.buildPlatform.system
|
||||
&& stdenv.targetPlatform.system == stdenv.hostPlatform.system
|
||||
, gnused ? null
|
||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||
, buildPackages
|
||||
|
|
|
@ -147,9 +147,9 @@ if test "$noSysDirs" = "1"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if test -n "${targetConfig-}"; then
|
||||
# The host strip will destroy some important details of the objects
|
||||
dontStrip=1
|
||||
if [ -n "${targetConfig-}" ]; then
|
||||
# if stripping gcc, include target directory too
|
||||
stripDebugList="${stripDebugList-lib lib32 lib64 libexec bin sbin} $targetConfig"
|
||||
fi
|
||||
|
||||
eval "$oldOpts"
|
||||
|
|
Loading…
Reference in a new issue