summaryrefslogtreecommitdiffstats
path: root/pkgs/development/compilers/gcc/8/default.nix
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2022-07-28 00:30:49 -0700
committerGitHub <noreply@github.com>2022-07-28 00:30:49 -0700
commit88c63ca65a30eb83bd2a00d183a9f11819be43ad (patch)
tree28deb0ec736374e6a61478ede77500b1537eb751 /pkgs/development/compilers/gcc/8/default.nix
parent0049ace2ece4a4555c5582c3b5a74a548cfb60e9 (diff)
parenteece5d0dc0bbd7eaab1f09e608f89449f745003b (diff)
Merge pull request #182513 from trofi/strip-for-host-and-target
gcc: enable stripping for cross-compilers
Diffstat (limited to 'pkgs/development/compilers/gcc/8/default.nix')
-rw-r--r--pkgs/development/compilers/gcc/8/default.nix16
1 files changed, 7 insertions, 9 deletions
diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix
index 427244016ae1..7e94ec61c6b7 100644
--- a/pkgs/development/compilers/gcc/8/default.nix
+++ b/pkgs/development/compilers/gcc/8/default.nix
@@ -21,9 +21,6 @@
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
-, # Strip kills static libs of other archs (hence no cross)
- 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
@@ -78,7 +75,7 @@ let majorVersion = "8";
in
stdenv.mkDerivation ({
- pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
+ pname = "${crossNameAddon}${name}";
inherit version;
builder = ../builder.sh;
@@ -218,9 +215,11 @@ stdenv.mkDerivation ({
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
- dontStrip = !stripped;
-
- installTargets = optional stripped "install-strip";
+ inherit
+ (import ../common/strip-attributes.nix { inherit stdenv; })
+ stripDebugList
+ stripDebugListTarget
+ preFixup;
# https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
@@ -261,8 +260,7 @@ stdenv.mkDerivation ({
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
- description = "GNU Compiler Collection, version ${version}"
- + (if stripped then "" else " (with debugging info)");
+ description = "GNU Compiler Collection, version ${version}";
longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++,