summaryrefslogtreecommitdiff
path: root/lang/ghc/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ghc/files')
-rw-r--r--lang/ghc/files/patch-compiler_cbits_genSym.c35
-rw-r--r--lang/ghc/files/patch-hadrian_hadrian.cabal15
-rw-r--r--lang/ghc/files/patch-hadrian_src_Hadrian_Haskell_Cabal_Parse.hs13
3 files changed, 35 insertions, 28 deletions
diff --git a/lang/ghc/files/patch-compiler_cbits_genSym.c b/lang/ghc/files/patch-compiler_cbits_genSym.c
new file mode 100644
index 000000000000..bd1329e01483
--- /dev/null
+++ b/lang/ghc/files/patch-compiler_cbits_genSym.c
@@ -0,0 +1,35 @@
+From a7402f4129e1137b1d729b1aedeb1508881c9eff Mon Sep 17 00:00:00 2001
+From: Ben Gamari <ben@well-typed.com>
+Date: Tue, 17 Dec 2024 11:48:52 -0500
+Subject: [PATCH] compiler: Fix CPP guards around ghc_unique_counter64
+
+The `ghc_unique_counter64` symbol was introduced in the RTS in the
+64-bit unique refactor (!10568) which has been backported to %9.6.7 and
+%9.8.4. Update the CPP to reflect this.
+
+Fixes #25576.
+
+(cherry picked from commit 595013d41464c1e328369bb81ce0ea2814e91b68)
+--- compiler/cbits/genSym.c.orig 2024-11-27 22:03:56 UTC
++++ compiler/cbits/genSym.c
+@@ -9,7 +9,19 @@
+ //
+ // The CPP is thus about the RTS version GHC is linked against, and not the
+ // version of the GHC being built.
+-#if !MIN_VERSION_GLASGOW_HASKELL(9,8,4,0)
++
++#if MIN_VERSION_GLASGOW_HASKELL(9,9,0,0)
++// Unique64 patch was present in 9.10 and later
++#define HAVE_UNIQUE64 1
++#elif !MIN_VERSION_GLASGOW_HASKELL(9,9,0,0) && MIN_VERSION_GLASGOW_HASKELL(9,8,4,0)
++// Unique64 patch was backported to 9.8.4
++#define HAVE_UNIQUE64 1
++#elif !MIN_VERSION_GLASGOW_HASKELL(9,7,0,0) && MIN_VERSION_GLASGOW_HASKELL(9,6,7,0)
++// Unique64 patch was backported to 9.6.7
++#define HAVE_UNIQUE64 1
++#endif
++
++#if !defined(HAVE_UNIQUE64)
+ HsWord64 ghc_unique_counter64 = 0;
+ #endif
+ #if !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0)
diff --git a/lang/ghc/files/patch-hadrian_hadrian.cabal b/lang/ghc/files/patch-hadrian_hadrian.cabal
deleted file mode 100644
index 7994110951d4..000000000000
--- a/lang/ghc/files/patch-hadrian_hadrian.cabal
+++ /dev/null
@@ -1,15 +0,0 @@
-Hack the bounds to avoid re-rolling the bootstrap compiler.
-The bound was added due to https://gitlab.haskell.org/ghc/ghc/-/issues/24382
-but we somehow doesn't seem to be affected by this
-
---- hadrian/hadrian.cabal.orig 2025-03-02 13:05:33 UTC
-+++ hadrian/hadrian.cabal
-@@ -155,7 +155,7 @@ executable hadrian
- , containers >= 0.5 && < 0.7
- -- N.B. directory >=1.3.9 as earlier versions are
- -- afflicted by #24382.
-- , directory >= 1.3.9.0 && < 1.4
-+ , directory < 1.4
- , extra >= 1.4.7
- , filepath
- , time
diff --git a/lang/ghc/files/patch-hadrian_src_Hadrian_Haskell_Cabal_Parse.hs b/lang/ghc/files/patch-hadrian_src_Hadrian_Haskell_Cabal_Parse.hs
deleted file mode 100644
index 528e592425f4..000000000000
--- a/lang/ghc/files/patch-hadrian_src_Hadrian_Haskell_Cabal_Parse.hs
+++ /dev/null
@@ -1,13 +0,0 @@
---- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs.orig 2025-03-02 13:05:33 UTC
-+++ hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
-@@ -321,8 +321,8 @@ write_inplace_conf pkg_path res_path pd lbi = do
- pkg_name = C.display (C.pkgName (CP.sourcePackageId installedPkgInfo))
- final_ipi = installedPkgInfo {
- Installed.includeDirs = concatMap fixupIncludeDir (Installed.includeDirs installedPkgInfo),
-- Installed.libraryDirs = [ build_dir ],
-- Installed.libraryDynDirs = [ build_dir ],
-+ Installed.libraryDirs = [ build_dir ] ++ Installed.libraryDirs installedPkgInfo,
-+ Installed.libraryDynDirs = [ build_dir ] ++ Installed.libraryDynDirs installedPkgInfo,
- Installed.dataDir = "${pkgroot}/../../../../" ++ pkg_path,
- Installed.haddockHTMLs = [build_dir ++ "/doc/html/" ++ C.display (CP.sourcePackageId installedPkgInfo)],
- Installed.haddockInterfaces = [build_dir ++ "/doc/html/" ++ pkg_name ++ "/" ++ pkg_name ++ ".haddock"],