LLVM error when compiling simple FFI code on Mac M1 (ARM) with GHC 9.0.2
Summary
...//var/folders/1d/z681kt9160xbwtytsvwvl2dh0000gn/T/ghc14575_0/ghc_1.s:2495:7: error:
error: invalid type suffix for instruction
udot.2s v1, v0, v8
^
|
2495 | udot.2s v1, v0, v8
| ^
<no location info>: error:
Error running clang! you need clang installed to use the LLVM backend
(or GHC tried to execute clang incorrectly)
`clang' failed in phase `Clang (Assembler)'. (Exit code: 1)
Steps to reproduce
Try to compile the zxcvbn-c library from hackage, version 1.0.1
Note: Joey Hess' zxcvbn-c package is a thin Haskell binding for a simple C library. The Hackage package comes complete with the original C library, including the makefile, and this builds and tests fine with LLVM 12.
Environment
- GHC 9.0.2 with LLVM backend installed via GHCUP
- LLVM@12 installed via homebrew,
/opt/homebrew/opt/llvm@12/bin
added to PATH - libffi work-around:
export C_INCLUDE_PATH="
xcrun --show-sdk-path/usr/include/ffi"
- Operating System: macOS 12.4 (Monterey)
- System Architecture: MacBook Pro with Apple M1 Pro (aarch64)