[Git][ghc/ghc][ghc-9.8] compiler: Fix CPP guards around ghc_unique_counter64
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Thu Feb 6 18:59:00 UTC 2025
Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC
Commits:
189a368b by Ben Gamari at 2025-02-06T10:32:27+01:00
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 63d74f4d15ecaa8d711bd12fa64f77fce72b5f79)
- - - - -
1 changed file:
- compiler/cbits/genSym.c
Changes:
=====================================
compiler/cbits/genSym.c
=====================================
@@ -9,11 +9,20 @@
//
// 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)
-HsWord64 ghc_unique_counter64 = 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 !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0)
-HsInt ghc_unique_inc = 1;
+
+#if !defined(HAVE_UNIQUE64)
+HsWord64 ghc_unique_counter64 = 0;
#endif
// This function has been added to the RTS. Here we pessimistically assume
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/189a368ba74dbfe8a6e832fe0f9ffe56cd565824
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/189a368ba74dbfe8a6e832fe0f9ffe56cd565824
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250206/b6ffc228/attachment-0001.html>
More information about the ghc-commits
mailing list