diff options
author | lrzlin <lrzlin@163.com> | 2022-11-06 14:18:35 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-08 22:46:06 -0500 |
commit | ea25088d4edd9f96e48f0a7f9407fd8eb9c2ae9c (patch) | |
tree | 4ec1da1736d0d223403907283139d52228fa56ac /m4 | |
parent | d122e02247a371b14c3e906556900c0d600f424d (diff) | |
download | haskell-ea25088d4edd9f96e48f0a7f9407fd8eb9c2ae9c.tar.gz |
Add initial support for LoongArch Architecture.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/fptools_set_haskell_platform_vars.m4 | 5 | ||||
-rw-r--r-- | m4/ghc_convert_cpu.m4 | 6 | ||||
-rw-r--r-- | m4/ghc_tables_next_to_code.m4 | 2 | ||||
-rw-r--r-- | m4/ghc_unregisterised.m4 | 2 |
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]) ;; |