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).
  • Loading branch information
Adam Joseph committed Jul 1, 2023
1 parent 63305d0 commit 96a2f1b
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 @@ -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
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 @@ -227,7 +227,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 @@ -271,7 +271,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 @@ -265,7 +265,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 @@ -232,7 +232,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 @@ -253,7 +253,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 @@ -269,7 +269,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 @@ -218,7 +218,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 @@ -199,7 +199,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 @@ -213,7 +213,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 96a2f1b

Please sign in to comment.