From 43bb5f368b3b8188af0109cb3f577054e4bcb117 Mon Sep 17 00:00:00 2001 From: liberodark Date: Wed, 26 Aug 2026 08:40:02 +0200 Subject: [PATCH] haskell.compiler: apply LLVM split sections fix unconditionally --- .../compilers/ghc/common-hadrian.nix | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 51fc88540c9c..d3049455a1d6 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -254,21 +254,14 @@ "sha256-vtjT+TL/7sYPu4rcVV3xCqJQ+uqkyBbf9l0KIi97j/0="; }) ] - ++ - lib.optionals - ( - (stdenv.hostPlatform.isRiscV64 || stdenv.hostPlatform.isLoongArch64) - && lib.versionAtLeast version "9.10" - && lib.versionOlder version "9.12" - ) - [ - # Fix LLVM backend split sections causing bin/out reference cycles: https://gitlab.haskell.org/ghc/ghc/-/issues/26770 - (fetchpatch { - name = "ghc-llvm-fix-split-sections.patch"; - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/b18b2c42c32488ad6d3480a56a1fcd753cad2023.patch"; - hash = "sha256-kEgZARwcdnWcvjuTfyqnn8V1zAUczZN0qiy/1WbCy1s="; - }) - ] + ++ lib.optionals (lib.versionAtLeast version "9.10" && lib.versionOlder version "9.12") [ + # Fix LLVM backend split sections causing bin/out reference cycles: https://gitlab.haskell.org/ghc/ghc/-/issues/26770 + (fetchpatch { + name = "ghc-llvm-fix-split-sections.patch"; + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/b18b2c42c32488ad6d3480a56a1fcd753cad2023.patch"; + hash = "sha256-kEgZARwcdnWcvjuTfyqnn8V1zAUczZN0qiy/1WbCy1s="; + }) + ] ++ lib.optionals (lib.versionOlder version "9.12") [ (fetchpatch { name = "ghc-rts-Fix-compile-on-powerpc64-elf-v1.patch";