gnu: ghc: Fix build with binutils ≥ 2.39.

ld warns about exec stack now, making some tests fail.  Fix them (and also
remove an unwarranted exec stack from libHSrts along with it).

* gnu/packages/patches/ghc-9-StgCRunAsm-only-when-needed.patch
* gnu/packages/patches/ghc-testsuite-recomp015-execstack.patch: New patches.
* gnu/local.mk (dist_patch_DATA): Register them.
* gnu/packages/haskell.scm (ghc-8.6, ghc-8.8, ghc-8.10, ghc-9.0, ghc-9.2,
ghc-9.4): Use them.

Change-Id: I8e5fc71d7394527d44ff37b1f9bd59d4971ec010
This commit is contained in:
Josselin Poiret 2024-01-15 23:05:37 +01:00 committed by Ludovic Courtès
parent 4840707013
commit 13b5b5d10f
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 63 additions and 9 deletions

View file

@ -0,0 +1,10 @@
--- 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