Merge pull request #29610 from obsidiansystems/no-gccCrossStageFinal

top-level: No `gccCrossStageFinal` needed anymore

authored by John Ericson and committed by GitHub 56574e60 677371c5

+45 -29
+4 -2
pkgs/development/compilers/gcc/4.5/default.nix
··· 20 20 , enableMultilib ? false 21 21 , name ? "gcc" 22 22 , libcCross ? null 23 - , crossStageStatic ? true 23 + , crossStageStatic ? false 24 24 , gnat ? null 25 25 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 26 26 , stripped ? true ··· 213 213 '' 214 214 else null; 215 215 216 - inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic 216 + # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, 217 + crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; 218 + inherit noSysDirs profiledCompiler staticCompiler langJava 217 219 libcCross crossMingw; 218 220 219 221 nativeBuildInputs = [ texinfo which gettext ]
+4 -2
pkgs/development/compilers/gcc/4.8/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , libcCross ? null 29 - , crossStageStatic ? true 29 + , crossStageStatic ? false 30 30 , gnat ? null 31 31 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 32 32 , stripped ? true ··· 284 284 '' 285 285 else null; 286 286 287 - inherit noSysDirs staticCompiler langJava crossStageStatic 287 + # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, 288 + crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; 289 + inherit noSysDirs staticCompiler langJava 288 290 libcCross crossMingw; 289 291 290 292 nativeBuildInputs = [ texinfo which gettext ]
+4 -2
pkgs/development/compilers/gcc/4.9/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , libcCross ? null 29 - , crossStageStatic ? true 29 + , crossStageStatic ? false 30 30 , gnat ? null 31 31 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 32 32 , stripped ? true ··· 280 280 '' 281 281 else null; 282 282 283 - inherit noSysDirs staticCompiler langJava crossStageStatic 283 + # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, 284 + crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; 285 + inherit noSysDirs staticCompiler langJava 284 286 libcCross crossMingw; 285 287 286 288 nativeBuildInputs = [ texinfo which gettext ]
+4 -2
pkgs/development/compilers/gcc/5/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , libcCross ? null 29 - , crossStageStatic ? true 29 + , crossStageStatic ? false 30 30 , gnat ? null 31 31 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 32 32 , stripped ? true ··· 299 299 '' 300 300 else null; 301 301 302 - inherit noSysDirs staticCompiler langJava crossStageStatic 302 + # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, 303 + crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; 304 + inherit noSysDirs staticCompiler langJava 303 305 libcCross crossMingw; 304 306 305 307 nativeBuildInputs = [ texinfo which gettext ]
+4 -2
pkgs/development/compilers/gcc/6/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , libcCross ? null 29 - , crossStageStatic ? true 29 + , crossStageStatic ? false 30 30 , gnat ? null 31 31 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 32 32 , stripped ? true ··· 292 292 '' 293 293 else null; 294 294 295 - inherit noSysDirs staticCompiler langJava crossStageStatic 295 + # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, 296 + crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; 297 + inherit noSysDirs staticCompiler langJava 296 298 libcCross crossMingw; 297 299 298 300 nativeBuildInputs = [ texinfo which gettext ]
+4 -2
pkgs/development/compilers/gcc/7/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , libcCross ? null 29 - , crossStageStatic ? true 29 + , crossStageStatic ? false 30 30 , gnat ? null 31 31 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 32 32 , stripped ? true ··· 294 294 '' 295 295 else null; 296 296 297 - inherit noSysDirs staticCompiler langJava crossStageStatic 297 + # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, 298 + crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; 299 + inherit noSysDirs staticCompiler langJava 298 300 libcCross crossMingw; 299 301 300 302 nativeBuildInputs = [ texinfo which gettext ]
+4 -2
pkgs/development/compilers/gcc/snapshot/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , libcCross ? null 29 - , crossStageStatic ? true 29 + , crossStageStatic ? false 30 30 , gnat ? null 31 31 , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd 32 32 , stripped ? true ··· 281 281 '' 282 282 else null; 283 283 284 - inherit noSysDirs staticCompiler langJava crossStageStatic 284 + # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild, 285 + crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; 286 + inherit noSysDirs staticCompiler langJava 285 287 libcCross crossMingw; 286 288 287 289 nativeBuildInputs = [ texinfo which gettext ]
+2 -2
pkgs/os-specific/gnu/default.nix
··· 2 2 3 3 args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool 4 4 , texinfo, glibcCross, hurdPartedCross, libuuid, samba 5 - , gccCrossStageStatic, gccCrossStageFinal 5 + , gccCrossStageStatic, gcc 6 6 , forceSystem, newScope, platform, config 7 7 , targetPlatform, buildPlatform 8 8 , overrides ? {} ··· 28 28 automake = automake111x; 29 29 headersOnly = false; 30 30 cross = assert targetPlatform != buildPlatform; targetPlatform; 31 - gccCross = gccCrossStageFinal; 31 + gccCross = gcc; 32 32 }; 33 33 34 34 hurdCrossIntermediate = forcedNativePackages.callPackage ./hurd {
+1 -1
pkgs/stdenv/cross/default.nix
··· 35 35 targetPlatform = crossSystem; 36 36 cc = if crossSystem.useiOSCross or false 37 37 then buildPackages.darwin.ios-cross 38 - else buildPackages.gccCrossStageFinal; 38 + else buildPackages.gcc; 39 39 }; 40 40 }) 41 41
+13 -11
pkgs/top-level/all-packages.nix
··· 5383 5383 gambit = callPackage ../development/compilers/gambit { }; 5384 5384 gerbil = callPackage ../development/compilers/gerbil { }; 5385 5385 5386 + gccFun = callPackage ../development/compilers/gcc/6; 5386 5387 gcc = gcc6; 5387 5388 gcc-unwrapped = gcc.cc; 5388 5389 ··· 5431 5432 cc = buildPackages.gccCrossStageStatic; 5432 5433 }; 5433 5434 5435 + # The GCC used to build libc for the target platform. Normal gccs will be 5436 + # built with, and use, that cross-compiled libc. 5434 5437 gccCrossStageStatic = assert targetPlatform != buildPlatform; let 5435 5438 libcCross1 = 5436 5439 if targetPlatform.libc == "msvcrt" then __targetPackages.windows.mingw_w64_headers ··· 5438 5441 else null; 5439 5442 in wrapCCWith { 5440 5443 name = "gcc-cross-wrapper"; 5441 - cc = gcc.cc.override { 5444 + cc = gccFun { 5445 + # copy-pasted 5446 + inherit noSysDirs; 5447 + # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion 5448 + profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); 5449 + isl = if !stdenv.isDarwin then isl_0_14 else null; 5450 + 5451 + # just for stage static 5442 5452 crossStageStatic = true; 5443 5453 langCC = false; 5444 5454 libcCross = libcCross1; 5445 5455 enableShared = false; 5446 - # Why is this needed? 5447 5456 }; 5448 5457 libc = libcCross1; 5449 5458 }; ··· 5453 5462 name = "gcc-cross-wrapper"; 5454 5463 cc = gccCrossStageStatic.gcc; 5455 5464 libc = windows.mingw_headers2; 5456 - }; 5457 - 5458 - gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapCCWith { 5459 - name = "gcc-cross-wrapper"; 5460 - cc = gcc.cc.override { 5461 - crossStageStatic = false; 5462 - }; 5463 - libc = libcCross; 5464 5465 }; 5465 5466 5466 5467 gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 { ··· 6227 6228 ccWrapperFun = callPackage ../build-support/cc-wrapper; 6228 6229 6229 6230 wrapCC = cc: wrapCCWith { 6231 + name = lib.optionalString (targetPlatform != hostPlatform) "gcc-cross-wrapper"; 6230 6232 inherit cc; 6231 - inherit (stdenv.cc) libc; 6233 + libc = if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc; 6232 6234 }; 6233 6235 # legacy version, used for gnat bootstrapping 6234 6236 wrapGCC-old = baseGCC: callPackage ../build-support/gcc-wrapper-old {
+1 -1
pkgs/top-level/release-cross.nix
··· 19 19 }; 20 20 21 21 gnuCommon = lib.recursiveUpdate common { 22 - buildPackages.gccCrossStageFinal = nativePlatforms; 22 + buildPackages.gcc = nativePlatforms; 23 23 coreutils = nativePlatforms; 24 24 }; 25 25