AArch64/Darwin build fails due to bytestring's NEON usage
When bumping the bytestring
dependency in !8233 (merged) I found that the build failed with:
| Run Ghc CompileCWithGhc Stage0: libraries/bytestring/cbits/itoa.c => _build/stage0/libraries/bytestring/build/c/cbits/itoa.o
Command line: /usr/bin/clang -std=c11 -DNDEBUG=1 -E -MM -MG -MF _build/stage0/libraries/bytestring/build/c/cbits/aarch64/is-valid-utf8.o.d -MT _build/stage0/libraries/bytestring/build/c/cbits/aarch64/is-valid-utf8.o -I_build/stage0/libraries/bytestring/build -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I_build/stage0/libraries/bytestring/build/include -Ilibraries/bytestring/include -I/nix/store/iypbf5sw86qc890pl53wwppk00mlq7i7-ghc/lib/ghc-9.2.2/lib/aarch64-osx-ghc-9.2.2/base-4.16.1.0/include -I/nix/store/iypbf5sw86qc890pl53wwppk00mlq7i7-ghc/lib/ghc-9.2.2/lib/aarch64-osx-ghc-9.2.2/ghc-bignum-1.2/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/nix/store/iypbf5sw86qc890pl53wwppk00mlq7i7-ghc/lib/ghc-9.2.2/lib/aarch64-osx-ghc-9.2.2/rts-1.0.2/include -x c libraries/bytestring/cbits/aarch64/is-valid-utf8.c
===> Command failed with error code: 1
In file included from libraries/bytestring/cbits/aarch64/is-valid-utf8.c:35:
/Library/Developer/CommandLineTools/usr/lib/clang/13.0.0/include/arm_neon.h:28:2: error: "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"
#error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"
^
1 error generated.
Command failed
Build failed.
hadrian/build-cabal --flavour=validate -j8 --broken-test= --bignum=gmp --docs=no-sphinx stage1:exe:ghc-bin failed
I'm a bit unclear on what is going on here; surely the Darwin toolchain doesn't default to a soft-FP ABI by default!?
Edited by Matthew Pickering