[Git][ghc/ghc][wip/ghc-toolchain-fixes] Set USER_CPP_ARGS when setting up windows toolchain

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Tue Aug 8 11:25:01 UTC 2023



Matthew Pickering pushed to branch wip/ghc-toolchain-fixes at Glasgow Haskell Compiler / GHC


Commits:
506e784c by Matthew Pickering at 2023-08-08T12:23:20+01:00
Set USER_CPP_ARGS when setting up windows toolchain

- - - - -


2 changed files:

- m4/fp_hs_cpp_cmd_with_args.m4
- m4/fp_setup_windows_toolchain.m4


Changes:

=====================================
m4/fp_hs_cpp_cmd_with_args.m4
=====================================
@@ -45,11 +45,11 @@ AC_ARG_WITH(hs-cpp-flags,
 [
   $HS_CPP_CMD -x c /dev/null -dM -E > conftest.txt 2>&1
   if grep "__clang__" conftest.txt >/dev/null 2>&1; then
-    HS_CPP_ARGS="-E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs $HS_CPP_ARGS"
+    HS_CPP_ARGS="-E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs"
   else
       $HS_CPP_CMD  -v > conftest.txt 2>&1
       if  grep "gcc" conftest.txt >/dev/null 2>&1; then
-          HS_CPP_ARGS="-E -undef -traditional $HS_CPP_ARGS"
+          HS_CPP_ARGS="-E -undef -traditional"
         else
           $HS_CPP_CMD  --version > conftest.txt 2>&1
           if grep "cpphs" conftest.txt >/dev/null 2>&1; then
@@ -64,6 +64,6 @@ AC_ARG_WITH(hs-cpp-flags,
 )
 
 $1=$HS_CPP_CMD
-$2=$HS_CPP_ARGS
+$2="$HS_CPP_ARGS $2"
 
 ])


=====================================
m4/fp_setup_windows_toolchain.m4
=====================================
@@ -133,6 +133,7 @@ AC_DEFUN([FP_SETUP_WINDOWS_TOOLCHAIN],[
     dnl configuration to the bundled windows toolchain, and these are the
     dnl options required by the bundled windows toolchain.
     USER_CFLAGS="$CFLAGS"
+    USER_CPP_ARGS="$CONF_CPP_OPTS_STAGE2"
     USER_CXXFLAGS="$CXXFLAGS"
     USER_HS_CPP_ARGS="$HaskellCPPArgs"
     USER_LDFLAGS="$CONF_GCC_LINKER_OPTS_STAGE2"



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/506e784c09dd617ca5ff98aa298389e17e32d447

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/506e784c09dd617ca5ff98aa298389e17e32d447
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/20230808/0a458c9e/attachment-0001.html>


More information about the ghc-commits mailing list