summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/fptools_set_haskell_platform_vars.m45
-rw-r--r--m4/ghc_convert_cpu.m46
-rw-r--r--m4/ghc_tables_next_to_code.m42
-rw-r--r--m4/ghc_unregisterised.m42
4 files changed, 12 insertions, 3 deletions
diff --git a/m4/fptools_set_haskell_platform_vars.m4 b/m4/fptools_set_haskell_platform_vars.m4
index d0c091e57d..1a32b3046b 100644
--- a/m4/fptools_set_haskell_platform_vars.m4
+++ b/m4/fptools_set_haskell_platform_vars.m4
@@ -45,7 +45,10 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS_SHELL_FUNCTIONS],
wasm32)
test -z "[$]2" || eval "[$]2=ArchWasm32"
;;
- hppa|hppa1_1|ia64|m68k|nios2|riscv32|rs6000|s390|sh4|vax)
+ loongarch64)
+ test -z "[$]2" || eval "[$]2=ArchLoongArch64"
+ ;;
+ hppa|hppa1_1|ia64|m68k|nios2|riscv32|loongarch32|rs6000|s390|sh4|vax)
test -z "[$]2" || eval "[$]2=ArchUnknown"
;;
js)
diff --git a/m4/ghc_convert_cpu.m4 b/m4/ghc_convert_cpu.m4
index 8c1f1925e7..b3f1789bbc 100644
--- a/m4/ghc_convert_cpu.m4
+++ b/m4/ghc_convert_cpu.m4
@@ -56,6 +56,12 @@ case "$1" in
riscv|riscv32*)
$2="riscv32"
;;
+ loongarch64*)
+ $2="loongarch64"
+ ;;
+ loongarch32*)
+ $2="loongarch32"
+ ;;
rs6000)
$2="rs6000"
;;
diff --git a/m4/ghc_tables_next_to_code.m4 b/m4/ghc_tables_next_to_code.m4
index 3e0ced2137..8acf250c44 100644
--- a/m4/ghc_tables_next_to_code.m4
+++ b/m4/ghc_tables_next_to_code.m4
@@ -17,7 +17,7 @@ AC_DEFUN([GHC_TABLES_NEXT_TO_CODE],
case "$Unregisterised" in
NO)
case "$TargetArch" in
- ia64|powerpc64|powerpc64le|s390x|wasm32)
+ ia64|powerpc64|powerpc64le|s390x|wasm32|loongarch64)
TablesNextToCodeDefault=NO
AC_MSG_RESULT([no])
;;
diff --git a/m4/ghc_unregisterised.m4 b/m4/ghc_unregisterised.m4
index aafb92e165..38b445067d 100644
--- a/m4/ghc_unregisterised.m4
+++ b/m4/ghc_unregisterised.m4
@@ -5,7 +5,7 @@ AC_DEFUN([GHC_UNREGISTERISED],
[
AC_MSG_CHECKING(whether target supports a registerised ABI)
case "$TargetArch" in
- i386|x86_64|powerpc|powerpc64|powerpc64le|s390x|arm|aarch64|riscv64|wasm32|js)
+ i386|x86_64|powerpc|powerpc64|powerpc64le|s390x|arm|aarch64|riscv64|wasm32|js|loongarch64)
UnregisterisedDefault=NO
AC_MSG_RESULT([yes])
;;