ghc-9.4.3 (hadrian) llvm13 build fails with binutils-2.35
## Summary
I successfully built ghc-9.4.3 (and earlier) on Fedora s390x.
Previously I was building ghc-9.4 with make for RHEL9 (EPEL 9),
but since I have packaged shake for epel9, I wanted to try Hadrian
there too. Other archs (Linux platforms) seem fine, but not s390x
with llvm which seems to generate broken assembly (with llvm 13).
Downstream ticket: https://bugzilla.redhat.com/show_bug.cgi?id=2141054
which contains references to a couple more very similar failures.
## Steps to reproduce
Try to build ghc-9.4 with Hadrian on RHEL 9 (or CentOS Stream) s390x
booting from epel9 ghc-9.0.2.
https://koji.fedoraproject.org/koji/taskinfo?taskID=93910404 (logs available for 2 weeks)
```
| Run Ghc CompileHs Stage1: rts/StgStartup.cmm => _build/stage1/rts/build/cmm/StgStartup.thr_o
Command line: _build/stage0/bin/ghc -Wall -Wcompat -fdiagnostics-color=never -dynamic-too -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id rts-1.0.2' -i -i/builddir/build/BUILD/ghc-9.4.3/_build/stage1/rts/build -i/builddir/build/BUILD/ghc-9.4.3/_build/stage1/rts/build/autogen -i/builddir/build/BUILD/ghc-9.4.3/rts -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -optP-include -optP_build/stage1/rts/build/autogen/cabal_macros.h -ghcversion-file=rts/include/ghcversion.h -outputdir _build/stage1/rts/build -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c rts/StgStartup.cmm -o _build/stage1/rts/build/cmm/StgStartup.o -O0 -H64m -this-unit-id rts -XHaskell98 -no-global-package-db -package-db=/builddir/build/BUILD/ghc-9.4.3/_build/stage1/lib/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -O -Irts -I_build/stage1/rts/build '-DRtsWay="rts_v"' -DFS_NAMESPACE=rts -DCOMPILING_RTS -Wno-deprecated-flags -Wcpp-undef -fllvm
===> Command failed with error code: 1
/tmp/ghc48723_0/ghc_7.s: Assembler messages:
/tmp/ghc48723_0/ghc_7.s:219:0: error:
Fatal error: unrecognized .section attribute: want a,e,o,w,x,M,S,G,T or number
|
219 | .section .data.stg_stop_thread_info,"awR",@progbits
| ^
`gcc' failed in phase `Assembler'. (Exit code: 1)
```
## Expected behavior
no build failure with correctly generated asm
## Environment
* GHC version used: 9.4.3
Optional:
* Operating System: RHEL 9 (or Centos Stream 9)
* System Architecture: s390x
For now I am trying to workaround it by using make for epel9 s390x ghc9.4.
issue