mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-24 06:00:18 +02:00
Merge pull request #29610 from obsidiansystems/no-gccCrossStageFinal
top-level: No `gccCrossStageFinal` needed anymore
This commit is contained in:
commit
56574e6087
|
@ -20,7 +20,7 @@
|
||||||
, enableMultilib ? false
|
, enableMultilib ? false
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? true
|
, crossStageStatic ? false
|
||||||
, gnat ? null
|
, gnat ? null
|
||||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||||
, stripped ? true
|
, stripped ? true
|
||||||
|
@ -213,7 +213,9 @@ stdenv.mkDerivation ({
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
|
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||||
|
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||||
|
inherit noSysDirs profiledCompiler staticCompiler langJava
|
||||||
libcCross crossMingw;
|
libcCross crossMingw;
|
||||||
|
|
||||||
nativeBuildInputs = [ texinfo which gettext ]
|
nativeBuildInputs = [ texinfo which gettext ]
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? true # whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? true
|
, crossStageStatic ? false
|
||||||
, gnat ? null
|
, gnat ? null
|
||||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||||
, stripped ? true
|
, stripped ? true
|
||||||
|
@ -284,7 +284,9 @@ stdenv.mkDerivation ({
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||||
|
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||||
|
inherit noSysDirs staticCompiler langJava
|
||||||
libcCross crossMingw;
|
libcCross crossMingw;
|
||||||
|
|
||||||
nativeBuildInputs = [ texinfo which gettext ]
|
nativeBuildInputs = [ texinfo which gettext ]
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? true # whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? true
|
, crossStageStatic ? false
|
||||||
, gnat ? null
|
, gnat ? null
|
||||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||||
, stripped ? true
|
, stripped ? true
|
||||||
|
@ -280,7 +280,9 @@ stdenv.mkDerivation ({
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||||
|
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||||
|
inherit noSysDirs staticCompiler langJava
|
||||||
libcCross crossMingw;
|
libcCross crossMingw;
|
||||||
|
|
||||||
nativeBuildInputs = [ texinfo which gettext ]
|
nativeBuildInputs = [ texinfo which gettext ]
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? true # whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? true
|
, crossStageStatic ? false
|
||||||
, gnat ? null
|
, gnat ? null
|
||||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||||
, stripped ? true
|
, stripped ? true
|
||||||
|
@ -299,7 +299,9 @@ stdenv.mkDerivation ({
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||||
|
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||||
|
inherit noSysDirs staticCompiler langJava
|
||||||
libcCross crossMingw;
|
libcCross crossMingw;
|
||||||
|
|
||||||
nativeBuildInputs = [ texinfo which gettext ]
|
nativeBuildInputs = [ texinfo which gettext ]
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? true # whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? true
|
, crossStageStatic ? false
|
||||||
, gnat ? null
|
, gnat ? null
|
||||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||||
, stripped ? true
|
, stripped ? true
|
||||||
|
@ -292,7 +292,9 @@ stdenv.mkDerivation ({
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||||
|
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||||
|
inherit noSysDirs staticCompiler langJava
|
||||||
libcCross crossMingw;
|
libcCross crossMingw;
|
||||||
|
|
||||||
nativeBuildInputs = [ texinfo which gettext ]
|
nativeBuildInputs = [ texinfo which gettext ]
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? true # whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? true
|
, crossStageStatic ? false
|
||||||
, gnat ? null
|
, gnat ? null
|
||||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||||
, stripped ? true
|
, stripped ? true
|
||||||
|
@ -294,7 +294,9 @@ stdenv.mkDerivation ({
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||||
|
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||||
|
inherit noSysDirs staticCompiler langJava
|
||||||
libcCross crossMingw;
|
libcCross crossMingw;
|
||||||
|
|
||||||
nativeBuildInputs = [ texinfo which gettext ]
|
nativeBuildInputs = [ texinfo which gettext ]
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
, enablePlugin ? true # whether to support user-supplied plug-ins
|
, enablePlugin ? true # whether to support user-supplied plug-ins
|
||||||
, name ? "gcc"
|
, name ? "gcc"
|
||||||
, libcCross ? null
|
, libcCross ? null
|
||||||
, crossStageStatic ? true
|
, crossStageStatic ? false
|
||||||
, gnat ? null
|
, gnat ? null
|
||||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||||
, stripped ? true
|
, stripped ? true
|
||||||
|
@ -281,7 +281,9 @@ stdenv.mkDerivation ({
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
inherit noSysDirs staticCompiler langJava crossStageStatic
|
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||||
|
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||||
|
inherit noSysDirs staticCompiler langJava
|
||||||
libcCross crossMingw;
|
libcCross crossMingw;
|
||||||
|
|
||||||
nativeBuildInputs = [ texinfo which gettext ]
|
nativeBuildInputs = [ texinfo which gettext ]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
|
args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
|
||||||
, texinfo, glibcCross, hurdPartedCross, libuuid, samba
|
, texinfo, glibcCross, hurdPartedCross, libuuid, samba
|
||||||
, gccCrossStageStatic, gccCrossStageFinal
|
, gccCrossStageStatic, gcc
|
||||||
, forceSystem, newScope, platform, config
|
, forceSystem, newScope, platform, config
|
||||||
, targetPlatform, buildPlatform
|
, targetPlatform, buildPlatform
|
||||||
, overrides ? {}
|
, overrides ? {}
|
||||||
|
@ -28,7 +28,7 @@ let
|
||||||
automake = automake111x;
|
automake = automake111x;
|
||||||
headersOnly = false;
|
headersOnly = false;
|
||||||
cross = assert targetPlatform != buildPlatform; targetPlatform;
|
cross = assert targetPlatform != buildPlatform; targetPlatform;
|
||||||
gccCross = gccCrossStageFinal;
|
gccCross = gcc;
|
||||||
};
|
};
|
||||||
|
|
||||||
hurdCrossIntermediate = forcedNativePackages.callPackage ./hurd {
|
hurdCrossIntermediate = forcedNativePackages.callPackage ./hurd {
|
||||||
|
|
|
@ -35,7 +35,7 @@ in bootStages ++ [
|
||||||
targetPlatform = crossSystem;
|
targetPlatform = crossSystem;
|
||||||
cc = if crossSystem.useiOSCross or false
|
cc = if crossSystem.useiOSCross or false
|
||||||
then buildPackages.darwin.ios-cross
|
then buildPackages.darwin.ios-cross
|
||||||
else buildPackages.gccCrossStageFinal;
|
else buildPackages.gcc;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -5383,6 +5383,7 @@ with pkgs;
|
||||||
gambit = callPackage ../development/compilers/gambit { };
|
gambit = callPackage ../development/compilers/gambit { };
|
||||||
gerbil = callPackage ../development/compilers/gerbil { };
|
gerbil = callPackage ../development/compilers/gerbil { };
|
||||||
|
|
||||||
|
gccFun = callPackage ../development/compilers/gcc/6;
|
||||||
gcc = gcc6;
|
gcc = gcc6;
|
||||||
gcc-unwrapped = gcc.cc;
|
gcc-unwrapped = gcc.cc;
|
||||||
|
|
||||||
|
@ -5431,6 +5432,8 @@ with pkgs;
|
||||||
cc = buildPackages.gccCrossStageStatic;
|
cc = buildPackages.gccCrossStageStatic;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# The GCC used to build libc for the target platform. Normal gccs will be
|
||||||
|
# built with, and use, that cross-compiled libc.
|
||||||
gccCrossStageStatic = assert targetPlatform != buildPlatform; let
|
gccCrossStageStatic = assert targetPlatform != buildPlatform; let
|
||||||
libcCross1 =
|
libcCross1 =
|
||||||
if targetPlatform.libc == "msvcrt" then __targetPackages.windows.mingw_w64_headers
|
if targetPlatform.libc == "msvcrt" then __targetPackages.windows.mingw_w64_headers
|
||||||
|
@ -5438,12 +5441,18 @@ with pkgs;
|
||||||
else null;
|
else null;
|
||||||
in wrapCCWith {
|
in wrapCCWith {
|
||||||
name = "gcc-cross-wrapper";
|
name = "gcc-cross-wrapper";
|
||||||
cc = gcc.cc.override {
|
cc = gccFun {
|
||||||
|
# copy-pasted
|
||||||
|
inherit noSysDirs;
|
||||||
|
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
|
||||||
|
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
|
||||||
|
isl = if !stdenv.isDarwin then isl_0_14 else null;
|
||||||
|
|
||||||
|
# just for stage static
|
||||||
crossStageStatic = true;
|
crossStageStatic = true;
|
||||||
langCC = false;
|
langCC = false;
|
||||||
libcCross = libcCross1;
|
libcCross = libcCross1;
|
||||||
enableShared = false;
|
enableShared = false;
|
||||||
# Why is this needed?
|
|
||||||
};
|
};
|
||||||
libc = libcCross1;
|
libc = libcCross1;
|
||||||
};
|
};
|
||||||
|
@ -5455,14 +5464,6 @@ with pkgs;
|
||||||
libc = windows.mingw_headers2;
|
libc = windows.mingw_headers2;
|
||||||
};
|
};
|
||||||
|
|
||||||
gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapCCWith {
|
|
||||||
name = "gcc-cross-wrapper";
|
|
||||||
cc = gcc.cc.override {
|
|
||||||
crossStageStatic = false;
|
|
||||||
};
|
|
||||||
libc = libcCross;
|
|
||||||
};
|
|
||||||
|
|
||||||
gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 {
|
gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 {
|
||||||
inherit noSysDirs;
|
inherit noSysDirs;
|
||||||
texinfo = texinfo4;
|
texinfo = texinfo4;
|
||||||
|
@ -6227,8 +6228,9 @@ with pkgs;
|
||||||
ccWrapperFun = callPackage ../build-support/cc-wrapper;
|
ccWrapperFun = callPackage ../build-support/cc-wrapper;
|
||||||
|
|
||||||
wrapCC = cc: wrapCCWith {
|
wrapCC = cc: wrapCCWith {
|
||||||
|
name = lib.optionalString (targetPlatform != hostPlatform) "gcc-cross-wrapper";
|
||||||
inherit cc;
|
inherit cc;
|
||||||
inherit (stdenv.cc) libc;
|
libc = if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc;
|
||||||
};
|
};
|
||||||
# legacy version, used for gnat bootstrapping
|
# legacy version, used for gnat bootstrapping
|
||||||
wrapGCC-old = baseGCC: callPackage ../build-support/gcc-wrapper-old {
|
wrapGCC-old = baseGCC: callPackage ../build-support/gcc-wrapper-old {
|
||||||
|
|
|
@ -19,7 +19,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
gnuCommon = lib.recursiveUpdate common {
|
gnuCommon = lib.recursiveUpdate common {
|
||||||
buildPackages.gccCrossStageFinal = nativePlatforms;
|
buildPackages.gcc = nativePlatforms;
|
||||||
coreutils = nativePlatforms;
|
coreutils = nativePlatforms;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue