Sunday, May 29, 2022

Upgrade lang/ghc 9.2.2->9.2.3

Hi Matthias,

Looks like we can cheaply get to ghc-9.2.3 now. The changelog lists a
few bug fixes:
https://www.haskell.org/ghc/blog/20220527-ghc-9.2.3-released.html

I had another patch in my tree before it, so I'm sending that too. Based
on my always building with MAKE_JOBS=10 I suspect ghc build is now
concurrency-friendly, so I removed the admonition.

So far I only built ghc itself and tested it by rebuilding my xmonad.
I'll rebuild all the direct dependents, but might as well ask for an
OK in the meantime.

If you happen to have an urge to build a fresh bootstrap at some point,
we should look into aligning the automake versions between bootstrap and
port builds.

Thanks
Greg

From dee8ca038ee8f42c9949503da289ce8614f4091e Mon Sep 17 00:00:00 2001
From: Greg Steuck <greg@nest.cx>
Date: Sun, 22 May 2022 23:06:36 -0700
Subject: [PATCH 1/2] Remove USE_WXNEEDED from lang/ghc as it's no longer
needed

Verified by rebuilding on a filesystem without wxneeded and running
ghci from /usr/local with wxneeded turned off.
---
lang/ghc/Makefile | 11 -----------
1 file changed, 11 deletions(-)

diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index 9fc34259e4b..d426adec67a 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -3,12 +3,6 @@ ONLY_FOR_ARCHS = amd64

COMMENT = compiler for the functional language Haskell

-# Note: please never ever set DPB_PROPERTIES=parallel (or some other
-# magic that enables parallel builds) for this port! Not even if it
-# appears to work. (search the upstream bug tracker for terms like
-# "non-deterministic", "unresolved symbol", "signature mismatch" etc. to
-# find the appropriate bug tickets)
-
# ghc hardcodes ${WRKDIR}/bin/gcc when the package is compiled with ccache
NO_CCACHE = Yes

@@ -42,11 +36,6 @@ BUILD_DEPENDS = archivers/bzip2 \
textproc/py-sphinx${MODPY_FLAVOR}>=4.0.2
RUN_DEPENDS =

-# GHC build uses -Wl,-z,wxneeded on OpenBSD.
-# XXX: wxneeded is a hack. Fix rts/Linker.c, mmapForLinker() and
-# loadObj_() instead.
-USE_WXNEEDED = special
-
MASTER_SITES = https://downloads.haskell.org/ghc/${GHC_VERSION}/
MASTER_SITES0 = https://openbsd.dead-parrot.de/distfiles/

--
2.36.1

From 6c2431ee764519962a7ad5a712361923570e0f9f Mon Sep 17 00:00:00 2001
From: Greg Steuck <greg@nest.cx>
Date: Sun, 29 May 2022 12:43:31 -0700
Subject: [PATCH 2/2] Upgrade lang/ghc 9.2.2->9.2.3

Mostly mechanical, except for having to run ./boot per
https://gitlab.haskell.org/ghc/ghc/-/issues/21626

Removed the %n patches merged into the release. The ./configure patch
is no longer needed and wouldn't apply due to #21626 above.
---
lang/ghc/Makefile | 10 +--
lang/ghc/distinfo | 8 +--
lang/ghc/patches/patch-configure | 12 ----
.../ghc/patches/patch-includes_rts_Messages_h | 32 ----------
lang/ghc/patches/patch-rts_RtsMessages_c | 63 -------------------
lang/ghc/patches/patch-rts_Stats_c | 52 ---------------
lang/ghc/pkg/PLIST | 2 +
7 files changed, 12 insertions(+), 167 deletions(-)
delete mode 100644 lang/ghc/patches/patch-configure
delete mode 100644 lang/ghc/patches/patch-includes_rts_Messages_h
delete mode 100644 lang/ghc/patches/patch-rts_RtsMessages_c
delete mode 100644 lang/ghc/patches/patch-rts_Stats_c

diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index d426adec67a..a9809beda2c 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -6,7 +6,7 @@ COMMENT = compiler for the functional language Haskell
# ghc hardcodes ${WRKDIR}/bin/gcc when the package is compiled with ccache
NO_CCACHE = Yes

