pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/ghc98



Module Name:    pkgsrc
Committed By:   pho
Date:           Mon Jan 27 15:08:08 UTC 2025

Modified Files:
        pkgsrc/lang/ghc98: Makefile bootstrap.mk distinfo
        pkgsrc/lang/ghc98/patches: patch-hadrian_bootstrap_bootstrap.py
            patch-hadrian_src_Settings_Packages.hs
Added Files:
        pkgsrc/lang/ghc98/files: hadrian-extra.patch hadrian-hashable.patch
            hadrian-splitmix.patch
        pkgsrc/lang/ghc98/patches: patch-distrib_configure.ac.in
            patch-hadrian_hadrian.cabal
            patch-hadrian_src_Settings_Builders_Cabal.hs
            patch-linters_lint-commit-msg_lint-commit-msg.cabal
            patch-linters_lint-submodule-refs_lint-submodule-refs.cabal
            patch-linters_lint-whitespace_lint-whitespace.cabal
            patch-linters_linters-common_linters-common.cabal
Removed Files:
        pkgsrc/lang/ghc98/patches: patch-m4_fp__find__cxx__std__lib.m4

Log Message:
lang/ghc98: Replace bootkits with GHC 9.8.2

NFCI where they work. The resulting compiler produces the same binary as
before so recursive revbump is not required. This is actually a rework of
my previous changes that I had to revert.

Replacing them with 9.8.x is necessary for the upcoming GHC 9.10. I'm going
to import lang/ghc910, update every Haskell package in pkgsrc, then switch
the default compiler after that.

As a bonus this also contains a fix for one of the long-standing issues on
Darwin: GHC was failing to build any Haskell packages that contain C++
code. This affected security/hs-digest and therefore Pandoc too.

Note that GHC 9.8.2 is going to be the last version that supports
FreeBSD/i386. The upstream has apparently stopped caring about i386
platforms and I'm already seeing several signs of it bitrotting away. In
fact ghci, the REPL for GHC, has already stopped working for years, because
it immediately segfaults by exhausting the ridiculously small stack space
of i386. But I have received zero complaints so far which probably means we
can just let it go.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/ghc98/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/ghc98/bootstrap.mk
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/ghc98/distinfo
cvs rdiff -u -r0 -r1.3 pkgsrc/lang/ghc98/files/hadrian-extra.patch \
    pkgsrc/lang/ghc98/files/hadrian-hashable.patch \
    pkgsrc/lang/ghc98/files/hadrian-splitmix.patch
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/lang/ghc98/patches/patch-distrib_configure.ac.in \
    pkgsrc/lang/ghc98/patches/patch-hadrian_hadrian.cabal \
    pkgsrc/lang/ghc98/patches/patch-linters_lint-commit-msg_lint-commit-msg.cabal \
    pkgsrc/lang/ghc98/patches/patch-linters_lint-submodule-refs_lint-submodule-refs.cabal \
    pkgsrc/lang/ghc98/patches/patch-linters_lint-whitespace_lint-whitespace.cabal \
    pkgsrc/lang/ghc98/patches/patch-linters_linters-common_linters-common.cabal
cvs rdiff -u -r1.6 -r1.7 \
    pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Builders_Cabal.hs
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Packages.hs
cvs rdiff -u -r1.4 -r0 \
    pkgsrc/lang/ghc98/patches/patch-m4_fp__find__cxx__std__lib.m4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/ghc98/Makefile
diff -u pkgsrc/lang/ghc98/Makefile:1.8 pkgsrc/lang/ghc98/Makefile:1.9
--- pkgsrc/lang/ghc98/Makefile:1.8      Wed Jan  8 14:51:06 2025
+++ pkgsrc/lang/ghc98/Makefile  Mon Jan 27 15:08:07 2025
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.8 2025/01/08 14:51:06 pho Exp $
+# $NetBSD: Makefile,v 1.9 2025/01/27 15:08:07 pho Exp $
 # -----------------------------------------------------------------------------
 # Package metadata
 #
 DISTNAME=      ghc-9.8.2-src
 PKGNAME=       ${DISTNAME:S/-src$//}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    lang
 MASTER_SITES=  https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
 EXTRACT_SUFX=  .tar.xz
@@ -139,13 +139,6 @@ HADRIAN_ARGS+=     "*.unlit.ghc.c.opts += -f
 HADRIAN_ARGS+= "*.unlit.ghc.link.opts += -pie"
 .endif
 
-# MacOS X 10.7 is the oldest OS X version supporting __thread. Although
-# ${WRKSRC}/configure has a check for it, the actual build will fail
-# without this env.
-.if ${OPSYS} == "Darwin"
-ALL_ENV+=      MACOSX_DEPLOYMENT_TARGET="10.7"
-.endif
-
 
 # -----------------------------------------------------------------------------
 # Security

Index: pkgsrc/lang/ghc98/bootstrap.mk
diff -u pkgsrc/lang/ghc98/bootstrap.mk:1.9 pkgsrc/lang/ghc98/bootstrap.mk:1.10
--- pkgsrc/lang/ghc98/bootstrap.mk:1.9  Sun Jan 12 19:06:27 2025
+++ pkgsrc/lang/ghc98/bootstrap.mk      Mon Jan 27 15:08:07 2025
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.9 2025/01/12 19:06:27 pho Exp $
+# $NetBSD: bootstrap.mk,v 1.10 2025/01/27 15:08:07 pho Exp $
 # -----------------------------------------------------------------------------
 # Select a bindist of bootstrapping compiler on a per-platform basis. See
 # ./files/BOOTSTRAP.md for details.
@@ -35,47 +35,50 @@ HADRIAN_BOOT_SOURCE=        ghc-${BOOT_VERSION}
 # one. [2024-04-27; pho]
 
 .if ${MACHINE_PLATFORM:MDarwin-*-aarch64} || make(distinfo) || make (makesum) || make(mdi)
-BOOT_VERSION:= 9.4.7
+BOOT_VERSION:= 9.8.2
 BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-aarch64-apple-darwin.tar.xz
 DISTFILES:=    ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE} # Available in LOCAL_PORTS
 .endif
 
 .if ${MACHINE_PLATFORM:MDarwin-*-x86_64} || make(distinfo) || make (makesum) || make(mdi)
