Skip to content

Commit

Permalink
gcc: s_crossStageStatic_withoutTargetLibc_
Browse files Browse the repository at this point in the history
This commit renames the `crossStageStatic` argument to the `gcc`
expression to `withoutTargetLibc`.  See previous commit for details.
  • Loading branch information
Adam Joseph committed Jul 1, 2023
1 parent 2affd45 commit 443dfc4
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 75 deletions.
12 changes: 6 additions & 6 deletions pkgs/development/compilers/gcc/10/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, withoutTargetLibc ? false
, gnused ? null
, cloog ? null # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
Expand Down Expand Up @@ -69,7 +69,7 @@ let majorVersion = "10";
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch

# Obtain latest patch with ../update-mcfgthread-patches.sh
++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch
++ optional (!withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch

++ optional (buildPlatform.system == "aarch64-darwin" && targetPlatform != buildPlatform) (fetchpatch {
url = "https://raw.githubusercontent.com/richard-vd/musl-cross-make/5e9e87f06fc3220e102c29d3413fbbffa456fcd6/patches/gcc-${version}/0008-darwin-aarch64-self-host-driver.patch";
Expand All @@ -78,7 +78,7 @@ let majorVersion = "10";

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";

callFile = lib.callPackageWith {
Expand All @@ -99,7 +99,7 @@ let majorVersion = "10";
binutils
buildPackages
cloog
crossStageStatic
withoutTargetLibc
enableLTO
enableMultilib
enablePlugin
Expand Down Expand Up @@ -214,7 +214,7 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler crossStageStatic
inherit noSysDirs staticCompiler withoutTargetLibc
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down Expand Up @@ -295,5 +295,5 @@ lib.pipe (stdenv.mkDerivation ({
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
))
[
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform enableShared crossStageStatic; })
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; })
]
12 changes: 6 additions & 6 deletions pkgs/development/compilers/gcc/11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, withoutTargetLibc ? false
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
Expand Down Expand Up @@ -82,14 +82,14 @@ let majorVersion = "11";
++ optional (stdenv.isDarwin && targetPlatform.isAvr) ./avr-gcc-11.3-darwin.patch

# Obtain latest patch with ../update-mcfgthread-patches.sh
++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch
++ optional (!withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch

# openjdk build fails without this on -march=opteron; is upstream in gcc12
++ [ ./gcc-issue-103910.patch ];

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";

callFile = lib.callPackageWith {
Expand All @@ -110,7 +110,7 @@ let majorVersion = "11";
binutils
buildPackages
cloog
crossStageStatic
withoutTargetLibc
enableLTO
enableMultilib
enablePlugin
Expand Down Expand Up @@ -227,7 +227,7 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler crossStageStatic
inherit noSysDirs staticCompiler withoutTargetLibc
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down Expand Up @@ -307,6 +307,6 @@ lib.pipe (stdenv.mkDerivation ({
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
))
[
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform enableShared crossStageStatic; })
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; })
(callPackage ../common/checksum.nix { inherit langC langCC; })
]
12 changes: 6 additions & 6 deletions pkgs/development/compilers/gcc/12/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, withoutTargetLibc ? false
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
Expand Down Expand Up @@ -127,11 +127,11 @@ let majorVersion = "12";
++ optional (stdenv.isDarwin && langAda) ../gnat-darwin-dylib-install-name.patch

# Obtain latest patch with ../update-mcfgthread-patches.sh
++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch;
++ optional (!withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch;

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";

callFile = lib.callPackageWith {
Expand All @@ -152,7 +152,7 @@ let majorVersion = "12";
binutils
buildPackages
cloog
crossStageStatic
withoutTargetLibc
disableBootstrap
disableGdbPlugin
enableLTO
Expand Down Expand Up @@ -271,7 +271,7 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler crossStageStatic
inherit noSysDirs staticCompiler withoutTargetLibc
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
Expand Down Expand Up @@ -353,7 +353,7 @@ lib.pipe (stdenv.mkDerivation ({
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
))
[
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform enableShared crossStageStatic; })
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; })
(callPackage ../common/checksum.nix { inherit langC langCC; })
]

10 changes: 5 additions & 5 deletions pkgs/development/compilers/gcc/13/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, withoutTargetLibc ? false
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
Expand Down Expand Up @@ -125,7 +125,7 @@ let majorVersion = "13";

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";

callFile = lib.callPackageWith {
Expand All @@ -146,7 +146,7 @@ let majorVersion = "13";
binutils
buildPackages
cloog
crossStageStatic
withoutTargetLibc
disableBootstrap
disableGdbPlugin
enableLTO
Expand Down Expand Up @@ -265,7 +265,7 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler crossStageStatic
inherit noSysDirs staticCompiler withoutTargetLibc
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
Expand Down Expand Up @@ -347,7 +347,7 @@ lib.pipe (stdenv.mkDerivation ({
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
))
[
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform enableShared crossStageStatic; })
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; })
(callPackage ../common/checksum.nix { inherit langC langCC; })
]

