From patchwork Thu Oct 31 12:46:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 69683 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5C08D27BBE9; Thu, 31 Oct 2024 12:52:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED,URIBL_CSS_A autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C0B3927BBE2 for ; Thu, 31 Oct 2024 12:52:52 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6Uf0-0002Zt-9K; Thu, 31 Oct 2024 08:52:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6Uej-0002Tw-UR for guix-patches@gnu.org; Thu, 31 Oct 2024 08:52:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6Ueh-0001vI-QB for guix-patches@gnu.org; Thu, 31 Oct 2024 08:52:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=fEhGQl3ThsklIP7kHqAtOF8kMx34Zipn5FUPru3qTKg=; b=MYYU6StzF6L2yGIgXl3PbTWmXIMylNevc7/+Z3KLZOiHtYpb6og9tQOckmQqpPQm6JnscV1rGf6UCLeMmRMe79e70pJ6oApsWp5uwiD40pdcbpRDol/VwgMAxXoT/d7lPk/Z2tEqhNMyOOY5T32DJQlt9nCitPO9fLLXXV7SJmRVxfmNVySlyNmtsSPoLyxKw3lSYKPYzbfWxSiOCU+hNlKiD8V8mq59DYB6zIkGttOgmnMVulseoky5f+a9Xp25KKr6zrDmiq9j7oOMT1umIixfDy22p90fCcAPdd6KRirOWkT/fQXQ5oslzZ+5gu2uMVaXWbG+B4mXghbWOJzcDQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6Ueg-0007nm-WB for guix-patches@gnu.org; Thu, 31 Oct 2024 08:52:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#67921] [PATCH v3 02/24] gnu: ghc-next: Update to version 9.4.8 Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 31 Oct 2024 12:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67921@debbugs.gnu.org Cc: dev@jpoiret.xyz, lars@6xq.net, saku@laesvuori.fi Received: via spool by 67921-submit@debbugs.gnu.org id=B67921.173037911229934 (code B ref 67921); Thu, 31 Oct 2024 12:52:02 +0000 Received: (at 67921) by debbugs.gnu.org; 31 Oct 2024 12:51:52 +0000 Received: from localhost ([127.0.0.1]:41878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6UeV-0007mg-70 for submit@debbugs.gnu.org; Thu, 31 Oct 2024 08:51:52 -0400 Received: from 14.mo584.mail-out.ovh.net ([46.105.40.29]:32875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6UeR-0007mI-2m for 67921@debbugs.gnu.org; Thu, 31 Oct 2024 08:51:48 -0400 Received: from director8.ghost.mail-out.ovh.net (unknown [10.108.2.10]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 4XfP5F63qYz1Thn for <67921@debbugs.gnu.org>; Thu, 31 Oct 2024 12:51:45 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-7stm6 (unknown [10.110.168.167]) by director8.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 2588F1FE6B; Thu, 31 Oct 2024 12:51:45 +0000 (UTC) Received: from ngraves.fr ([37.59.142.110]) by ghost-submission-5b5ff79f4f-7stm6 with ESMTPSA id FNKZNWB9I2c3/wAAZkaXsA (envelope-from ); Thu, 31 Oct 2024 12:51:45 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-110S00460036066-9a44-4f93-81bc-ab65a281e0fe, CD33DFF0435C6B52A7C438D6B876B70D33D893A4) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 80.214.74.119 Date: Thu, 31 Oct 2024 13:46:41 +0100 Message-ID: <20241031125127.14080-3-ngraves@ngraves.fr> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241031125127.14080-1-ngraves@ngraves.fr> References: <20241031125127.14080-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 9034502331082990118 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekhedggeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnheptdegkefhteekgfefleehleeggfdufeejteehveelfeejjeelleevudehheevkeefnecuffhomhgrihhnpehhrghskhgvlhhlrdhorhhgnecukfhppeduvdejrddtrddtrddupdektddrvddugedrjeegrdduudelpdefjedrheelrddugedvrdduuddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeeijeelvdduseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeegpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=fEhGQl3ThsklIP7kHqAtOF8kMx34Zipn5FUPru3qTKg=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1730379106; v=1; b=jlPD5UnTbcH5JD87TWrjoj4gJiIFoDFYtNn4GEWeBKMdhjJXnhgIWtwErfjpzms8Iida4QyE m/sdsM4VHHOjr6FbQpkXW2BVfmwVT2Y2J/VghcwcAcZZpBZJaJjFVfV2sr0CXwu5g5YNJ50Th0U O9+G+y4eweGKAEmRdJh85CObVTE+859ZCeRvnpInvnk3aRTuDB3XCwx+Y9kj07DMhE7ewnK1WB7 1BWu3OhwFhsYWRtiZAXsCOy301xcPcz6NsmlQ2rsjeaS2kPE5NMga97SMwHtDdA97Cwi5zTLXlt urpwfWskCKZ9lCXJj4wqBBG6cAQCDD4pKD9guwNnzo0yA== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Saku Laesvuori * gnu/packages/haskell.scm (ghc-9.4): Update to version 9.4.8. [native-inputs]: Add a patch to fix the testsuite. (ghc-happy-bootstrap-for-9.4): Update to version 1.20.1.1. * gnu/packages/patches/ghc-9.4-testsuite-fixes.patch: New patch. Change-Id: I5ef72f83e5feed1defb706bafa934077fda1553c --- gnu/packages/haskell.scm | 13 +- .../patches/ghc-9.4-testsuite-fixes.patch | 119 ++++++++++++++++++ 2 files changed, 125 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/ghc-9.4-testsuite-fixes.patch diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index c580c660f1..4e2875cffa 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -1542,14 +1542,14 @@ (define ghc-happy-bootstrap-for-9.4 (hidden-package (package (name "ghc-happy") - (version "1.20.0") + (version "1.20.1.1") (source (origin (method url-fetch) (uri (hackage-uri "happy" version)) (sha256 (base32 - "1346r2x5ravs5fqma65bzjragqbb2g6v41wz9maknwm2jf7kl79v")))) + "06w8g3lfk2ynrfhqznhp1mnp8a5b64lj6qviixpndzf5lv2psklb")))) (build-system haskell-build-system) (arguments (list #:haskell ghc-bootstrap-for-9.4 @@ -1567,15 +1567,14 @@ (define-public ghc-9.4 (package (inherit base) (name "ghc-next") - (version "9.4.4") + (version "9.4.8") (source (origin (method url-fetch) (uri (string-append "https://www.haskell.org/ghc/dist/" version "/ghc-" version "-src.tar.xz")) (sha256 (base32 - "1qk7rlqf02s3b6m6sqqngmjq1mxnrz88h159lz6k25gddmdg5kp8")) - (patches (search-patches "ghc-9-StgCRunAsm-only-when-needed.patch")))) + "0pmqg9846lanb0hcyxhgr9ipzq33rfldxj7ln0j3qgpyczmhgx0b")))) (arguments (substitute-keyword-arguments (package-arguments base) ((#:phases phases '%standard-phases) @@ -1593,8 +1592,8 @@ (define-public ghc-9.4 version "/ghc-" version "-testsuite.tar.xz")) (sha256 (base32 - "04p2lawxxg3nyv6frzhyjyh3arhqqyh5ka3alxa2pxhcd2hdcja3")) - (patches (search-patches "ghc-testsuite-recomp015-execstack.patch")))) + "159wsqnqpqb0pxa3zyhvyg07wxr2zz7v52h52wkplw4pn12dsidc")) + (patches (search-patches "ghc-9.4-testsuite-fixes.patch")))) ("ghc-alex" ,ghc-alex-bootstrap-for-9.4) ("ghc-happy" ,ghc-happy-bootstrap-for-9.4) ,@(filter (match-lambda diff --git a/gnu/packages/patches/ghc-9.4-testsuite-fixes.patch b/gnu/packages/patches/ghc-9.4-testsuite-fixes.patch new file mode 100644 index 0000000000..f394632add --- /dev/null +++ b/gnu/packages/patches/ghc-9.4-testsuite-fixes.patch @@ -0,0 +1,119 @@ +From 3acd8aa948a27465cffc8e2ab56229485e2a5b98 Mon Sep 17 00:00:00 2001 +From: Saku Laesvuori +Date: Tue, 5 Dec 2023 22:49:45 +0200 +Subject: [PATCH] Fix tests + +* replaces egrep with grep -E +* removes unnecessary escaping in some grep regular expressions +* adds a missing include header to a makefile +--- + testsuite/tests/cabal/cabal01/Makefile | 2 +- + testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile | 4 ++++ + testsuite/tests/haddock/perf/Makefile | 8 ++++---- + testsuite/tests/hsc2hs/Makefile | 4 ++-- + testsuite/tests/numeric/should_run/T7014.primops | 4 ++-- + testsuite/tests/simplCore/should_compile/Makefile | 4 ++-- + 6 files changed, 15 insertions(+), 11 deletions(-) + +diff --git a/testsuite/tests/cabal/cabal01/Makefile b/testsuite/tests/cabal/cabal01/Makefile +index 004e4c75..6ec499c9 100644 +--- a/testsuite/tests/cabal/cabal01/Makefile ++++ b/testsuite/tests/cabal/cabal01/Makefile +@@ -5,7 +5,7 @@ include $(TOP)/mk/test.mk + # Find all the env variables starting with CI_ to unset them. + # Otherwise, we might run into environment length limitations on Windows. + # (See `xargs --show-limits`.) +-VARS_TO_UNSET := $(shell env | grep ^CI_ | egrep -o '^[^=]+') ++VARS_TO_UNSET := $(shell env | grep ^CI_ | grep -E -o '^[^=]+') + unexport $(VARS_TO_UNSET) + + clean: +diff --git a/testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile b/testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile +index fd64d23f..cb669db3 100644 +--- a/testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile ++++ b/testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile +@@ -1,3 +1,7 @@ ++TOP=../../../.. ++include $(TOP)/mk/boilerplate.mk ++include $(TOP)/mk/test.mk ++ + .PHONY: GHCiPrimCall + GHCiPrimCall: + '$(TEST_HC)' $(TEST_HC_OPTS) -fPIC -v0 -c GHCiPrimCall_cmm.cmm +diff --git a/testsuite/tests/haddock/perf/Makefile b/testsuite/tests/haddock/perf/Makefile +index b67b52f2..ff2f7ebb 100644 +--- a/testsuite/tests/haddock/perf/Makefile ++++ b/testsuite/tests/haddock/perf/Makefile +@@ -4,12 +4,12 @@ include $(TOP)/mk/test.mk + + # We accept a 5% increase in parser allocations due to -haddock + haddock_parser_perf : +- WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Parser | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \ +- WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Parser | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \ ++ WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Parser | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \ ++ WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Parser | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \ + awk "BEGIN { ratio = ($$WithHaddock / $$WithoutHaddock); if (ratio > 1.05) {print \"-haddock allocation ratio too high:\", ratio; exit 1} else {exit 0} }" + + # Similarly for the renamer + haddock_renamer_perf : +- WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Renamer | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \ +- WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Renamer | egrep -o 'alloc=[0-9]+' | cut -c7- ) ; \ ++ WithoutHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -O0 Fold.hs 2>/dev/null | grep Renamer | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \ ++ WithHaddock=$(shell '$(TEST_HC)' $(TEST_HC_OPTS) -fno-code -fforce-recomp -Wno-all -ddump-timings -haddock -O0 Fold.hs 2>/dev/null | grep Renamer | grep -E -o 'alloc=[0-9]+' | cut -c7- ) ; \ + awk "BEGIN { ratio = ($$WithHaddock / $$WithoutHaddock); if (ratio > 1.05) {print \"-haddock allocation ratio too high:\", ratio; exit 1} else {exit 0} }" +diff --git a/testsuite/tests/hsc2hs/Makefile b/testsuite/tests/hsc2hs/Makefile +index d0b2d249..95b011c8 100644 +--- a/testsuite/tests/hsc2hs/Makefile ++++ b/testsuite/tests/hsc2hs/Makefile +@@ -52,9 +52,9 @@ T11004: + T12504: + '$(HSC2HS)' $(HSC2HS_OPTS) T12504/path/to/$@.hsc + ifeq "$(WINDOWS)" "YES" +- grep '{-# LINE 1 \"T12504\\\\path\\\\to\\\\$@\.hsc\" #-}' T12504/path/to/$@.hs ++ 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 +diff --git a/testsuite/tests/numeric/should_run/T7014.primops b/testsuite/tests/numeric/should_run/T7014.primops +index 3243666d..c807fb45 100644 +--- a/testsuite/tests/numeric/should_run/T7014.primops ++++ b/testsuite/tests/numeric/should_run/T7014.primops +@@ -1,8 +1,8 @@ + and# + or# + uncheckedShift.*# +-\+# +-\-# +++# ++-# + \*# + quotInt# + remInt# +diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile +index b5041800..c56e04f6 100644 +--- a/testsuite/tests/simplCore/should_compile/Makefile ++++ b/testsuite/tests/simplCore/should_compile/Makefile +@@ -66,7 +66,7 @@ T13367: + + T8832: + $(RM) -f T8832.o T8832.hi +- '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-ticks T8832.hs | egrep '^[a-zA-Z0-9]+ =' ++ '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl -dsuppress-ticks T8832.hs | grep -E '^[a-zA-Z0-9]+ =' + + T12603: + $(RM) -f T12603.o T12603.hi +@@ -259,7 +259,7 @@ str-rules: + # 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. +-- +2.41.0 +