-GHC_VERSION = 9.2.2
+GHC_VERSION = 9.2.3
DISTNAME = ghc-${GHC_VERSION}
CATEGORIES = lang devel
HOMEPAGE = https://www.haskell.org/ghc/
@@ -58,15 +58,15 @@ SUPDISTFILES += ${BINDISTFILE-$m}
GHC_ITEMS = \
CABAL 3.6.3.0 \
ARRAY 0.5.4.0 \
- BASE 4.16.1.0 \
+ BASE 4.16.2.0 \
BINARY 0.8.9.0 \
- BYTESTRING 0.11.3.0 \
+ BYTESTRING 0.11.3.1 \
CONTAINERS 0.6.5.1 \
DEEPSEQ 1.4.6.1 \
DIRECTORY 1.3.6.2 \
EXCEPTIONS 0.10.4 \
FILEPATH 1.4.2.2 \
- GHC 9.2.2 \
+ GHC 9.2.3 \
GHC_BIGNUM 1.2 \
GHC_COMPACT 0.1.0.0 \
GHC_PRIM 0.8.0 \
@@ -95,6 +95,7 @@ USE_GMAKE = Yes
USE_GROFF = Yes

AUTOCONF_VERSION = 2.71
+AUTOMAKE_VERSION = 1.16
CONFIGURE_STYLE = gnu autoconf no-autoheader
CONFIGURE_ARGS += --with-ffi-includes=${LOCALBASE}/include \
--with-ffi-libraries=${LOCALBASE}/lib \
@@ -133,6 +134,7 @@ PORTHOME = ${WRKDIR}
TEST_DEPENDS = print/ghostscript/gnu ${MODPY_RUN_DEPENDS}

