[Git][ghc/ghc][wip/ghc-toolchain-fixes] 2 commits: HsCppArgs: Augment the HsCppOptions

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Tue Aug 8 10:59:49 UTC 2023



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


Commits:
ad16aadf by Matthew Pickering at 2023-08-08T11:58:42+01:00
HsCppArgs: Augment the HsCppOptions

This is important when we pass -I when setting up the windows toolchain.

- - - - -
489a5e6d by Matthew Pickering at 2023-08-08T11:59:33+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="-E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs $HS_CPP_ARGS"
   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="-E -undef -traditional $HS_CPP_ARGS"
         else
           $HS_CPP_CMD  --version > conftest.txt 2>&1
           if grep "cpphs" conftest.txt >/dev/null 2>&1; then


=====================================
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/891ee449ad6abe9757bfc76a5a8272ba718eef39...489a5e6da673001bcd100b5df173b2c0be750bd2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/891ee449ad6abe9757bfc76a5a8272ba718eef39...489a5e6da673001bcd100b5df173b2c0be750bd2
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/2ce7e233/attachment-0001.html>


More information about the ghc-commits mailing list