[Git][ghc/ghc][wip/toolchain-selection] Revert "Rip more of configure that is no longer being used"
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Mon May 22 16:22:41 UTC 2023
Rodrigo Mesquita pushed to branch wip/toolchain-selection at Glasgow Haskell Compiler / GHC
Commits:
05a34651 by Rodrigo Mesquita at 2023-05-22T17:21:16+01:00
Revert "Rip more of configure that is no longer being used"
I realized we still need this function in rts/configure.ac
This reverts commit 01f5d4b480f4ab1514ac0a4fc957db199d1a0279.
- - - - -
1 changed file:
- m4/fptools_set_haskell_platform_vars.m4
Changes:
=====================================
m4/fptools_set_haskell_platform_vars.m4
=====================================
@@ -1,3 +1,134 @@
+# FPTOOLS_SET_HASKELL_PLATFORM_VARS_SHELL_FUNCTIONS
+# ----------------------------------
+# Drop in shell functions used by FPTOOLS_SET_HASKELL_PLATFORM_VARS
+AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS_SHELL_FUNCTIONS],
+[
+ checkArch() {
+ case [$]1 in
+ i386)
+ test -z "[$]2" || eval "[$]2=ArchX86"
+ ;;
+ x86_64|amd64)
+ test -z "[$]2" || eval "[$]2=ArchX86_64"
+ ;;
+ powerpc)
+ test -z "[$]2" || eval "[$]2=ArchPPC"
+ ;;
+ powerpc64)
+ test -z "[$]2" || eval "[$]2=\"ArchPPC_64 ELF_V1\""
+ ;;
+ powerpc64le)
+ test -z "[$]2" || eval "[$]2=\"ArchPPC_64 ELF_V2\""
+ ;;
+ s390x)
+ test -z "[$]2" || eval "[$]2=ArchS390X"
+ ;;
+ arm)
+ GET_ARM_ISA()
+ test -z "[$]2" || eval "[$]2=\"ArchARM \$ARM_ISA \$ARM_ISA_EXT \$ARM_ABI\""
+ ;;
+ aarch64)
+ test -z "[$]2" || eval "[$]2=ArchAArch64"
+ ;;
+ alpha)
+ test -z "[$]2" || eval "[$]2=ArchAlpha"
+ ;;
+ mips|mipseb)
+ test -z "[$]2" || eval "[$]2=ArchMipseb"
+ ;;
+ mipsel)
+ test -z "[$]2" || eval "[$]2=ArchMipsel"
+ ;;
+ riscv64)
+ test -z "[$]2" || eval "[$]2=ArchRISCV64"
+ ;;
+ wasm32)
+ test -z "[$]2" || eval "[$]2=ArchWasm32"
+ ;;
+ 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"
+ ;;
+ javascript)
+ test -z "[$]2" || eval "[$]2=ArchJavaScript"
+ ;;
+ *)
+ echo "Unknown arch [$]1"
+ exit 1
+ ;;
+ esac
+ }
+
+ checkVendor() {
+ case [$]1 in
+ dec|none|unknown|hp|apple|next|sun|sgi|ibm|montavista|portbld|alpine)
+ ;;
+ *)
+ AC_MSG_WARN([Unknown vendor [$]1])
+ ;;
+ esac
+ }
+
+ checkOS() {
+ case [$]1 in
+ linux|linux-android)
+ test -z "[$]2" || eval "[$]2=OSLinux"
+ ;;
+ darwin|ios|watchos|tvos)
+ test -z "[$]2" || eval "[$]2=OSDarwin"
+ ;;
+ solaris2)
+ test -z "[$]2" || eval "[$]2=OSSolaris2"
+ ;;
+ mingw32|windows)
+ test -z "[$]2" || eval "[$]2=OSMinGW32"
+ ;;
+ freebsd)
+ test -z "[$]2" || eval "[$]2=OSFreeBSD"
+ ;;
+ dragonfly)
+ test -z "[$]2" || eval "[$]2=OSDragonFly"
+ ;;
+ kfreebsdgnu)
+ test -z "[$]2" || eval "[$]2=OSKFreeBSD"
+ ;;
+ openbsd)
+ test -z "[$]2" || eval "[$]2=OSOpenBSD"
+ ;;
+ netbsd)
+ test -z "[$]2" || eval "[$]2=OSNetBSD"
+ ;;
+ haiku)
+ test -z "[$]2" || eval "[$]2=OSHaiku"
+ ;;
+ nto-qnx)
+ test -z "[$]2" || eval "[$]2=OSQNXNTO"
+ ;;
+ wasi)
+ test -z "[$]2" || eval "[$]2=OSWasi"
+ ;;
+ dragonfly|hpux|linuxaout|freebsd2|nextstep2|nextstep3|sunos4|ultrix)
+ test -z "[$]2" || eval "[$]2=OSUnknown"
+ ;;
+ aix)
+ test -z "[$]2" || eval "[$]2=OSAIX"
+ ;;
+ gnu)
+ test -z "[$]2" || eval "[$]2=OSHurd"
+ ;;
+ ghcjs|js)
+ test -z "[$]2" || eval "[$]2=OSGhcjs"
+ ;;
+ *)
+ echo "Unknown OS '[$]1'"
+ exit 1
+ ;;
+ esac
+ }
+])
+
# Note [autoconf assembler checks and -flto]
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Autoconf's AC_COMPILE_IFELSE macro is fragile in the case of checks
@@ -43,3 +174,13 @@ AC_DEFUN([GHC_SUBSECTIONS_VIA_SYMBOLS],
# We might have to generate a bunch of -D CPP flags to satisfy these dependencies (future work).
+# FPTOOLS_SET_HASKELL_PLATFORM_VARS
+# ----------------------------------
+# Set the Haskell platform variables
+AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
+[
+ AC_REQUIRE([FPTOOLS_SET_HASKELL_PLATFORM_VARS_SHELL_FUNCTIONS])
+ checkArch "[$]$1Arch" "Haskell$1Arch"
+ checkVendor "[$]$1Vendor"
+ checkOS "[$]$1OS" "Haskell$1Os"
+])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/05a34651b012bb745ca456eca7a70b5b606d16ed
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/05a34651b012bb745ca456eca7a70b5b606d16ed
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230522/ca4b473e/attachment-0001.html>
More information about the ghc-commits
mailing list