diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-10-23 04:22:10 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-31 09:05:16 -0400 |
commit | f5471c0baaa5c05488888f6d51485031e621a90b (patch) | |
tree | 0ef66802e4a14e46e0b8e57c04c4d3eb073eca00 /distrib | |
parent | e4095c0c85b9c9f70f3c3d665370916e8fd4f616 (diff) | |
download | haskell-f5471c0baaa5c05488888f6d51485031e621a90b.tar.gz |
Modularize autoconf platform detection
This will allow better reuse of it, such as in the upcoming RTS
configure script.
Progress towards #17191
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/configure.ac.in | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in index d3aee52220..533be9dfac 100644 --- a/distrib/configure.ac.in +++ b/distrib/configure.ac.in @@ -37,15 +37,15 @@ AC_SUBST(LibdwIncludeDir) UseLibffiForAdjustors=@UseLibffiForAdjustors@ AC_SUBST(UseLibffiForAdjustors) -# We have to run these unconditionally as FPTOOLS_SET_PLATFORM_VARS wants the +# We have to run these unconditionally as FPTOOLS_SET_PLATFORMS_VARS wants the # values it computes. AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET -FPTOOLS_SET_PLATFORM_VARS +FPTOOLS_SET_PLATFORMS_VARS -# Requires FPTOOLS_SET_PLATFORM_VARS to be run first. +# Requires FPTOOLS_SET_PLATFORMS_VARS to be run first. FP_FIND_ROOT # ToDo: if Stage1Only=YES, should be YES @@ -168,7 +168,24 @@ AC_SUBST(CONF_CPP_OPTS_STAGE2) dnl ** Set up the variables for the platform in the settings file. dnl May need to use gcc to find platform details. dnl -------------------------------------------------------------- -FPTOOLS_SET_HASKELL_PLATFORM_VARS +FPTOOLS_SET_HASKELL_PLATFORM_VARS([Build]) + +FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host]) +AC_SUBST(HaskellHostArch) +AC_SUBST(HaskellHostOs) + +FPTOOLS_SET_HASKELL_PLATFORM_VARS([Target]) +AC_SUBST(HaskellTargetArch) +AC_SUBST(HaskellTargetOs) + +GHC_SUBSECTIONS_VIA_SYMBOLS +AC_SUBST(TargetHasSubsectionsViaSymbols) + +GHC_IDENT_DIRECTIVE +AC_SUBST(TargetHasIdentDirective) + +GHC_GNU_NONEXEC_STACK +AC_SUBST(TargetHasGnuNonexecStack) dnl ** See whether cc supports --target=<triple> and set dnl CONF_CC_OPTS_STAGE[12] accordingly. |