[Git][ghc/ghc][wip/romes/24815] configure: Check C99-compat for Cmm preprocessor

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Wed May 15 07:44:30 UTC 2024



Rodrigo Mesquita pushed to branch wip/romes/24815 at Glasgow Haskell Compiler / GHC


Commits:
20b27c9a by Rodrigo Mesquita at 2024-05-15T08:44:17+01:00
configure: Check C99-compat for Cmm preprocessor

Fixes #24815

- - - - -


2 changed files:

- configure.ac
- distrib/configure.ac.in


Changes:

=====================================
configure.ac
=====================================
@@ -431,6 +431,16 @@ FP_SET_CFLAGS_C99([CC_STAGE0],[CONF_CC_OPTS_STAGE0],[CONF_CPP_OPTS_STAGE0])
 FP_SET_CFLAGS_C99([CC],[CONF_CC_OPTS_STAGE1],[CONF_CPP_OPTS_STAGE1])
 FP_SET_CFLAGS_C99([CC],[CONF_CC_OPTS_STAGE2],[CONF_CPP_OPTS_STAGE2])
 
+# Set C99 flags for Cmm preprocessor too when using CC
+dnl (The second arg is a dummy variable because it is unnecessary in this case)
+void_arg_cmmp=""
+if test "$CC_STAGE0" = "$CmmCPPCmd_STAGE0"; then
+    FP_SET_CFLAGS_C99([CmmCPPCmd_STAGE0],[void_arg_cmmp],[CmmCPPArgs_STAGE0])
+fi
+if test "$CC" = "$CmmCPPCmd"; then
+    FP_SET_CFLAGS_C99([CmmCPPCmd],[void_arg_cmmp],[CmmCPPArgs])
+fi
+
 dnl ** Do we have a compatible emsdk version?
 dnl --------------------------------------------------------------
 EMSDK_VERSION("3.1.20", "", "")


=====================================
distrib/configure.ac.in
=====================================
@@ -142,10 +142,19 @@ AC_SUBST([CmmCPPArgs])
 AC_SUBST([CmmCPPSupportsG0])
 
 FP_SET_CFLAGS_C99([CC],[CFLAGS],[CPPFLAGS])
-dnl FP_SET_CFLAGS_C99([CC_STAGE0],[CONF_CC_OPTS_STAGE0],[CONF_CPP_OPTS_STAGE0])
 FP_SET_CFLAGS_C99([CC],[CONF_CC_OPTS_STAGE1],[CONF_CPP_OPTS_STAGE1])
 FP_SET_CFLAGS_C99([CC],[CONF_CC_OPTS_STAGE2],[CONF_CPP_OPTS_STAGE2])
 
+# Set C99 flags for Cmm preprocessor too when using CC
+dnl (The second arg is a dummy variable because it is unnecessary in this case)
+void_arg_cmmp=""
+if test "$CC_STAGE0" = "$CmmCPPCmd_STAGE0"; then
+    FP_SET_CFLAGS_C99([CmmCPPCmd_STAGE0],[void_arg_cmmp],[CmmCPPArgs_STAGE0])
+fi
+if test "$CC" = "$CmmCPPCmd"; then
+    FP_SET_CFLAGS_C99([CmmCPPCmd],[void_arg_cmmp],[CmmCPPArgs])
+fi
+
 dnl ** Which ld to use?
 dnl --------------------------------------------------------------
 FIND_LD([$target],[GccUseLdOpt])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/20b27c9aebed875487c02eba655bffed5ec7033c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/20b27c9aebed875487c02eba655bffed5ec7033c
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/20240515/82f20db1/attachment-0001.html>


More information about the ghc-commits mailing list