Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
haskell-wasm
GHC
Commits
28b9cee0
Commit
28b9cee0
authored
1 year ago
by
Rodrigo Mesquita
Committed by
Marge Bot
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
configure: Check C99-compat for Cmm preprocessor
Fixes #24815
parent
710665bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
m4/fp_cmm_cpp_cmd_with_args.m4
+25
-4
25 additions, 4 deletions
m4/fp_cmm_cpp_cmd_with_args.m4
with
25 additions
and
4 deletions
m4/fp_cmm_cpp_cmd_with_args.m4
+
25
−
4
View file @
28b9cee0
...
...
@@ -2,8 +2,10 @@
# --------------------------
# sets CMM_CPP command and its arguments
#
# $1 = the variable to set to Cmm CPP command
# $2 = the variable to set to Cmm CPP command arguments
# $1 = the path to the C compiler
# $2 = the variable to set to Cmm CPP command
# $3 = the variable to set to Cmm CPP command arguments
# $4 = whether Cmm CPP command supports -g0
AC_DEFUN([FP_CMM_CPP_CMD_WITH_ARGS],[
...
...
@@ -46,14 +48,33 @@ AC_ARG_WITH(cmm-cpp-flags,
AC_MSG_CHECKING([whether the C-- preprocessor "$CMM_CPP_CMD" $CMM_CPP_ARGS supports -g0])
: > conftest.c
if "$CMM_CPP_CMD" $CMM_CPP_ARGS conftest.c -g0 >/dev/null 2>&1; then
if "$CMM_CPP_CMD" $CMM_CPP_ARGS conftest.c
-o conftest
-g0 >/dev/null 2>&1; then
$4=True
AC_MSG_RESULT([yes])
else
$4=False
AC_MSG_RESULT([no])
fi
rm -f conftest.c
AC_MSG_CHECKING([the C-- preprocessor for C99 support])
cat > conftest.c <<EOF
#include <stdio.h>
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
# error "Compiler does not advertise C99 conformance"
#endif
EOF
if "$CMM_CPP_CMD" $CMM_CPP_ARGS conftest.c -o conftest -g0 >/dev/null 2>&1; then
AC_MSG_RESULT([yes])
else
# Try -std=gnu99
if "$CMM_CPP_CMD" -std=gnu99 $CMM_CPP_ARGS conftest.c -o conftest -g0 >/dev/null 2>&1; then
$3="-std=gnu99 $$3"
AC_MSG_RESULT([needs -std=gnu99])
else
AC_MSG_ERROR([C99-compatible compiler needed])
fi
fi
rm -f conftest.c conftest.o conftest
$2="$CMM_CPP_CMD"
...
...
This diff is collapsed.
Click to expand it.
Cheng Shao
@TerrorJack
mentioned in commit
a3860bab
·
3 months ago
mentioned in commit
a3860bab
mentioned in commit a3860bab8cb002c8355dad254d7fa80a7d48edc3
Toggle commit list
Cheng Shao
@TerrorJack
mentioned in commit
f368e235
·
3 months ago
mentioned in commit
f368e235
mentioned in commit f368e23550f5da56d7fc717cc860c8113abb714f
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment