Skip to content

Commit

Permalink
stage.nix: revert deletion of gcc.abi="elfv2" from 82ff1f5
Browse files Browse the repository at this point in the history
Commit 82ff1f5 in #182807 removed two lines
from stage.nix which were responsible for making sure the `gcc` for `pkgsStatic`
on powerpc64 was built with the `--with-abi=elfv2` flag.

Unfortunately this causes build failures for `pkgsCross.ppc64.pkgsStatic`, as
reported here:

  #182807 (comment)

This commit reverts the deletion.

Unfortunately ugly kludges like this are necessary because nixpkgs'
`lib/systems/` doesn't understand the difference between a libc and an abi.  So
we have no clean way to tell nixpkgs "musl on big-endian powerpc64 always uses
the ELFv2 ABI" -- it thinks that musl is an ABI.  Until that gets fixed there is
no better way to add the flag.
  • Loading branch information
Adam Joseph authored and Mindavi committed Sep 27, 2022
1 parent fe410ce commit 33bc076
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/top-level/stage.nix
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ let
crossSystem = {
isStatic = true;
parsed = makeMuslParsedPlatform stdenv.hostPlatform.parsed;
} // lib.optionalAttrs (stdenv.hostPlatform.system == "powerpc64-linux") {
gcc.abi = "elfv2";
};
});
};
Expand Down

0 comments on commit 33bc076

Please sign in to comment.