aarch64 build failure related to dwarf unwinding
When I'm building a recent revision of GHC using ghc.nix on my aarch64 nixos server, I noticed the following build failure:
Command line: /nix/store/cjp67pyjk691vgwzv6n05gb3kxbc38qv-gcc-wrapper-12.2.0/bin/cc -E -MM -MG -MF _build/stage1/rts/build/c/Libdw.o.d -MT _build/stage1/rts/build/c/Libdw.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -I/nix/store/qrvf48kb00j3nakxp6m9avwcq2kxjzyl-elfutils-0.189-dev/include -I/nix/store/qgxqk77h55yg4s6dp668s770074xm5vj-numactl-2.0.16/include -Irts/include -I/nix/store/qrvf48kb00j3nakxp6m9avwcq2kxjzyl-elfutils-0.189-dev/include -I/nix/store/qgxqk77h55yg4s6dp668s770074xm5vj-numactl-2.0.16/include -x c rts/Libdw.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -fomit-frame-pointer -O2 -Irts -I_build/stage1/rts/build
===> Command failed with error code: 1
rts/Libdw.c:369:6: error: #error "Please implement set_initial_registers() for your arch"
369 | # error "Please implement set_initial_registers() for your arch"
| ^~~~~
Command failed
Build failed.
Setting withDwarf = false
in ghc.nix
is sufficient to get the build going, so I assume dwarf unwinding is not working with aarch64 yet. Should we do something about it in the configure
step? It would be nice if this build-time failure can be caught at configure time.