summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-01-22 14:32:57 -0500
committerMoritz Angermann <moritz.angermann@gmail.com>2021-02-13 11:34:50 +0800
commitf4b7f82d9b637c30a7b791662919861b82d32cc5 (patch)
tree11e2417434bdf301398c00905093ee6a5f4d90de
parent40983d2331fe34c0af6925db7588d5ac6a19ae36 (diff)
downloadhaskell-wip/angerman/fix-19173.tar.gz
configure: Fix parsing of ARM tripleswip/angerman/fix-19173
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.m418
1 files changed, 10 insertions, 8 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 3e240eaaaa..b665615dba 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -2084,14 +2084,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
@@ -2107,6 +2099,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"
])