From 8bf0041dc66713c90b626ed890138d87fa7c5555 Mon Sep 17 00:00:00 2001 From: Alex Tunstall Date: Tue, 17 Sep 2024 11:49:48 +0100 Subject: [PATCH] haskell.compiler.ghc9*: fix rpath on aarch64-linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkgs/top-level/haskell-packages.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 2d54063e0074..168a1baaf851 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -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;