summary refs log tree commit diff
path: root/gnu/packages/patches/ghc-9.2-grep-warnings.patch
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2023-03-12 17:24:27 +0100
committerLars-Dominik Braun <lars@6xq.net>2023-03-12 17:25:10 +0100
commitec79901a33b6463ad77dcaf4c37e538645b4d7b5 (patch)
treea13d7b07281dad726ec68906bdc38f5e362f4cbf /gnu/packages/patches/ghc-9.2-grep-warnings.patch
parent1eb4745b692e794cc41bc5d6a14394aac649c930 (diff)
downloadguix-ec79901a33b6463ad77dcaf4c37e538645b4d7b5.tar.gz
gnu: ghc-9.2: Adapt testsuite to grep 3.8.
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.
Diffstat (limited to 'gnu/packages/patches/ghc-9.2-grep-warnings.patch')
-rw-r--r--gnu/packages/patches/ghc-9.2-grep-warnings.patch37
1 files changed, 37 insertions, 0 deletions
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.