master: error: atomicrmw cannot be unordered when compiling rts (using stage1) with LLVM backend
Summary
| Run Ghc CompileHs Stage1: rts/HeapStackCheck.cmm => _build/stage1/rts/build/cmm/HeapStackCheck.dyn_o
Command line: _build/stage0/bin/aarch64-unknown-linux-gnu-ghc -Wall -Wcompat -hisuf thr_debug_dyn_hi -osuf thr_debug_dyn_o -hcsuf thr_debug_dyn_hc -fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/inplace/package.conf.d' '-this-unit-id rts-1.0.2' -i -i/build/ghc-761c1f4/_build/stage1/rts/build -i/build/ghc-761c1f4/_build/stage1/rts/build/autogen -i/build/ghc-761c1f4/rts -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -I_build/stage1/rts/build/@FFIIncludeDir@ -I_build/stage1/rts/build/@LibdwIncludeDir@ -I/nix/store/c34qf0bj98ac1dwm47v9iwl00ki9qsrq-libffi-aarch64-unknown-linux-gnu-3.4.4-dev/include -Irts/include -Irts/@FFIIncludeDir@ -Irts/@LibdwIncludeDir@ -I/nix/store/c34qf0bj98ac1dwm47v9iwl00ki9qsrq-libffi-aarch64-unknown-linux-gnu-3.4.4-dev/include -optP-include -optP_build/stage1/rts/build/autogen/cabal_macros.h -ghcversion-file=rts/include/ghcversion.h -outputdir _build/stage1/rts/build -fdiagnostics-color=always -Wnoncanonical-monad-instances -optc-Wno-error=inline -optP-Wno-nonportable-include-path -c rts/PrimOps.cmm -o _build/stage1/rts/build/cmm/PrimOps.thr_debug_dyn_o -O -H64m -this-unit-id rts -XHaskell98 -no-global-package-db -package-db=/build/ghc-761c1f4/_build/stage1/inplace/package.conf.d -ghcversion-file=rts/include/ghcversion.h -ghcversion-file=rts/include/ghcversion.h -O2 -Irts -I_build/stage1/rts/build '-DRtsWay="rts_thr_debug_dyn"' -DFS_NAMESPACE=rts -DCOMPILING_RTS -DTHREADED_RTS -Wno-deprecated-flags -Wcpp-undef -haddock -split-sections -fllvm
===> Command failed with error code: 1
/nix/store/pf6dw3fhrghkz7pqgx1wkg4lghxvlnz6-llvm-14.0.6/bin/opt: /build/ghc88321_0/ghc_3.ll:5258:3: error: atomicrmw cannot be unordered
%ln1lT = load i64, i64* %lcgd
^
`opt' failed in phase `LLVM Optimiser'. (Exit code: 1)
0;Finished in 17m20sCommand failed
Build failed.
Steps to reproduce
- Build GHC on 761c1f49 using hadrian.
- Configure for target
aarch64-unknown-linux-gnu
, build & host arex86_64-unknown-linux-gnu
(full flags are shown in the log) - Use this UserSettings.hs.
- hadrian flags:
"--flavour=release+llvm+no_profiled_libs+split_sections" "--bignum=gmp" "--docs=no-sphinx"
Expected behavior
A GHC cross compiler for aarch64-linux is built.
Environment
- GHC version used: 9.5.20221218 (761c1f49)
Optional:
- Operating System: NixOS
- System Architecture: x86_64