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

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



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


Commits:
1651b0f4 by Matthew Pickering at 2023-08-08T12:29:05+01:00
Set USER_CPP_ARGS when setting up windows toolchain

- - - - -
2f07a4ce by Matthew Pickering at 2023-08-08T12:29:41+01:00
fix

- - - - -


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/-/compare/506e784c09dd617ca5ff98aa298389e17e32d447...2f07a4ce7f08babdac632a4af05ee3ee0f628652

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/506e784c09dd617ca5ff98aa298389e17e32d447...2f07a4ce7f08babdac632a4af05ee3ee0f628652
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/6b0b0ef4/attachment-0001.html>


More information about the ghc-commits mailing list