diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-06-27 18:43:42 -0700 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2023-07-01 13:12:41 -0700 |
commit | 63305d00d32e8c743e36155a7d8cd544dc676d5b (patch) | |
tree | dce3f1a79070be6900f803f9ac215fb6436c7c7f /pkgs/development/compilers/gcc/10/default.nix | |
parent | 443dfc4b05360794aa0304459177557107274559 (diff) |
gcc: withoutTargetLibc: build libgcc_s.so
We want a `libgcc_s.so` to be built by the first stage cross-compiler (withoutTargetLibc), since that is the compiler which will compile the target libc. This commit accomplishes that, by making three changes: 1. Replacing the `targetPlatform.libc == "msvcrt" &&` conditional with `enableShared`, so that the code which cross-build `libgcc_s.so` is used for all cross compilers capable of emitting shared libraries. 2. Removing the `targetPlatform == hostPlatform` guard from the code which produces the `libgcc` output. 3. Looking for build products in in "lib/${targetPlatform.config}/" rather than "lib/", so we will find them when cross compiling.
Diffstat (limited to 'pkgs/development/compilers/gcc/10/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/10/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index 9f49cc2b91f5c..c61093c67c03a 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -295,5 +295,5 @@ lib.pipe (stdenv.mkDerivation ({ // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } )) [ - (callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc; }) + (callPackage ../common/libgcc.nix { inherit version langC langCC langJit targetPlatform hostPlatform withoutTargetLibc enableShared; }) ] |