From ec79901a33b6463ad77dcaf4c37e538645b4d7b5 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 12 Mar 2023 17:24:27 +0100 Subject: gnu: ghc-9.2: Adapt testsuite to grep 3.8. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starting with version 3.8, grep emits warning messages when pattern contain spurious slashes: grep '\+' /dev/null grep: warning: stray \ before + GHC’s testsuite does not expect that and fails. * gnu/packages/patches/ghc-9.2-grep-warnings.patch: New file. * gnu/local.mk: Add it. * gnu/packages/haskell.scm (ghc-9.2)[native-inputs]: Add patch. --- gnu/local.mk | 1 + gnu/packages/haskell.scm | 3 +- gnu/packages/patches/ghc-9.2-grep-warnings.patch | 37 ++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ghc-9.2-grep-warnings.patch diff --git a/gnu/local.mk b/gnu/local.mk index f80ca1cef0..73617d3af7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1193,6 +1193,7 @@ dist_patch_DATA = \ %D%/packages/patches/gettext-libunicode-update.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-9.2-glibc-2.33-link-order.patch \ + %D%/packages/patches/ghc-9.2-grep-warnings.patch \ %D%/packages/patches/ghc-testsuite-dlopen-pie.patch \ %D%/packages/patches/ghc-testsuite-grep-compat.patch \ %D%/packages/patches/ghc-bloomfilter-ghc9.2.patch \ diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 6676a3b98b..c6d301c76c 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -1354,7 +1354,8 @@ interactive environment for the functional language Haskell.") version "/ghc-" version "-testsuite.tar.xz")) (sha256 (base32 - "19ha0hidrijawy53vm2r0sgml5zkl8126mqy7p0pyacmw3k7913l")))) + "19ha0hidrijawy53vm2r0sgml5zkl8126mqy7p0pyacmw3k7913l")) + (patches (search-patches "ghc-9.2-grep-warnings.patch")))) ,@(filter (match-lambda (("ghc-bootstrap" . _) #f) (("ghc-testsuite" . _) #f) diff --git a/gnu/packages/patches/ghc-9.2-grep-warnings.patch b/gnu/packages/patches/ghc-9.2-grep-warnings.patch new file mode 100644 index 0000000000..7a3d9c599e --- /dev/null +++ b/gnu/packages/patches/ghc-9.2-grep-warnings.patch @@ -0,0 +1,37 @@ +--- ghc-9.2.5/testsuite/tests/numeric/should_run/T7014.primops.orig 2023-03-12 14:42:11.338540492 +0100 ++++ ghc-9.2.5/testsuite/tests/numeric/should_run/T7014.primops 2023-03-12 14:42:13.735608896 +0100 +@@ -1,9 +1,9 @@ + and# + or# + uncheckedShift.*# +++# ++-# ++*# +-\+# +-\-# +-\*# + quotInt# + remInt# + plusFloat# +--- ghc-9.2.5/testsuite/tests/hsc2hs/Makefile.orig 2023-03-12 14:40:03.825939306 +0100 ++++ ghc-9.2.5/testsuite/tests/hsc2hs/Makefile 2023-03-12 14:40:07.961054835 +0100 +@@ -54,7 +54,7 @@ + ifeq "$(WINDOWS)" "YES" + grep '{-# LINE 1 \"T12504\\\\path\\\\to\\\\$@\.hsc\" #-}' T12504/path/to/$@.hs + else ++ grep '{-# LINE 1 "T12504/path/to/$@\.hsc" #-}' T12504/path/to/$@.hs +- grep '{-# LINE 1 \"T12504/path/to/$@\.hsc\" #-}' T12504/path/to/$@.hs + endif + + .PHONY: T15758 +--- ghc-9.2.5/testsuite/tests/simplCore/should_compile/Makefile.orig 2023-03-12 14:41:16.204974035 +0100 ++++ ghc-9.2.5/testsuite/tests/simplCore/should_compile/Makefile 2023-03-12 14:41:17.832020067 +0100 +@@ -253,7 +253,7 @@ + # g should have been collapsed into one defininition by CSE. + .PHONY: T13340 + T13340: ++ '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13340.hs -ddump-simpl -dsuppress-all | grep -c '+#' +- '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13340.hs -ddump-simpl -dsuppress-all | grep -c '\+#' + + + # We expect to see all dictionaries specialized away. -- cgit v1.2.3