Skip to content

Commit

Permalink
gcc: kludge to prevent mass-rebuild
Browse files Browse the repository at this point in the history
This commit is reverted in NixOS#240596 (which must go to staging).

(cherry-picked from commit 96a2f1b)
  • Loading branch information
Adam Joseph authored and avnik committed Oct 14, 2023
1 parent 11036e7 commit 6904716
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 12 deletions.
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/10/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/12/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/13/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/4.8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ lib.pipe (stdenv.mkDerivation ({
''
else null;

inherit noSysDirs staticCompiler langJava withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler langJava
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/4.9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ lib.pipe (stdenv.mkDerivation ({
''
else null;

inherit noSysDirs staticCompiler langJava withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler langJava
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ lib.pipe (stdenv.mkDerivation ({
))
);

inherit noSysDirs staticCompiler langJava withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler langJava
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler withoutTargetLibc
# kludge to prevent a mass-rebuild; will be removed in a PR sent to staging
crossStageStatic = withoutTargetLibc;

inherit noSysDirs staticCompiler
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/gcc/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ if test "$noSysDirs" = "1"; then
)
fi

if test "$withoutTargetLibc" == 1; then
if test "$crossStageStatic" == 1; then
# We don't want the gcc build to assume there will be a libc providing
# limits.h in this stage
makeFlagsArray+=(
Expand Down Expand Up @@ -167,7 +167,7 @@ preConfigure() {
rm -Rf zlib
fi

if test -n "$crossMingw" -a -n "$withoutTargetLibc"; then
if test -n "$crossMingw" -a -n "$crossStageStatic"; then
mkdir -p ../mingw
# --with-build-sysroot expects that:
cp -R $libcCross/include ../mingw
Expand Down

0 comments on commit 6904716

Please sign in to comment.