can't compile with llvm 18 on ghc 9.10.1-rc1 when invoked from shell in Aquamacs on Apple Silicon
Summary
I understand that llvm 18 is not supported on 9.10.1 but I assume we want to get it to work at some point thus this bug. with llvm 18 on ghc 9.10.1-rc1 on aarch64 I get the following errors
ghc -fllvm hello.hs
Loaded package environment from /Users/avie/.ghc/aarch64-darwin-9.10.0.20240426/environments/default
[1 of 2] Compiling Main ( hello.hs, hello.o )
/var/folders/9z/09lq06qd7gb9x61ckkyjf7hc0000gn/T/ghc97628_0/ghc_5.s:2:43: error:
error: unexpected token at start of statement
.globl _Main_main_info$def ; -- Begin function Main_main_info$def
^
|
2 | .globl _Main_main_info$def ; -- Begin function Main_main_info$def
| ^
/var/folders/9z/09lq06qd7gb9x61ckkyjf7hc0000gn/T/ghc97628_0/ghc_5.s:5:42: error:
error: unexpected token at start of statement
.quad 0 ; 0x0
^
Steps to reproduce
create a file hello.hs which contains
main = putStrLn "most useful program"
compile with: ghc -fllvm hello.hs
Expected behavior
I expect it to compile with no errors
Environment
- GHC version used: 9.10.1-rc1
Optional:
- Operating System: MacOs 14.4.1
- System Architecture: Apple Silicon