about summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-11-02 02:06:50 -0700
committerAdam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>2023-11-04 05:58:23 +0000
commit36f5b2e42b98688dea8b494ae02f3a09d73f54de (patch)
tree4b9d17dda7ab69606ffd4862f2c82a5e526e55a5 /pkgs/development/compilers/gcc
parent72c279f477f42f66cf7013d5a01762d32d215bff (diff)
downloadnixlib-36f5b2e42b98688dea8b494ae02f3a09d73f54de.tar
nixlib-36f5b2e42b98688dea8b494ae02f3a09d73f54de.tar.gz
nixlib-36f5b2e42b98688dea8b494ae02f3a09d73f54de.tar.bz2
nixlib-36f5b2e42b98688dea8b494ae02f3a09d73f54de.tar.lz
nixlib-36f5b2e42b98688dea8b494ae02f3a09d73f54de.tar.xz
nixlib-36f5b2e42b98688dea8b494ae02f3a09d73f54de.tar.zst
nixlib-36f5b2e42b98688dea8b494ae02f3a09d73f54de.zip
gcc.libgcc: compare host and target platforms, rathern than their triples
The rest of our gcc expression prepends "${targetPlatform.config}-"
to paths and binaries if `hostPlatform!=targetPlatform`.  The
`libgcc.nix` expression was using
'hostPlatform.config!=targetPlatform.config`, which caused it to
look in the wrong place when moving files.  This commit corrects that.
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r--pkgs/development/compilers/gcc/common/libgcc.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/compilers/gcc/common/libgcc.nix b/pkgs/development/compilers/gcc/common/libgcc.nix
index f3bf14e36f7e..c8342ae90054 100644
--- a/pkgs/development/compilers/gcc/common/libgcc.nix
+++ b/pkgs/development/compilers/gcc/common/libgcc.nix
@@ -36,7 +36,7 @@ lib.optionals (lib.versionAtLeast version "11.0")
 
 (let
   targetPlatformSlash =
-    if hostPlatform.config == targetPlatform.config
+    if hostPlatform == targetPlatform
     then ""
     else "${targetPlatform.config}/";
 
@@ -83,7 +83,7 @@ in
     lib.optionalString (!langC) ''
       rm -f $out/lib/libgcc_s.so*
     ''
-    + lib.optionalString (hostPlatform.config != targetPlatform.config) ''
+    + lib.optionalString (hostPlatform != targetPlatform) ''
       mkdir -p $lib/lib/
       ln -s ${targetPlatformSlash}lib $lib/lib
     ''