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.
This commit is contained in:
Adam Joseph 2023-11-02 02:06:50 -07:00 committed by Adam Joseph
parent 72c279f477
commit 36f5b2e42b

View File

@ -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
''