-BOOT_VERSION:= 9.4.7
+BOOT_VERSION:= 9.8.2
 BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-apple-darwin.tar.xz
 DISTFILES:=    ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE} # Available in LOCAL_PORTS
 .endif
 
 .if ${MACHINE_PLATFORM:MFreeBSD-*-i386} || make(distinfo) || make (makesum) || make(mdi)
-BOOT_VERSION:= 9.4.7
+BOOT_VERSION:= 9.8.2
 BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-i386-unknown-freebsd.tar.xz
 DISTFILES:=    ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE} # Available in LOCAL_PORTS
 .endif
 
 .if ${MACHINE_PLATFORM:MFreeBSD-*-x86_64} || make(distinfo) || make(makesum) || make(mdi)
-BOOT_VERSION:= 9.4.7
+BOOT_VERSION:= 9.8.2
 BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-unknown-freebsd.tar.xz
 DISTFILES:=    ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE} # Available in LOCAL_PORTS
 .endif
 
 .if ${MACHINE_PLATFORM:MNetBSD-*-aarch64} || make(distinfo) || make(makesum) || make(mdi)
-# Cross-compiled from x86_64 on a QEMU guest. It took days to compile...
-BOOT_VERSION:= 9.4.7
+BOOT_VERSION:= 9.8.2
 BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-aarch64-unknown-netbsd.tar.xz
 DISTFILES:=    ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE} # Available in LOCAL_PORTS
 .endif
 
 .if ${MACHINE_PLATFORM:MNetBSD-*-x86_64} || make(distinfo) || make(makesum) || make(mdi)
-BOOT_VERSION:= 9.4.7
+BOOT_VERSION:= 9.8.2
 BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-unknown-netbsd.tar.xz
 DISTFILES:=    ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE} # Available in LOCAL_PORTS
 .endif
 
 .if ${MACHINE_PLATFORM:MSunOS-*-x86_64} || make(distinfo) || make (makesum) || make(mdi)
-BOOT_VERSION:=         9.4.7
+BOOT_VERSION:=         9.8.2
 BOOT_ARCHIVE:=         ghc-${BOOT_VERSION}-boot-x86_64-unknown-solaris2.tar.xz
-SITES.${BOOT_ARCHIVE}= https://us-central.manta.mnx.io/pkgsrc/public/pkg-bootstraps/
-DISTFILES:=            ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE} # Available in LOCAL_PORTS
+#
+# Build on OmniOS r151052 and available in LOCAL_PORTS. jperkin@, maybe you
+# want to replace it with something else? [2025-01-27; pho]
+#
+#SITES.${BOOT_ARCHIVE}=        https://us-central.manta.mnx.io/pkgsrc/public/pkg-bootstraps/
+DISTFILES:=            ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE}
 .endif
 
 # DISTFILES contains duplicate HADRIAN_BOOT_SOURCE entries at this
@@ -134,10 +137,16 @@ pre-configure:
 # RTS even if it doesn't. Note that GHC devs are in the process of moving
 # the settings file from being generated by configure, to being generated
 # by the build system. This workaround is expected to go away in the
-# (hopefully near) future.
+# (hopefully near) future. config.mk.in is in the top-level directory since
+# 9.8.2. It was previously in mk/.
        ${RUN}cd ${WRKDIR}/bootkit-dist/${BOOT_ARCHIVE_TOP_DIR} && \
-               ${SED} -e '/^GhcRTSWays/d' < mk/config.mk.in > mk/config.mk.in.tmp && \
-               ${MV} -f mk/config.mk.in.tmp mk/config.mk.in
+               if ${TEST} -f config.mk.in; then \
+                       fp="config.mk.in"; \
+               else \
+                       fp="mk/config.mk.in"; \
+               fi; \
+               ${SED} -e '/^GhcRTSWays/d' < "$${fp}" > "$${fp}.tmp" && \
+               ${MV} -f "$${fp}.tmp" "$${fp}"
 # </kludge>
        ${RUN}cd ${WRKDIR}/bootkit-dist/${BOOT_ARCHIVE_TOP_DIR} && \
                ${PKGSRC_SETENV} ${CONFIGURE_ENV} ${SH} ./configure \
