haskell.compiler.ghc9*: fix rpath on aarch64-linux

In #339272, an elusive regression was found where the stage 2 binaries
held a reference to the boot compiler in their rpath. This issue only
affected GHC 9.6 versions built on aarch64-linux.

For still unknown reason, this issue goes away when using a source built
GHC instead of the binary GHC we derive from upstream's bindists.
Knowing more would be great, obviously, but at least this issue goes
away with GHC 9.8.*…

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
This commit is contained in:
Alex Tunstall 2024-09-17 11:49:48 +01:00 committed by sternenseemann
parent 6c00c676f1
commit 8bf0041dc6

View File

@ -270,6 +270,11 @@ in {
bb.packages.ghc928
else if stdenv.buildPlatform.isPower64 && stdenv.buildPlatform.isLittleEndian then
bb.packages.ghc928
else if stdenv.buildPlatform.isAarch64 && stdenv.buildPlatform.isLinux then
# For unknown reasons, compiling with a bindist GHC causes the final
# GHC's rpaths to contain the boot compiler on aarch64-linux / GHC 9.6.*.
# Note: Unclear if this is due to host or build aarch64-linux.
bb.packages.ghc928
else
bb.packages.ghc924Binary;
inherit (buildPackages.python3Packages) sphinx;
@ -288,6 +293,11 @@ in {
bb.packages.ghc928
else if stdenv.buildPlatform.isPower64 && stdenv.buildPlatform.isLittleEndian then
bb.packages.ghc928
else if stdenv.buildPlatform.isAarch64 && stdenv.buildPlatform.isLinux then
# For unknown reasons, compiling with a bindist GHC causes the final
# GHC's rpaths to contain the boot compiler on aarch64-linux / GHC 9.6.*.
# Note: Unclear if this is due to host or build aarch64-linux.
bb.packages.ghc928
else
bb.packages.ghc924Binary;
inherit (buildPackages.python3Packages) sphinx;
@ -306,6 +316,11 @@ in {
bb.packages.ghc928
else if stdenv.buildPlatform.isPower64 && stdenv.buildPlatform.isLittleEndian then
bb.packages.ghc928
else if stdenv.buildPlatform.isAarch64 && stdenv.buildPlatform.isLinux then
# For unknown reasons, compiling with a bindist GHC causes the final
# GHC's rpaths to contain the boot compiler on aarch64-linux / GHC 9.6.*.
# Note: Unclear if this is due to host or build aarch64-linux.
bb.packages.ghc928
else
bb.packages.ghc924Binary;
inherit (buildPackages.python3Packages) sphinx;
@ -324,6 +339,11 @@ in {
bb.packages.ghc928
else if stdenv.buildPlatform.isPower64 && stdenv.buildPlatform.isLittleEndian then
bb.packages.ghc928
else if stdenv.buildPlatform.isAarch64 && stdenv.buildPlatform.isLinux then
# For unknown reasons, compiling with a bindist GHC causes the final
# GHC's rpaths to contain the boot compiler on aarch64-linux / GHC 9.6.*.
# Note: Unclear if this is due to host or build aarch64-linux.
bb.packages.ghc928
else
bb.packages.ghc924Binary;
inherit (buildPackages.python3Packages) sphinx;