post-extract:
+ cd ${WRKSRC} && ${AUTOCONF_ENV} ./boot
cd ${WRKSRC}/libraries/unix && \
mkdir -p System/OpenBSD && \
install -m 644 ${FILESDIR}/Process.hsc System/OpenBSD
diff --git a/lang/ghc/distinfo b/lang/ghc/distinfo
index c2c1523331e..9f288c55e46 100644
--- a/lang/ghc/distinfo
+++ b/lang/ghc/distinfo
@@ -1,8 +1,8 @@
SHA256 (ghc/ghc-8.10.7.20220419-amd64-unknown-openbsd.tar.xz) = JFa1/AJu2bhYiL80OrKWy0li7ynmO99eCnc9nA+DjSc=
SHA256 (ghc/ghc-8.10.7.20220419-shlibs-amd64.tar.gz) = zjDaNaYT1AnlqEqupIxr8aoALbQao/a3dypGrDL9X7g=
-SHA256 (ghc/ghc-9.2.2-src.tar.xz) = kCRjpMxu5Hmvk1i5+LLuMjewPpNKHqZbbR/PPg10nqY=
-SHA256 (ghc/ghc-9.2.2-testsuite.tar.xz) = KgoVu8T9iWEZB++JHoPMHSN16wtVZtlJZd/6AI6GHLI=
+SHA256 (ghc/ghc-9.2.3-src.tar.xz) = UOzcK+8BPlGPmmKhUkXX2w5ECdc3xDsc6nMG/YLhZp4=
+SHA256 (ghc/ghc-9.2.3-testsuite.tar.xz) = RqbLsMMva02WXbZn7JpZ0v6vnjFgngzb5X5hrzN9PiA=
SIZE (ghc/ghc-8.10.7.20220419-amd64-unknown-openbsd.tar.xz) = 35749140
SIZE (ghc/ghc-8.10.7.20220419-shlibs-amd64.tar.gz) = 2904669
-SIZE (ghc/ghc-9.2.2-src.tar.xz) = 23461244
-SIZE (ghc/ghc-9.2.2-testsuite.tar.xz) = 3182072
+SIZE (ghc/ghc-9.2.3-src.tar.xz) = 27525456
+SIZE (ghc/ghc-9.2.3-testsuite.tar.xz) = 3193820
diff --git a/lang/ghc/patches/patch-configure b/lang/ghc/patches/patch-configure
deleted file mode 100644
index 927c314a795..00000000000
--- a/lang/ghc/patches/patch-configure
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: configure
---- configure.orig
-+++ configure
-@@ -10326,7 +10326,7 @@ else
- if test "$Unregisterised" = "YES"; then
- # These used to be conditioned on gcc version but we no longer support
- # GCC versions which lack support for these flags
-- fp_cv_gcc_extra_opts="-fwrapv -fno-builtin"
-+ fp_cv_gcc_extra_opts="-fno-pie -fwrapv -fno-builtin"
- fi
-
- fi
diff --git a/lang/ghc/patches/patch-includes_rts_Messages_h b/lang/ghc/patches/patch-includes_rts_Messages_h
deleted file mode 100644
index a67f8b1e292..00000000000
--- a/lang/ghc/patches/patch-includes_rts_Messages_h
+++ /dev/null
@@ -1,32 +0,0 @@
-The debug message function has to return the number of bytes written
-(like printf(3)), to allow killing a %n format specifier in one in
-one invocation of statsPrintf() in report_summary() (rts/Stats.c).
-
-Index: includes/rts/Messages.h
---- includes/rts/Messages.h.orig
-+++ includes/rts/Messages.h
-@@ -85,20 +85,21 @@ void vsysErrorBelch(const char *s, va_list ap);
- void debugBelch(const char *s, ...)
- GNUC3_ATTRIBUTE(format (PRINTF, 1, 2));
-
--void vdebugBelch(const char *s, va_list ap);
-+int vdebugBelch(const char *s, va_list ap);
-
-
- /* Hooks for redirecting message generation: */
-
- typedef void RtsMsgFunction(const char *, va_list);
-+typedef int RtsMsgFunctionRetLen(const char *, va_list);
-
- extern RtsMsgFunction *fatalInternalErrorFn;
--extern RtsMsgFunction *debugMsgFn;
-+extern RtsMsgFunctionRetLen *debugMsgFn;
- extern RtsMsgFunction *errorMsgFn;
-
- /* Default stdio implementation of the message hooks: */
-
- extern RtsMsgFunction rtsFatalInternalErrorFn;
--extern RtsMsgFunction rtsDebugMsgFn;
-+extern RtsMsgFunctionRetLen rtsDebugMsgFn;
- extern RtsMsgFunction rtsErrorMsgFn;
- extern RtsMsgFunction rtsSysErrorMsgFn;
diff --git a/lang/ghc/patches/patch-rts_RtsMessages_c b/lang/ghc/patches/patch-rts_RtsMessages_c
deleted file mode 100644
index a3b51832da1..00000000000
--- a/lang/ghc/patches/patch-rts_RtsMessages_c
+++ /dev/null
@@ -1,63 +0,0 @@
-The debug message function has to return the number of bytes written
-(like printf(3)), to allow killing a %n format specifier in one in
-one invocation of statsPrintf() in report_summary() (rts/Stats.c).
-
-Index: rts/RtsMessages.c
---- rts/RtsMessages.c.orig
-+++ rts/RtsMessages.c
-@@ -36,7 +36,7 @@
-
- // Default to the stdio implementation of these hooks.
- RtsMsgFunction *fatalInternalErrorFn = rtsFatalInternalErrorFn;
--RtsMsgFunction *debugMsgFn = rtsDebugMsgFn;
-+RtsMsgFunctionRetLen *debugMsgFn = rtsDebugMsgFn;
- RtsMsgFunction *errorMsgFn = rtsErrorMsgFn;
- RtsMsgFunction *sysErrorMsgFn = rtsSysErrorMsgFn;
-
-@@ -108,10 +108,10 @@ debugBelch(const char*s, ...)
- va_end(ap);
- }
-
--void
-+int
- vdebugBelch(const char*s, va_list ap)
- {
-- (*debugMsgFn)(s,ap);
-+ return (*debugMsgFn)(s,ap);
- }
-
- /* -----------------------------------------------------------------------------
-@@ -291,16 +291,16 @@ rtsSysErrorMsgFn(const char *s, va_list ap)
-

No comments:

Post a Comment