diff options
Diffstat (limited to 'pkgs/development/compilers/gcc/6/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 94e7f8347372..e5c77568a0ed 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -25,7 +25,8 @@ , libcCross ? null , crossStageStatic ? false , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd -, stripped ? true +, # Strip kills static libs of other archs (hence no cross) + stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , darwin ? null @@ -151,7 +152,7 @@ let version = "6.4.0"; "--disable-decimal-float" # No final libdecnumber (it may work only in 386) ])); stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; + crossNameAddon = if targetPlatform != hostPlatform then "${targetPlatform.config}${stageNameAddon}-" else ""; bootstrap = targetPlatform == hostPlatform; @@ -161,7 +162,7 @@ in assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == []; stdenv.mkDerivation ({ - name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon; + name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}"; builder = ../builder.sh; @@ -300,11 +301,7 @@ stdenv.mkDerivation ({ dontDisableStatic = true; # TODO(@Ericson2314): Always pass "--target" and always prefix. - configurePlatforms = - # TODO(@Ericson2314): Figure out what's going wrong with Arm - if buildPlatform == hostPlatform && hostPlatform == targetPlatform && targetPlatform.isAarch32 - then [] - else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; + configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; configureFlags = # Basic dependencies @@ -380,20 +377,19 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = - optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + buildFlags = optional + (bootstrap && hostPlatform == buildPlatform) + (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + + dontStrip = !stripped; + + doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv installTargets = if stripped then "install-strip" else "install"; - /* For cross-built gcc (build != host == target) */ - crossAttrs = { - dontStrip = true; - buildFlags = ""; - }; - # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; @@ -491,9 +487,6 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -# Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; } - // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } // optionalAttrs (langJava) { |