projects/guix·commit d95d48dd

gnu: ghc: More robust build with binutils ≥ 2.39.

d95d48dd · Nicolas Graves <[email protected]> · 2024-10-31 13:46:40 +01:00

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: Remove it.
* gnu/local.mk (disp_path_DATA): Deregister patch.
* gnu/packages/haskell.scm (ghc-9.0, ghc-9.8, ghc-9.10): Deregister patch use.

Change-Id: Ib174c017eef512eda9b4754178a927517c7f05a1
Signed-off-by: Ludovic Courtès <[email protected]>
Merges: #6651
Commit
d95d48dd8614903e805f0215aa9d1121ff929f0b
Parents
a4323687

Changes

3 files changed · +3 −17

gnu/local.mk

View file
diff --git a/gnu/local.mk b/gnu/local.mk
index 950f760..ce80655 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1449,7 +1449,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 \

gnu/packages/haskell.scm

View file
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 04a8e74..1506bbe 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -1670,8 +1670,7 @@ SRC_HC_OPTS += -optc-mno-outline-atomics
(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.
@@ -2094,8 +2093,7 @@ SRC_HC_OPTS += -optc-mno-outline-atomics
(file-name "ghc-testsuite.tar.xz")
(sha256
(base32
- "1hxylm3nhxzl7yidarlavvcg1240w4bk0hy5jnvwna24jyxz69i6"))
- (patches (search-patches "ghc-testsuite-recomp015-execstack.patch")))
+ "1hxylm3nhxzl7yidarlavvcg1240w4bk0hy5jnvwna24jyxz69i6")))
(origin
(method url-fetch)
(uri (string-append "https://downloads.haskell.org/~ghc/"
@@ -2173,8 +2171,7 @@ interactive environment for the functional language Haskell.")
version "/ghc-" version "-testsuite.tar.xz"))
(sha256
(base32
- "143ifc4g3jc6s9hcry5qha913rzwg4hpsvk6pqvxk5r0qigfxjwx"))
- (patches (search-patches "ghc-testsuite-recomp015-execstack.patch"))))
+ "143ifc4g3jc6s9hcry5qha913rzwg4hpsvk6pqvxk5r0qigfxjwx"))))
(replace "hadrian-bootstrap-sources.tar.gz"
(origin
(method url-fetch)

gnu/packages/patches/ghc-testsuite-recomp015-execstack.patch

View before deletion
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 0d4849f..0000000
--- 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