diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index 4f05cd3144cde..53d90093a50eb 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -23,8 +23,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 diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index a2f034a4827fd..643eff7d2d908 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -31,8 +31,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 diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 6d066044ec1ee..4556694d6b721 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -21,8 +21,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 diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 9e6a24d12948a..c5d2b99d91b1a 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -21,8 +21,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 diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 305ed56df78c7..0209f87466e4e 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -24,8 +24,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 diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 2204744a4b594..ab3e30206ef44 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -144,9 +144,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-}" ] && [ -z "${stripDebugList-}" ]; then + # if stripping gcc, include target directory too + stripDebugList="lib lib32 lib64 libexec bin sbin $targetConfig" fi eval "$oldOpts"