10 changes: 5 additions & 5 deletions pkgs/development/compilers/gcc/4.8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, withoutTargetLibc ? false
, gnused ? null
, buildPackages
, callPackage
Expand Down Expand Up @@ -109,7 +109,7 @@ let majorVersion = "4";

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";

callFile = lib.callPackageWith {
Expand All @@ -135,7 +135,7 @@ let majorVersion = "4";
boehmgc
buildPackages
cloog
crossStageStatic
withoutTargetLibc
enableLTO
enableMultilib
enablePlugin
Expand Down Expand Up @@ -232,7 +232,7 @@ lib.pipe (stdenv.mkDerivation ({
''
else null;

inherit noSysDirs staticCompiler langJava crossStageStatic
inherit noSysDirs staticCompiler langJava withoutTargetLibc
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down Expand Up @@ -323,5 +323,5 @@ lib.pipe (stdenv.mkDerivation ({
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
))
[
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform enableShared crossStageStatic; })
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; })
]
10 changes: 5 additions & 5 deletions pkgs/development/compilers/gcc/4.9/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, withoutTargetLibc ? false
, gnused ? null
, buildPackages
, callPackage
Expand Down Expand Up @@ -126,7 +126,7 @@ let majorVersion = "4";

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";

callFile = lib.callPackageWith {
Expand All @@ -152,7 +152,7 @@ let majorVersion = "4";
boehmgc
buildPackages
cloog
crossStageStatic
withoutTargetLibc
enableLTO
enableMultilib
enablePlugin
Expand Down Expand Up @@ -253,7 +253,7 @@ lib.pipe (stdenv.mkDerivation ({
''
else null;

inherit noSysDirs staticCompiler langJava crossStageStatic
inherit noSysDirs staticCompiler langJava withoutTargetLibc
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down Expand Up @@ -350,5 +350,5 @@ lib.pipe (stdenv.mkDerivation ({
'';}
))
[
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform enableShared crossStageStatic; })
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; })
]
12 changes: 6 additions & 6 deletions pkgs/development/compilers/gcc/6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, withoutTargetLibc ? false
, gnused ? null
, cloog ? null # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
Expand Down Expand Up @@ -78,7 +78,7 @@ let majorVersion = "6";
++ optional langGo ./gogcc-workaround-glibc-2.36.patch

# Obtain latest patch with ../update-mcfgthread-patches.sh
++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch
++ optional (!withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch
++ optional (targetPlatform.libc == "musl" && targetPlatform.isx86_32) (fetchpatch {
url = "https://git.alpinelinux.org/aports/plain/main/gcc/gcc-6.1-musl-libssp.patch?id=5e4b96e23871ee28ef593b439f8c07ca7c7eb5bb";
sha256 = "1jf1ciz4gr49lwyh8knfhw6l5gvfkwzjy90m7qiwkcbsf4a3fqn2";
Expand Down Expand Up @@ -111,7 +111,7 @@ let majorVersion = "6";

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";

callFile = lib.callPackageWith {
Expand All @@ -137,7 +137,7 @@ let majorVersion = "6";
boehmgc
buildPackages
cloog
crossStageStatic
withoutTargetLibc
enableLTO
enableMultilib
enablePlugin
Expand Down Expand Up @@ -269,7 +269,7 @@ lib.pipe (stdenv.mkDerivation ({
))
);

inherit noSysDirs staticCompiler langJava crossStageStatic
inherit noSysDirs staticCompiler langJava withoutTargetLibc
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down Expand Up @@ -368,5 +368,5 @@ lib.pipe (stdenv.mkDerivation ({
'';}
))
[
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform enableShared crossStageStatic; })
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; })
]
12 changes: 6 additions & 6 deletions pkgs/development/compilers/gcc/7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, withoutTargetLibc ? false
, gnused ? null
, cloog ? null # unused; just for compat with gcc4, as we override the parameter on some places
, buildPackages
Expand Down Expand Up @@ -81,13 +81,13 @@ let majorVersion = "7";
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch

# Obtain latest patch with ../update-mcfgthread-patches.sh
++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch
++ optional (!withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch

++ [ ../libsanitizer-no-cyclades-9.patch ];

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";

callFile = lib.callPackageWith {
Expand All @@ -108,7 +108,7 @@ let majorVersion = "7";
binutils
buildPackages
cloog
crossStageStatic
withoutTargetLibc
enableLTO
enableMultilib
enablePlugin
Expand Down Expand Up @@ -218,7 +218,7 @@ lib.pipe (stdenv.mkDerivation ({
)
'';

inherit noSysDirs staticCompiler crossStageStatic
inherit noSysDirs staticCompiler withoutTargetLibc
libcCross crossMingw;

inherit (callFile ../common/dependencies.nix { })
Expand Down Expand Up @@ -302,5 +302,5 @@ lib.pipe (stdenv.mkDerivation ({
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
))
[
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform enableShared crossStageStatic; })
(callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; })
]
Loading

0 comments on commit 443dfc4

Please sign in to comment.