@@ -207,6 +216,15 @@ HADRIAN_CMD=       ${PKGSRC_SET_ENV} ${ALL_ENV
 LDFLAGS+=      -static-libgcc
 .endif
 
+# MacOS X 10.7 is the oldest macOS version supporting __thread. Although
+# ${WRKSRC}/configure has a check for it, the actual build will fail
+# without this env. However, setting it to "10.7" will fail if the SDK is
+# installed via "xcode-select --install" for an unknown reason. "10.9"
+# seems to work. Don't ask why.
+.if make(bootstrap) && ${OPSYS} == "Darwin"
+MACOSX_DEPLOYMENT_TARGET:=     10.9
+.endif
+
 # Gather information about packages on which bootkit depends. It will be
 # used in the post-bootstrap phase.
 BOOT_GHC_DEPS:=                curses iconv

Index: pkgsrc/lang/ghc98/distinfo
diff -u pkgsrc/lang/ghc98/distinfo:1.15 pkgsrc/lang/ghc98/distinfo:1.16
--- pkgsrc/lang/ghc98/distinfo:1.15     Sun Jan 12 19:06:27 2025
+++ pkgsrc/lang/ghc98/distinfo  Mon Jan 27 15:08:07 2025
@@ -1,42 +1,45 @@
-$NetBSD: distinfo,v 1.15 2025/01/12 19:06:27 pho Exp $
+$NetBSD: distinfo,v 1.16 2025/01/27 15:08:07 pho Exp $
 
-BLAKE2s (ghc-9.4.7-boot-aarch64-apple-darwin.tar.xz) = c771cfa45f5635bdf8175775cf7a67c9541bd5b4d4927ed9b5189e3dcefcd2ba
-SHA512 (ghc-9.4.7-boot-aarch64-apple-darwin.tar.xz) = 3d50e4c6605ebfa7eef018d3e9e11e8115cf2f97e24a5adfc05fd1bab152c726e240f9a213d73e220dc7fc5b9358df74eee0d4cb1b77bd5491f28899c831b1a4
-Size (ghc-9.4.7-boot-aarch64-apple-darwin.tar.xz) = 109805384 bytes
-BLAKE2s (ghc-9.4.7-boot-aarch64-unknown-netbsd.tar.xz) = a691117b405b9f7954b954acc382b3357a9ff8c98151514c82d18d83da397940
-SHA512 (ghc-9.4.7-boot-aarch64-unknown-netbsd.tar.xz) = 1c917a52a020be3a1878f9d7e8e4c47d31180e54248c127a60706c1053a95b2d8a487f79e7fb5daa725178f271a7cc17e4e7b47ce2119f8546e259c63b9864d8
-Size (ghc-9.4.7-boot-aarch64-unknown-netbsd.tar.xz) = 90305900 bytes
-BLAKE2s (ghc-9.4.7-boot-hadrian-ghc9.8.tar.gz) = ac74fdc6f8a5d4a75bda0c6501902c2c160d3780b41b739129b5a36773c295cd
-SHA512 (ghc-9.4.7-boot-hadrian-ghc9.8.tar.gz) = e086a40eb6b655fcb22744a32247ab596adf649179681d6203514d66cbc0989e6b59430de5f02e18419b27584e2dbac5a418fb40f66bcdc76e8776d1e315a332
-Size (ghc-9.4.7-boot-hadrian-ghc9.8.tar.gz) = 1527081 bytes
-BLAKE2s (ghc-9.4.7-boot-i386-unknown-freebsd.tar.xz) = f81c97f117156e8d4f1e7cec33a0e969a78ff1be7c9a5ebf212b9e521c1c23f4
-SHA512 (ghc-9.4.7-boot-i386-unknown-freebsd.tar.xz) = b32a9d4c6423cd858dcbd4f07e68d3ef49b879323b9eee36c6495574e15881ea70ff2aa3c02897165d6d9872693f4ee11c4fe86b613b49a7864ca4730ebbc865
-Size (ghc-9.4.7-boot-i386-unknown-freebsd.tar.xz) = 78875476 bytes
-BLAKE2s (ghc-9.4.7-boot-x86_64-apple-darwin.tar.xz) = 2ee9f0deb331b7ac3fbbb8dd6acb595b23329bfc3ee95c16faf9dba378f11525
-SHA512 (ghc-9.4.7-boot-x86_64-apple-darwin.tar.xz) = 5abedf9427a73b229beffdd6b1085bb11db100e7222b1e66b46a2cce72235d9c0152c4fd5c433676b3e132db277adf9f6a4267e60fcf48d1902ba50dbac81fa5
-Size (ghc-9.4.7-boot-x86_64-apple-darwin.tar.xz) = 111036360 bytes
-BLAKE2s (ghc-9.4.7-boot-x86_64-unknown-freebsd.tar.xz) = 9356f28874c23beb64472241f301079b66ad0de010af186c75c5f05d7df91206
-SHA512 (ghc-9.4.7-boot-x86_64-unknown-freebsd.tar.xz) = b40be23acea89133d2ec5049b920d3de9585c5cef7913a3b15623a00fa34f1ef51aafc33e7294b031621bcde2f3996c9a8c43f1b0f680903bbf1b1ba48e107fb
-Size (ghc-9.4.7-boot-x86_64-unknown-freebsd.tar.xz) = 77145928 bytes
-BLAKE2s (ghc-9.4.7-boot-x86_64-unknown-netbsd.tar.xz) = b920b6b54f5c1c6ab5fcbad14298ae742942e14da8105831df535926b9b9f529
-SHA512 (ghc-9.4.7-boot-x86_64-unknown-netbsd.tar.xz) = 4821dbf8f50c42a3427322c7488a07738d41da2236102571fc3051fd4d41a7a75754a1b27769365fc7f9d01ba0af65b87e51933077b3c36c2084ee3053479040
-Size (ghc-9.4.7-boot-x86_64-unknown-netbsd.tar.xz) = 77029664 bytes
-BLAKE2s (ghc-9.4.7-boot-x86_64-unknown-solaris2.tar.xz) = 82abea5431d6d106c7eb4388c196594a050446f8164aecd5c76e263a96114a03
-SHA512 (ghc-9.4.7-boot-x86_64-unknown-solaris2.tar.xz) = c6dd73fce67dd8a4933a7f31318af662bc3fd873e3d96fa6aa2e0c72282c554cc2e13abdecc29919231c3cf346d878f5f738bb72f2db53d63dd79bf07a1e2d91
-Size (ghc-9.4.7-boot-x86_64-unknown-solaris2.tar.xz) = 128747936 bytes
+BLAKE2s (ghc-9.8.2-boot-aarch64-apple-darwin.tar.xz) = 45867db56f03b0c25a13f034dd3eca3a91cc1b031790e457a55f599b023827ba
+SHA512 (ghc-9.8.2-boot-aarch64-apple-darwin.tar.xz) = c9b8717b0e37fd7c0fcff4f3dac603673fabe235bc8257cc24200ca926b7d2a226f656b8ffd13c1e6c0260f73a162d81b19a4f866b7c34d1ea54cdddef3aa406
+Size (ghc-9.8.2-boot-aarch64-apple-darwin.tar.xz) = 119596964 bytes
+BLAKE2s (ghc-9.8.2-boot-aarch64-unknown-netbsd.tar.xz) = 8595c7115a7c7d131c16806fbb7156de3595ae35122db0a95bb9d525fd80a5ee
+SHA512 (ghc-9.8.2-boot-aarch64-unknown-netbsd.tar.xz) = 6ae7c3a75b5794aa3ab890ad29f575754f6c0b674f7f7111255018ace0f7c07610ce5bb5687fdfde371a024322de35fea6d5248ba02ab47ba235a6a8b5e9d8ae
+Size (ghc-9.8.2-boot-aarch64-unknown-netbsd.tar.xz) = 91507768 bytes
+BLAKE2s (ghc-9.8.2-boot-hadrian-ghc9.8.tar.gz) = 054f11f3e443c5c4c88bc14690983c83a9fb14eac95d3da885fe59bbc698ca90
+SHA512 (ghc-9.8.2-boot-hadrian-ghc9.8.tar.gz) = 9b8a28041bf08e79064cc7e275b35fdc1c76766081e7c26c589e08df21aeadfcebab560320c6132177b5aafd887cd071c4b37263e9763ade2900c0689f5e9a4e
+Size (ghc-9.8.2-boot-hadrian-ghc9.8.tar.gz) = 1528222 bytes
+BLAKE2s (ghc-9.8.2-boot-i386-unknown-freebsd.tar.xz) = 7e67d0277b2375024c59243533e9abd05fed5f291bb1e650c6b51ad15882b6e3
+SHA512 (ghc-9.8.2-boot-i386-unknown-freebsd.tar.xz) = eb8fbf004ddd43ee503ae7987be66afe79a15954733bb6d2aae16b281f1436b200d392eefc57571463d0a90f5ae80505b8bb2841cc28b69309d9b8653f3ab4a7
+Size (ghc-9.8.2-boot-i386-unknown-freebsd.tar.xz) = 83193744 bytes
+BLAKE2s (ghc-9.8.2-boot-x86_64-apple-darwin.tar.xz) = fce50342032195058f3d873dabf6ca1a19a3ae0f7f24895af0d07edbfbb1c724
+SHA512 (ghc-9.8.2-boot-x86_64-apple-darwin.tar.xz) = 3c18ddb7217da9158b7623bc7360cbb12326de3c94301a989cbf866801cbad7058002a2c6769c533e56293cd798e9e8cdfe337472af8f4c7ce039d4d1610721d
+Size (ghc-9.8.2-boot-x86_64-apple-darwin.tar.xz) = 94933928 bytes
+BLAKE2s (ghc-9.8.2-boot-x86_64-unknown-freebsd.tar.xz) = 895b6f58f9ce70a82d6b4dcda597a69585c9a9d2898388b80d70a9dea33ba5b5
+SHA512 (ghc-9.8.2-boot-x86_64-unknown-freebsd.tar.xz) = 3369a16cfbf7fc42b1e69f4ebd47898957347caff011896f2574bf13dc77c1acf36871fb359fcc29baf6c82b1d190cbaeb64677e45782a1556311388cff912a5
+Size (ghc-9.8.2-boot-x86_64-unknown-freebsd.tar.xz) = 82557688 bytes
+BLAKE2s (ghc-9.8.2-boot-x86_64-unknown-netbsd.tar.xz) = cf656c857a5e6ea72a28291bb54f6f8178a49fb78d34e765f6615103a52485ed
+SHA512 (ghc-9.8.2-boot-x86_64-unknown-netbsd.tar.xz) = 18ac3925870d97017d6cc53a791798ae54ecc9b1281184ccdb75fae5dc138da3f024eaedb14355a5c31777a3a1bc339e0bfb53a390cb78a3bc9dcfd7df261270
+Size (ghc-9.8.2-boot-x86_64-unknown-netbsd.tar.xz) = 78498024 bytes
+BLAKE2s (ghc-9.8.2-boot-x86_64-unknown-solaris2.tar.xz) = 819787068e68d3b31cc78ab9147f72816228ab8f9c1a19d97fc15ca133e72ec6
+SHA512 (ghc-9.8.2-boot-x86_64-unknown-solaris2.tar.xz) = 09bd263b97ee027cebc6cc31c30dd1a518726823bbed798451feea33da584a7e6dac7ea385681254b1706d885bd6ee7ed3b2c5c005d769292eff62d9a004d714
+Size (ghc-9.8.2-boot-x86_64-unknown-solaris2.tar.xz) = 102072500 bytes
 BLAKE2s (ghc-9.8.2-src.tar.xz) = 4d903dc828e46d12ad4dc8be912e2996666351ecf8b7a5e1c85790f1fb7eaa5a
 SHA512 (ghc-9.8.2-src.tar.xz) = 9b677d5ead5ebb5df7bc960055a76ef00e68ed8102844997b12154bf71bdbfafdfff9ca31edce86b3df759242a7c98f52a464887973b53985f54ecd9fc4b4627
 Size (ghc-9.8.2-src.tar.xz) = 32432564 bytes
 SHA1 (patch-compiler_GHC_Driver_Pipeline_Execute.hs) = 8a86aabddfa4cc5dcff3bb9812010696fb6a16df
 SHA1 (patch-compiler_GHC_SysTools_Process.hs) = ceb26657516e207e22d555ec6f87f735344b0d08
 SHA1 (patch-configure.ac) = 985482ae70830ddbf1334c9c82a2cec78a34bb4c
+SHA1 (patch-distrib_configure.ac.in) = 14f60847c3d17e831d23846fd3cb11bd8f0228b2
 SHA1 (patch-hadrian_bindist_Makefile) = 3a91d56be4f1b59c6534eceb5b1a4f8e86d49c68
-SHA1 (patch-hadrian_bootstrap_bootstrap.py) = bf96af392612aad143373f628dcbd3345b83eee7
+SHA1 (patch-hadrian_bootstrap_bootstrap.py) = acbb67f77bb3e75bc7c1aef4c1769839d1f60c8e
 SHA1 (patch-hadrian_bootstrap_src_Main.hs) = 2e0a7ae2ef195013ca07313c150a7e48b6985e32
+SHA1 (patch-hadrian_hadrian.cabal) = c1b41c7ea96afb6f64d6a1043ef5d302dba49a77
 SHA1 (patch-hadrian_src_Builder.hs) = bbfb1ddc30af900c89ca3cf649a32da2a1c83174
 SHA1 (patch-hadrian_src_Rules_BinaryDist.hs) = fb908f74b8b619bccd673fbdb40b1c53ab7a51d8
+SHA1 (patch-hadrian_src_Settings_Builders_Cabal.hs) = a9ec9cd9b1080612261587c00bfc1b2bdf6022be
 SHA1 (patch-hadrian_src_Settings_Builders_Ghc.hs) = e2913e9f83bb36bb0b432a24518c9b6ca2990c6a
-SHA1 (patch-hadrian_src_Settings_Packages.hs) = f21f801727cf5889c3b41e88beb33290a4cc1574
+SHA1 (patch-hadrian_src_Settings_Packages.hs) = c543ebdcd3b71edacdf4c843462494b0ccc2c8e6
 SHA1 (patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs) = 9e6028dd6ffc2d3c71493fbb7336adcec9f08f78
 SHA1 (patch-libraries_Cabal_Cabal_src_Distribution_Simple_Register.hs) = adbb8fe40fc1a0e4afa7cd4bfb1c32b08ab73f15
 SHA1 (patch-libraries_base_GHC_Event_KQueue.hsc) = 8ee5da667a241a05fde3c580d3dc9bdc05aa5f00
@@ -53,7 +56,10 @@ SHA1 (patch-libraries_unix_System_Posix_
 SHA1 (patch-libraries_unix_System_Posix_Signals.hsc) = ee59a04571881382bcfd9fc82bf196ff86a40ed5
 SHA1 (patch-libraries_unix_System_Posix_User.hsc) = b583f591838fe2d7f42241787e02c5385d336939
 SHA1 (patch-libraries_unix_System_Posix_User_ByteString.hsc) = 2a331de2292835ae6904980facd8201705fa63e8
-SHA1 (patch-m4_fp__find__cxx__std__lib.m4) = 67a86c6eaf4ce1cabb87080651ec4b42f3b7a914
+SHA1 (patch-linters_lint-commit-msg_lint-commit-msg.cabal) = 05fc63a1350197b3189110cf1162935fb4407a7f
+SHA1 (patch-linters_lint-submodule-refs_lint-submodule-refs.cabal) = 77ae34a0b58d4213c9e82a71db4b05d47a34862a
+SHA1 (patch-linters_lint-whitespace_lint-whitespace.cabal) = 61941f07cc350cba1ef39a5fe2fb5a61875c4966
+SHA1 (patch-linters_linters-common_linters-common.cabal) = aefc902558b4c03525048103f074d3d94430bb52
 SHA1 (patch-m4_fptools__set__haskell__platform__vars.m4) = 8c7a7ab965f4df8a68bedb35c32ee32c59ac2c94
 SHA1 (patch-rts_rts.cabal.in) = d6805ed0669d73ad68488283c579e1e41eb0536e
 SHA1 (patch-utils_haddock_driver_Main.hs) = 26b015d3aef9fdff66e66c8e3d9a370a2dbd7067

Index: pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py
diff -u pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py:1.6 pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py:1.7
--- pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py:1.6  Sun Jan 12 19:06:27 2025
+++ pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py      Mon Jan 27 15:08:08 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-hadrian_bootstrap_bootstrap.py,v 1.6 2025/01/12 19:06:27 pho Exp $
+$NetBSD: patch-hadrian_bootstrap_bootstrap.py,v 1.7 2025/01/27 15:08:08 pho Exp $
 
 Hunk #0, #1:
     bootstrap.py assumes that GHC always has a threaded RTS but our
@@ -23,11 +23,21 @@ Hunk #1-#7:
  
  #logging.basicConfig(level=logging.INFO)
  
-@@ -180,24 +181,42 @@ def resolve_dep(dep : BootstrapDep) -> P
+@@ -180,24 +181,55 @@ def resolve_dep(dep : BootstrapDep) -> P
      return sdist_dir
  
  
 -def install_dep(dep: BootstrapDep, ghc: Compiler) -> None:
++def dos2unix(path: Path):
++    with open(path, 'rb') as f:
++        content = f.read()
++
++    content = content.replace(b'\r\n', b'\n')
++
++    with open(path, 'wb') as f:
++        f.write(content)
++
++
 +def install_dep(dep: BootstrapDep, ghc: Compiler, jobs: int) -> None:
      dist_dir = (DISTDIR / f'{dep.package}-{dep.version}').resolve()
  
@@ -42,6 +52,9 @@ Hunk #1-#7:
 +    # hadrian.
 +    patch_path = Path(os.environ['FILESDIR']) / f'hadrian-{dep.package}.patch'
 +    if patch_path.is_file():
++        # But some .cabal files annoyingly use CRLF. We must convert them
++        # before applying patches.
++        dos2unix(sdist_dir / f'{dep.package}.cabal')
 +        with open(patch_path) as patch_file:
 +            patch = patch_file.read()
 +        subprocess_run(
@@ -71,7 +84,7 @@ Hunk #1-#7:
          f'--package-db={PKG_DB.resolve()}',
          f'--prefix={prefix}',
          f'--bindir={BINDIR.resolve()}',
-@@ -207,6 +226,12 @@ def install_sdist(dist_dir: Path, sdist_
+@@ -207,6 +239,12 @@ def install_sdist(dist_dir: Path, sdist_
          f'--flags={flags_option}',
      ]
  
@@ -84,7 +97,7 @@ Hunk #1-#7:
      def check_call(args: List[str]) -> None:
          subprocess_run(args, cwd=sdist_dir, check=True)
  
-@@ -223,7 +248,7 @@ def install_sdist(dist_dir: Path, sdist_
+@@ -223,7 +261,7 @@ def install_sdist(dist_dir: Path, sdist_
      check_call([str(ghc.ghc_path), '--make', '-package-env=-', '-i', f'-odir={setup_dist_dir}', f'-hidir={setup_dist_dir}', '-o', setup, 'Setup'])
      check_call([setup, 'configure'] + configure_args)
      check_call([setup, 'build'] + build_args)
@@ -93,7 +106,7 @@ Hunk #1-#7:
  
  def hash_file(h, f: BinaryIO) -> SHA256Hash:
      while True:
-@@ -238,7 +263,7 @@ def hash_file(h, f: BinaryIO) -> SHA256H
+@@ -238,7 +276,7 @@ def hash_file(h, f: BinaryIO) -> SHA256H
  UnitId = NewType('UnitId', str)
  PlanUnit = NewType('PlanUnit', dict)
  
@@ -102,7 +115,7 @@ Hunk #1-#7:
      if not PKG_DB.exists():
          print(f'Creating package database {PKG_DB}')
          PKG_DB.parent.mkdir(parents=True, exist_ok=True)
-@@ -248,7 +273,7 @@ def bootstrap(info: BootstrapInfo, ghc: 
+@@ -248,7 +286,7 @@ def bootstrap(info: BootstrapInfo, ghc: 
          check_builtin(dep, ghc)
  
      for dep in info.dependencies:
@@ -111,7 +124,7 @@ Hunk #1-#7:
  
  # Steps
  #######################################################################
-@@ -374,6 +399,8 @@ def main() -> None:
+@@ -374,6 +412,8 @@ def main() -> None:
                         help='produce a Hadrian distribution archive (default)')
      parser.add_argument('--no-archive', dest='want_archive', action='store_false',
                         help='do not produce a Hadrian distribution archive')
@@ -120,7 +133,7 @@ Hunk #1-#7:
      parser.set_defaults(want_archive=True)
  
      subparsers = parser.add_subparsers(dest="command")
-@@ -480,7 +507,8 @@ Alternatively, you could use `bootstrap.
+@@ -480,7 +520,8 @@ Alternatively, you could use `bootstrap.
            plan = gen_fetch_plan(info)
            fetch_from_plan(plan, TARBALLS)
  

Index: pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Packages.hs
diff -u pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Packages.hs:1.4 pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Packages.hs:1.5
--- pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Packages.hs:1.4        Sun Jan 12 19:06:27 2025
+++ pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Packages.hs    Mon Jan 27 15:08:08 2025
@@ -1,11 +1,15 @@
-$NetBSD: patch-hadrian_src_Settings_Packages.hs,v 1.4 2025/01/12 19:06:27 pho Exp $
+$NetBSD: patch-hadrian_src_Settings_Packages.hs,v 1.5 2025/01/27 15:08:08 pho Exp $
 
-Hunk #0, #1:
+Hunk #1, #3:
   Don't assume we always build the threaded RTS. We can't upstream this
   until they adopt this change to Haddock:
   https://github.com/haskell/haddock/commit/75a94e010fb5b0236c670d22b04f5472397dc15d
 
-Hunk #2:
+Hunk #0, #1, #2:
+  Fix build with GHC >= 9.8.1:
+  https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11541
+
+Hunk #4:
   Hadrian does something unholy on i386 to gain speed but it seems to be
   incompatible with LLD. Disable the speed hack to work around a linkage
   failure. Ideally we should do this by detecting the type of linker but
@@ -13,15 +17,33 @@ Hunk #2:
 
 --- hadrian/src/Settings/Packages.hs.orig      2024-02-22 20:59:45.000000000 +0000
 +++ hadrian/src/Settings/Packages.hs
-@@ -29,6 +29,7 @@ packageArgs = do
+@@ -6,6 +6,7 @@ import Oracles.Setting
+ import Oracles.Flag
+ import Packages
+ import Settings
++import Data.Version.Extra
+ 
+ -- | Package-specific command-line arguments.
+ packageArgs :: Args
+@@ -29,6 +30,8 @@ packageArgs = do
      cursesLibraryDir <- getSetting CursesLibDir
      ffiIncludeDir  <- getSetting FfiIncludeDir
      ffiLibraryDir  <- getSetting FfiLibDir
++    stageVersion     <- readVersion <$> (expr $ ghcVersionStage stage)
 +    rtsWays          <- getRtsWays
  
      mconcat
          --------------------------------- base ---------------------------------
-@@ -166,7 +167,17 @@ packageArgs = do
+@@ -79,7 +82,7 @@ packageArgs = do
+             -- not being fixed to `ghc`, when building stage0, we must set
+             -- -this-unit-id to `ghc` because the boot compiler expects that.
+             -- We do it through a cabal flag in ghc.cabal
+-            , stage0 ? arg "+hadrian-stage0"
++            , stageVersion < makeVersion [9, 8, 1] ? arg "+hadrian-stage0"
+             , flag StaticLibzstd `cabalFlag` "static-libzstd"
+             ]
+ 
+@@ -166,7 +169,17 @@ packageArgs = do
  
          -------------------------------- haddock -------------------------------
          , package haddock ?
@@ -40,7 +62,7 @@ Hunk #2:
  
          ---------------------------------- text --------------------------------
          , package text ? mconcat
-@@ -441,7 +452,7 @@ rtsPackageArgs = package rts ? do
+@@ -441,7 +454,7 @@ rtsPackageArgs = package rts ? do
  speedHack :: Action Bool
  speedHack = do
      i386   <- anyTargetArch ["i386"]

Added files:

Index: pkgsrc/lang/ghc98/files/hadrian-extra.patch
diff -u /dev/null pkgsrc/lang/ghc98/files/hadrian-extra.patch:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/files/hadrian-extra.patch Mon Jan 27 15:08:07 2025
@@ -0,0 +1,64 @@
+$NetBSD: hadrian-extra.patch,v 1.3 2025/01/27 15:08:07 pho Exp $
+
+Allow it to build with GHC 9.8.x. Already fixed in upstream.
+
+--- extra-1.7.12.orig/extra.cabal      2025-01-12 11:29:59.465902826 +0900
++++ extra-1.7.12/extra.cabal   2025-01-12 11:36:39.814907687 +0900
+@@ -32,7 +32,7 @@
+     default-language: Haskell2010
+     hs-source-dirs: src
+     build-depends:
+-        base >= 4.9 && < 4.19,
++        base,
+         directory,
+         filepath,
+         process,
+--- extra-1.7.12.orig/src/Data/List/Extra.hs   2001-09-09 10:46:40.000000000 +0900
++++ extra-1.7.12/src/Data/List/Extra.hs        2025-01-12 11:38:17.127540438 +0900
+@@ -1,4 +1,4 @@
+-{-# LANGUAGE TupleSections, ConstraintKinds #-}
++{-# LANGUAGE CPP, TupleSections, ConstraintKinds #-}
+ 
+ -- | This module extends "Data.List" with extra functions of a similar nature.
+ --   The package also exports the existing "Data.List" functions.
+@@ -156,6 +156,7 @@
+ lastDef d xs = foldl (\_ x -> x) d xs -- I know this looks weird, but apparently this is the fastest way to do this: https://hackage.haskell.org/package/base-4.12.0.0/docs/src/GHC.List.html#last
+ {-# INLINE lastDef #-}
+ 
++#if __GLASGOW_HASKELL__ <= 906
+ -- | A total variant of the list index function `(!!)`.
+ --
+ -- > [2,3,4] !? 1    == Just 3
+@@ -169,6 +170,7 @@
+                                    0 -> Just x
+                                    _ -> r (k-1)) (const Nothing) xs n
+ {-# INLINABLE (!?) #-}
++#endif
+ 
+ -- | A composition of 'not' and 'null'.
+ --
+@@ -187,6 +189,7 @@
+ list nil cons [] = nil
+ list nil cons (x:xs) = cons x xs
+ 
++#if __GLASGOW_HASKELL__ <= 906
+ -- | If the list is empty returns 'Nothing', otherwise returns the 'init' and the 'last'.
+ --
+ -- > unsnoc "test" == Just ("tes",'t')
+@@ -197,6 +200,7 @@
+ unsnoc [x] = Just ([], x)
+ unsnoc (x:xs) = Just (x:a, b)
+     where Just (a,b) = unsnoc xs
++#endif
+ 
+ -- | Append an element to the start of a list, an alias for '(:)'.
+ --
+@@ -286,7 +290,7 @@
+ --
+ -- > concatUnzip [("a","AB"),("bc","C")] == ("abc","ABC")
+ concatUnzip :: [([a], [b])] -> ([a], [b])
+-concatUnzip = (concat *** concat) . unzip
++concatUnzip = (concat *** concat) . Prelude.unzip
+ 
+ -- | A merging of 'unzip3' and 'concat'.
+ --
Index: pkgsrc/lang/ghc98/files/hadrian-hashable.patch
diff -u /dev/null pkgsrc/lang/ghc98/files/hadrian-hashable.patch:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/files/hadrian-hashable.patch      Mon Jan 27 15:08:07 2025
@@ -0,0 +1,24 @@
+$NetBSD: hadrian-hashable.patch,v 1.3 2025/01/27 15:08:07 pho Exp $
+
+Allow it to build with GHC 9.8.x. Already fixed in upstream.
+
+--- hashable-1.4.2.0/hashable.cabal.orig       2025-01-12 02:44:35.285644238 +0000
++++ hashable-1.4.2.0/hashable.cabal
+@@ -77,13 +77,13 @@ library
+   include-dirs:     include
+   hs-source-dirs:   src
+   build-depends:
+-      base        >=4.10.1.0 && <4.19
+-    , bytestring  >=0.10.8.2 && <0.12
++      base
++    , bytestring
+     , containers  >=0.5.10.2 && <0.7
+-    , deepseq     >=1.4.3.0  && <1.5
++    , deepseq
+     , filepath    >=1.4.1.2  && <1.5
+     , ghc-prim
+-    , text        >=1.2.3.0  && <1.3  || >=2.0 && <2.1
++    , text
+ 
+   if !impl(ghc >=9.2)
+     build-depends: base-orphans >=0.8.6 && <0.10
Index: pkgsrc/lang/ghc98/files/hadrian-splitmix.patch
diff -u /dev/null pkgsrc/lang/ghc98/files/hadrian-splitmix.patch:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/files/hadrian-splitmix.patch      Mon Jan 27 15:08:07 2025
@@ -0,0 +1,17 @@
+$NetBSD: hadrian-splitmix.patch,v 1.3 2025/01/27 15:08:07 pho Exp $
+
+Allow it to build with GHC 9.8.x. Already fixed in upstream.
+
+--- splitmix.cabal.orig        2025-01-12 02:00:28.583229536 +0000
++++ splitmix.cabal
+@@ -80,8 +80,8 @@ library
+   -- ghc-options: -fplugin=DumpCore -fplugin-opt DumpCore:core-html
+ 
+   build-depends:
+-      base     >=4.3     && <4.19
+-    , deepseq  >=1.3.0.0 && <1.5
++      base
++    , deepseq
+ 
+   if flag(optimised-mixer)
+     cpp-options: -DOPTIMISED_MIX32=1

Index: pkgsrc/lang/ghc98/patches/patch-distrib_configure.ac.in
diff -u /dev/null pkgsrc/lang/ghc98/patches/patch-distrib_configure.ac.in:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/patches/patch-distrib_configure.ac.in     Mon Jan 27 15:08:07 2025
@@ -0,0 +1,18 @@
+$NetBSD: patch-distrib_configure.ac.in,v 1.3 2025/01/27 15:08:07 pho Exp $
+
+Fix an issue on Darwin where GHC fails to invoke the C++ compiler, clang++,
+on this platform. Already fixed in upstream:
+https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12026
+
+--- distrib/configure.ac.in.orig       2025-01-12 16:16:58.729097284 +0000
++++ distrib/configure.ac.in
+@@ -103,6 +103,9 @@ dnl ** Which gcc to use?
+ dnl --------------------------------------------------------------
+ AC_PROG_CC([gcc clang])
+ AC_PROG_CXX([g++ clang++ c++])
++# Work around #24324
++MOVE_TO_FLAGS([CC],[CFLAGS])
++MOVE_TO_FLAGS([CXX],[CXXFLAGS])
+ 
+ dnl ** figure out how to invoke the C preprocessor (i.e. `gcc -E`)
+ AC_PROG_CPP
Index: pkgsrc/lang/ghc98/patches/patch-hadrian_hadrian.cabal
diff -u /dev/null pkgsrc/lang/ghc98/patches/patch-hadrian_hadrian.cabal:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/patches/patch-hadrian_hadrian.cabal       Mon Jan 27 15:08:08 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-hadrian_hadrian.cabal,v 1.3 2025/01/27 15:08:08 pho Exp $
+
+Allow it to build with GHC 9.8.x. Already fixed in upstream.
+
+--- hadrian/hadrian.cabal.orig 2025-01-12 03:00:29.789011438 +0000
++++ hadrian/hadrian.cabal
+@@ -151,7 +151,7 @@ executable hadrian
+                        , TypeOperators
+     other-extensions:    MultiParamTypeClasses
+                        , TypeFamilies
+-    build-depends:       Cabal                >= 3.2     && < 3.9
++    build-depends:       Cabal
+                        , base                 >= 4.11    && < 5
+                        , bytestring           >= 0.10    && < 0.13
+                        , containers           >= 0.5     && < 0.7
Index: pkgsrc/lang/ghc98/patches/patch-linters_lint-commit-msg_lint-commit-msg.cabal
diff -u /dev/null pkgsrc/lang/ghc98/patches/patch-linters_lint-commit-msg_lint-commit-msg.cabal:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/patches/patch-linters_lint-commit-msg_lint-commit-msg.cabal       Mon Jan 27 15:08:08 2025
@@ -0,0 +1,11 @@
+$NetBSD: patch-linters_lint-commit-msg_lint-commit-msg.cabal,v 1.3 2025/01/27 15:08:08 pho Exp $
+
+Allow it to build with GHC 9.8.x. Already fixed in upstream.
+
+--- linters/lint-commit-msg/lint-commit-msg.cabal.orig 2025-01-12 04:45:24.345305599 +0000
++++ linters/lint-commit-msg/lint-commit-msg.cabal
+@@ -26,4 +26,3 @@ executable lint-commit-msg
+     base
+        >= 4.14 && < 5,
+     text
+-       >= 1.2  && < 2.1
Index: pkgsrc/lang/ghc98/patches/patch-linters_lint-submodule-refs_lint-submodule-refs.cabal
diff -u /dev/null pkgsrc/lang/ghc98/patches/patch-linters_lint-submodule-refs_lint-submodule-refs.cabal:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/patches/patch-linters_lint-submodule-refs_lint-submodule-refs.cabal       Mon Jan 27 15:08:08 2025
@@ -0,0 +1,16 @@
+$NetBSD: patch-linters_lint-submodule-refs_lint-submodule-refs.cabal,v 1.3 2025/01/27 15:08:08 pho Exp $
+
+Allow it to build with GHC 9.8.x. Already fixed in upstream.
+
+--- linters/lint-submodule-refs/lint-submodule-refs.cabal.orig 2025-01-12 04:47:27.735023240 +0000
++++ linters/lint-submodule-refs/lint-submodule-refs.cabal
+@@ -14,8 +14,7 @@ executable lint-submodule-refs
+   build-depends:
+     base
+        >= 4.14 && < 5,
+-    text
+-       >= 1.2  && < 2.1,
++    text,
+     linters-common
+ 
+   ghc-options:
Index: pkgsrc/lang/ghc98/patches/patch-linters_lint-whitespace_lint-whitespace.cabal
diff -u /dev/null pkgsrc/lang/ghc98/patches/patch-linters_lint-whitespace_lint-whitespace.cabal:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/patches/patch-linters_lint-whitespace_lint-whitespace.cabal       Mon Jan 27 15:08:08 2025
@@ -0,0 +1,11 @@
+$NetBSD: patch-linters_lint-whitespace_lint-whitespace.cabal,v 1.3 2025/01/27 15:08:08 pho Exp $
+
+Allow it to build with GHC 9.8.x. Already fixed in upstream.
+
+--- linters/lint-whitespace/lint-whitespace.cabal.orig 2025-01-12 04:49:43.005054016 +0000
++++ linters/lint-whitespace/lint-whitespace.cabal
+@@ -28,4 +28,3 @@ executable lint-whitespace
+     base
+        >= 4.14 && < 5,
+     text
+-       >= 1.2  && < 2.1,
Index: pkgsrc/lang/ghc98/patches/patch-linters_linters-common_linters-common.cabal
diff -u /dev/null pkgsrc/lang/ghc98/patches/patch-linters_linters-common_linters-common.cabal:1.3
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/patches/patch-linters_linters-common_linters-common.cabal Mon Jan 27 15:08:08 2025
@@ -0,0 +1,16 @@
+$NetBSD: patch-linters_linters-common_linters-common.cabal,v 1.3 2025/01/27 15:08:08 pho Exp $
+
+Allow it to build with GHC 9.8.x. Already fixed in upstream.
+
+--- linters/linters-common/linters-common.cabal.orig   2025-01-12 03:08:26.258934584 +0000
++++ linters/linters-common/linters-common.cabal
+@@ -15,8 +15,7 @@ library
+       ^>= 1.6,
+     base
+        >= 4.14 && < 5,
+-    text
+-       >= 1.2  && < 2.1,
++    text,
+     deepseq
+        >= 1.1,
+ 

Index: pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Builders_Cabal.hs
diff -u /dev/null pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Builders_Cabal.hs:1.1
--- /dev/null   Mon Jan 27 15:08:08 2025
+++ pkgsrc/lang/ghc98/patches/patch-hadrian_src_Settings_Builders_Cabal.hs      Mon Jan 27 15:08:08 2025
@@ -0,0 +1,29 @@
+$NetBSD: patch-hadrian_src_Settings_Builders_Cabal.hs,v 1.1 2025/01/27 15:08:08 pho Exp $
+
+Under no circumstances we should build static GHCi objects because:
+
+  1. The only case they need to be built is when we build GHC
+     statically. We only do it for bootkits but not for regular
+     builds. Bootkits don't need GHCi, so there's no point building them.
+
+  2. We can't build them on Solaris when -fsplit-sections is enabled, which
+     we enable. Solaris LD doesn't support linker scripts. Nothing fancy,
+     like merging split sections back to their original form, can be done
+     with that exotic linker.
+
+This is more like pkgsrc-specific than a genuine defect of the upstream
+code, so don't upstream this. There should ideally be a switch, such as
+"ghciLibraries :: Bool" in Flavour.Type.Flavour to support our use case,
+but... does anyone aside of pkgsrc want it?
+
+--- hadrian/src/Settings/Builders/Cabal.hs.orig        2025-01-27 01:04:45.571870819 +0000
++++ hadrian/src/Settings/Builders/Cabal.hs
+@@ -143,7 +143,7 @@ libraryArgs = do
+     package     <- getPackage
+     withGhci    <- expr ghcWithInterpreter
+     dynPrograms <- expr (flavour >>= dynamicGhcPrograms)
+-    ghciObjsSupported <- expr platformSupportsGhciObjects
++    let ghciObjsSupported = False
+     let ways = Set.insert contextWay flavourWays
+         hasVanilla = vanilla `elem` ways
+         hasProfiling = any (wayUnit Profiling) ways



Home | Main Index | Thread Index | Old Index