Commit 36f5b2e4 authored by Adam Joseph's avatar Adam Joseph Committed by Adam Joseph
Browse files

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.
parent 72c279f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
    ''