Rodrigo Mesquita pushed to branch wip/romes/25637 at Glasgow Haskell Compiler / GHC
Commits:
-
670f28fb
by Rodrigo Mesquita at 2025-09-19T10:23:26+01:00
3 changed files:
Changes:
... | ... | @@ -43,12 +43,6 @@ dnl interprets build/host/target and how this interacts with $CC tests |
43 | 43 | test -n "$target_alias" && ac_tool_prefix=$target_alias-
|
44 | 44 | |
45 | 45 | dnl ----------------------------------------------------------
|
46 | -dnl ** Store USER specified environment variables to pass them on to
|
|
47 | -dnl ** ghc-toolchain (in m4/ghc-toolchain.m4)
|
|
48 | -USER_CFLAGS="$CFLAGS"
|
|
49 | -USER_LDFLAGS="$LDFLAGS"
|
|
50 | -USER_LIBS="$LIBS"
|
|
51 | -USER_CXXFLAGS="$CXXFLAGS"
|
|
52 | 46 | dnl The lower-level/not user-facing environment variables that may still be set
|
53 | 47 | dnl by developers such as in ghc-wasm-meta
|
54 | 48 | USER_CONF_CC_OPTS_STAGE2="$CONF_CC_OPTS_STAGE2"
|
... | ... | @@ -146,11 +146,11 @@ AC_DEFUN([FP_SETUP_WINDOWS_TOOLCHAIN],[ |
146 | 146 | dnl We override the USER_* flags here since the user delegated
|
147 | 147 | dnl configuration to the bundled windows toolchain, and these are the
|
148 | 148 | dnl options required by the bundled windows toolchain.
|
149 | - USER_CFLAGS="$CFLAGS"
|
|
150 | 149 | USER_CPP_ARGS="$CONF_CPP_OPTS_STAGE2"
|
151 | - USER_CXXFLAGS="$CXXFLAGS"
|
|
152 | 150 | USER_HS_CPP_ARGS="$HaskellCPPArgs"
|
153 | - USER_LDFLAGS="$CONF_GCC_LINKER_OPTS_STAGE2"
|
|
151 | + USER_CONF_CC_OPTS_STAGE2="$CONF_CC_OPTS_STAGE2"
|
|
152 | + USER_CONF_CXX_OPTS_STAGE2="$CONF_CXX_OPTS_STAGE2"
|
|
153 | + USER_CONF_GCC_LINKER_OPTS_STAGE2="$CONF_GCC_LINKER_OPTS_STAGE2"
|
|
154 | 154 | USER_JS_CPP_ARGS="$JavaScriptCPPArgs"
|
155 | 155 | USER_CMM_CPP_ARGS="$CmmCPPArgs"
|
156 | 156 | ]) |
... | ... | @@ -8,18 +8,6 @@ AC_DEFUN([ADD_GHC_TOOLCHAIN_ARG], |
8 | 8 | done
|
9 | 9 | ])
|
10 | 10 | |
11 | -dnl $1 argument name
|
|
12 | -dnl $2 first variable to try
|
|
13 | -dnl $3 variable to add if the first variable is empty
|
|
14 | -AC_DEFUN([ADD_GHC_TOOLCHAIN_ARG_CHOOSE],
|
|
15 | -[
|
|
16 | - if test -z "$2"; then
|
|
17 | - ADD_GHC_TOOLCHAIN_ARG([$1],[$3])
|
|
18 | - else
|
|
19 | - ADD_GHC_TOOLCHAIN_ARG([$1],[$2])
|
|
20 | - fi
|
|
21 | -])
|
|
22 | - |
|
23 | 11 | AC_DEFUN([ENABLE_GHC_TOOLCHAIN_ARG],
|
24 | 12 | [
|
25 | 13 | if test "$2" = "YES"; then
|
... | ... | @@ -123,10 +111,9 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN], |
123 | 111 | ENABLE_GHC_TOOLCHAIN_ARG([dwarf-unwind], [$enable_dwarf_unwind])
|
124 | 112 | |
125 | 113 | dnl We store USER_* variants of all user-specified flags to pass them over to ghc-toolchain.
|
126 | - ADD_GHC_TOOLCHAIN_ARG_CHOOSE([cc-opt], [$USER_CONF_CC_OPTS_STAGE2], [$USER_CFLAGS])
|
|
127 | - ADD_GHC_TOOLCHAIN_ARG_CHOOSE([cc-link-opt], [$USER_CONF_GCC_LINKER_OPTS_STAGE2], [$USER_LDFLAGS])
|
|
128 | - ADD_GHC_TOOLCHAIN_ARG([cc-link-opt], [$USER_LIBS])
|
|
129 | - ADD_GHC_TOOLCHAIN_ARG_CHOOSE([cxx-opt], [$USER_CONF_CXX_OPTS_STAGE2], [$USER_CXXFLAGS])
|
|
114 | + ADD_GHC_TOOLCHAIN_ARG([cc-opt], [$USER_CONF_CC_OPTS_STAGE2])
|
|
115 | + ADD_GHC_TOOLCHAIN_ARG([cc-link-opt], [$USER_CONF_GCC_LINKER_OPTS_STAGE2])
|
|
116 | + ADD_GHC_TOOLCHAIN_ARG([cxx-opt], [$USER_CONF_CXX_OPTS_STAGE2])
|
|
130 | 117 | ADD_GHC_TOOLCHAIN_ARG([cpp-opt], [$USER_CPP_ARGS])
|
131 | 118 | ADD_GHC_TOOLCHAIN_ARG([hs-cpp-opt], [$USER_HS_CPP_ARGS])
|
132 | 119 | ADD_GHC_TOOLCHAIN_ARG([js-cpp-opt], [$USER_JS_CPP_ARGS])
|