From patchwork Thu Oct 31 12:46:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 69684 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 4C89927BBEA; Thu, 31 Oct 2024 12:53:12 +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=ham 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 A075C27BBE2 for ; Thu, 31 Oct 2024 12:53:11 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6Ufh-0002py-Ft; Thu, 31 Oct 2024 08:53:05 -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 1t6Ufe-0002pQ-GD for guix-patches@gnu.org; Thu, 31 Oct 2024 08:53:02 -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 1t6Ufe-00020k-7u for guix-patches@gnu.org; Thu, 31 Oct 2024 08:53:02 -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=PwWTUQ7Jo2jitBuL3EzN7Z1INtSYCv4U89Yqnm5MFmk=; b=F3kh0EufJagCru3Kd09mKivLReatz7UW9BsyY1DTmNxgTK/fgLm06FpU7HiSe4CU/C1Q+rgVbgsfAENNypKWkg3sjKGx9JlAuo+gED3KLcFWzCQ7riXHbIIzjwcyjBvSjaNf8VLZjjkH22dpXYhsX/lNDmxMYMnT4uXfg+Q4reJRPNWz3AXyHEM6o9sMdUVvwY5iJsfRu7vzFtWE/jxwoadltyHCgOu3TQYHrm/YgCtK51hKXiv08uIAEvMwr50wKsglkXWM/7ZjFdljYN6TYv04BGJS1fS6JoayPnmG03S3X0GciuwV1sLffkATZPyr5j/IDnqxc3qkGbLmOxBfAA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6Ufe-0007su-1n for guix-patches@gnu.org; Thu, 31 Oct 2024 08:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#67921] [PATCH v3 01/24] gnu: ghc: More robust build with binutils =?utf-8?b?4oml?= 2.39. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 31 Oct 2024 12:53: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: Nicolas Graves , dev@jpoiret.xyz, lars@6xq.net, saku@laesvuori.fi Received: via spool by 67921-submit@debbugs.gnu.org id=B67921.173037912430022 (code B ref 67921); Thu, 31 Oct 2024 12:53:02 +0000 Received: (at 67921) by debbugs.gnu.org; 31 Oct 2024 12:52:04 +0000 Received: from localhost ([127.0.0.1]:41893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6Ueh-0007no-4c for submit@debbugs.gnu.org; Thu, 31 Oct 2024 08:52:04 -0400 Received: from 2.mo583.mail-out.ovh.net ([178.33.109.111]:46369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6UeQ-0007mH-0Q for 67921@debbugs.gnu.org; Thu, 31 Oct 2024 08:51:50 -0400 Received: from director8.ghost.mail-out.ovh.net (unknown [10.109.148.20]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 4XfP5C69Msz1TyD for <67921@debbugs.gnu.org>; Thu, 31 Oct 2024 12:51:43 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-tn5kr (unknown [10.110.168.164]) by director8.ghost.mail-out.ovh.net (Postfix) with ESMTPS id D91A01FE09; Thu, 31 Oct 2024 12:51:42 +0000 (UTC) Received: from ngraves.fr ([37.59.142.106]) by ghost-submission-5b5ff79f4f-tn5kr with ESMTPSA id dlBOE159I2fY1QAAUxeI3g (envelope-from ); Thu, 31 Oct 2024 12:51:42 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-106R00622b5d82e-d07b-4cc2-81c4-6ff44066233d, CD33DFF0435C6B52A7C438D6B876B70D33D893A4) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 80.214.74.119 Date: Thu, 31 Oct 2024 13:46:40 +0100 Message-ID: <20241031125127.14080-2-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: 9033939378314535650 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekhedggeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvvddufedvffelleffvdduffeuteevhefgueejueejtdekhedtgfehheeghfetieenucffohhmrghinhephhgrshhkvghllhdrohhrghenucfkphepuddvjedrtddrtddruddpkedtrddvudegrdejgedrudduledpfeejrdehledrudegvddruddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepieejledvudesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekfedpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=PwWTUQ7Jo2jitBuL3EzN7Z1INtSYCv4U89Yqnm5MFmk=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1730379104; v=1; b=Dr1rDTbipzVANXoC2F4sK+Q+YzYJcwyaOULU4a2XEHPgBwdwJrZPktkdpICKHqblnh8JYqXZ xUdHiCGNGLsDl2jkBm9d8swle4Qf6I2V64u60VTk8C89Nn8Oi2sQztIm3QcUh57aSumX8H6kUYZ 9w4pbbJaFlOjnMyQhdyQUOtBbtoav+K4hHA6Pp9wxQiDSiqi5XINcDMgqm6q9Y8hIQAxtNDLA73 c9M7SI0mgeUiR3Y0Wi05m/Je7HWc/zvGJdpDzpNn+v1qGnDSECVSG6Od4gk85iD76OqCUYCWIeS 76GTU1xoAnPdUZwcK5wiGGwozsdO7xaKQkdrBVt7C8Ehw== 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 Future versions of ghc will have more occurrences of the execstack warning. Instead of modifying the tests for each new version, a more robust approach is to explicitely make ghc pass -Wl,-z,noexecstack to its ld invocations during all tests. This is what this patch does. * gnu/packages/patches/ghc-testsuite-recomp015-execstack.patch: New patches. * gnu/local.mk (disp_path_DATA): Deregister patch. * gnu/packages/haskell.scm (ghc-8.6, ghc-8.8, ghc-9.0, ghc-9.2, ghc-9.4): Deregister patch use. Add phase 'fix-tests-with-binutils@2.39. --- gnu/local.mk | 1 - gnu/packages/haskell.scm | 24 ++++++++++--------- .../ghc-testsuite-recomp015-execstack.patch | 10 -------- 3 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 gnu/packages/patches/ghc-testsuite-recomp015-execstack.patch diff --git a/gnu/local.mk b/gnu/local.mk index b0b3d2ea2b..2292577c86 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1381,7 +1381,6 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-basement-fix-32-bit.patch \ %D%/packages/patches/ghc-testsuite-dlopen-pie.patch \ %D%/packages/patches/ghc-testsuite-grep-compat.patch \ - %D%/packages/patches/ghc-testsuite-recomp015-execstack.patch \ %D%/packages/patches/ghc-aeson-encodeDouble.patch \ %D%/packages/patches/ghc-basement-fix-32bit.patch \ %D%/packages/patches/ghc-bytestring-handle-ghc9.patch \ diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 10803f5afe..c580c660f1 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -1174,8 +1174,7 @@ (define-public ghc-8.6 "https://www.haskell.org/ghc/dist/" version "/" name "-" version "-testsuite.tar.xz")) (patches (search-patches "ghc-testsuite-dlopen-pie.patch" - "ghc-testsuite-grep-compat.patch" - "ghc-testsuite-recomp015-execstack.patch")) + "ghc-testsuite-grep-compat.patch")) (sha256 (base32 "0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91")) @@ -1229,7 +1228,14 @@ (define-public ghc-8.6 (substitute* "libraries/unix/tests/all.T" (("^test\\('T8108'") "# guix skipped: test('T8108'")) (substitute* "libraries/unix/tests/libposix/all.T" - (("^test\\('posix010'") "# guix skipped: test('posix010'")))))))) + (("^test\\('posix010'") "# guix skipped: test('posix010'")))) + ;; binutils@2.39 warns for execstack deprecation by default, causing + ;; some tests to fail ; explicitely disable during linking instead. + (add-after 'unpack-testsuite 'fix-tests-with-binutils@2.39 + (lambda _ + (substitute* "testsuite/mk/test.mk" + (("^TEST_HC_OPTS = ") + "TEST_HC_OPTS = -optl -Wl,-z,noexecstack ")))))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") (files (list @@ -1257,8 +1263,7 @@ (define-public ghc-8.8 "https://www.haskell.org/ghc/dist/" version "/ghc-" version "-testsuite.tar.xz")) (patches (search-patches "ghc-testsuite-dlopen-pie.patch" - "ghc-testsuite-grep-compat.patch" - "ghc-testsuite-recomp015-execstack.patch")) + "ghc-testsuite-grep-compat.patch")) (sha256 (base32 "0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z")) @@ -1317,8 +1322,7 @@ (define-public ghc-8.10 "https://www.haskell.org/ghc/dist/" version "/ghc-" version "-testsuite.tar.xz")) (patches (search-patches "ghc-testsuite-dlopen-pie.patch" - "ghc-testsuite-grep-compat.patch" - "ghc-testsuite-recomp015-execstack.patch")) + "ghc-testsuite-grep-compat.patch")) (sha256 (base32 "1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz")) @@ -1415,8 +1419,7 @@ (define-public ghc-9.0 (sha256 (base32 "1m5fzhr4gjn9ni8gxx7ag3fkbw1rspjzgv39mnfb0nkm5mw70v3s")) - (patches (search-patches "ghc-9.2-grep-warnings.patch" - "ghc-testsuite-recomp015-execstack.patch")) + (patches (search-patches "ghc-9.2-grep-warnings.patch")) (modules '((guix build utils))) (snippet ;; collections.Iterable was moved to collections.abc in Python 3.10. @@ -1481,8 +1484,7 @@ (define-public ghc-9.2 (sha256 (base32 "0cmmwhcwv9fjzvmgjj85d354858qqbmqfzaz5160xqj4yl9zk225")) - (patches (search-patches "ghc-9.2-grep-warnings.patch" - "ghc-testsuite-recomp015-execstack.patch")))) + (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-testsuite-recomp015-execstack.patch b/gnu/packages/patches/ghc-testsuite-recomp015-execstack.patch deleted file mode 100644 index cdaf5b180d..0000000000 --- a/gnu/packages/patches/ghc-testsuite-recomp015-execstack.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/testsuite/tests/driver/recomp015/Makefile 2024-01-13 16:22:42.643106725 +0100 -+++ b/testsuite/tests/driver/recomp015/Makefile 2024-01-13 16:23:18.406867917 +0100 -@@ -26,6 +26,7 @@ - # number of sections) - '$(TEST_HC)' $(TEST_HC_OPTS) Generate.hs - ./Generate > ManySections.s -+ echo '.section .note.GNU-stack,"",@progbits' > ManySections.s - echo 'main = putStrLn "Running main..."' > Main.hs - '$(TEST_HC)' $(TEST_HC_OPTS) -c ManySections.s - '$(TEST_HC)' $(TEST_HC_OPTS) --make -O Main.hs ManySections.o