diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-01-22 14:32:57 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-05 20:37:28 -0400 |
commit | 918d5021ad74a6b7e5e027df2f7d7605d833b486 (patch) | |
tree | e7c8189f38c3a6e8d7ef5e299c8f6840c50817a2 | |
parent | ce706faeef3964116c6e1dd0e6ae2f2e77fde57d (diff) | |
download | haskell-918d5021ad74a6b7e5e027df2f7d7605d833b486.tar.gz |
configure: Fix parsing of ARM triples
To support proper parsing of arm64 targets, we needed to adjust
the GHC_LLVM_TARGET function to allow parsing arm64-apple-darwin
into aarch64. This however discared the proper os detection.
To rectify this, we'll pull the os detection into separate block.
Fixes #19173.
-rw-r--r-- | aclocal.m4 | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index d7b6c58f44..2778a4c2ff 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -2089,14 +2089,6 @@ AC_DEFUN([GHC_LLVM_TARGET], [ llvm_target_vendor="unknown" llvm_target_os="windows" ;; - # retain any android and gnueabi linux flavours - # for the LLVM Target. Otherwise these would be - # turned into just `-linux` and fail to be found - # in the `llvm-targets` file. - *-android*|*-gnueabi*|*-musleabi*) - GHC_CONVERT_VENDOR([$3],[llvm_target_vendor]) - llvm_target_os="$4" - ;; # apple is a bit about their naming scheme for # aarch64; and clang on macOS doesn't know that # aarch64 would be arm64. So for LLVM we'll need @@ -2112,6 +2104,16 @@ AC_DEFUN([GHC_LLVM_TARGET], [ GHC_CONVERT_OS([$4],[$2],[llvm_target_os]) ;; esac + case "$4" in + # retain any android and gnueabi linux flavours + # for the LLVM Target. Otherwise these would be + # turned into just `-linux` and fail to be found + # in the `llvm-targets` file. + *-android*|*-gnueabi*|*-musleabi*) + GHC_CONVERT_VENDOR([$3],[llvm_target_vendor]) + llvm_target_os="$4" + ;; + esac $5="$llvm_target_cpu-$llvm_target_vendor-$llvm_target_os" ]) |