[Git][ghc/ghc][wip/T22566] 2 commits: configure: Drop uses of AC_PROG_CC_C99

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Fri Dec 16 17:27:31 UTC 2022



Ben Gamari pushed to branch wip/T22566 at Glasgow Haskell Compiler / GHC


Commits:
48d992cd by Ben Gamari at 2022-12-16T12:27:17-05:00
configure: Drop uses of AC_PROG_CC_C99

As noted in #22566, this macro is deprecated as of autoconf-2.70
`AC_PROG_CC` now sets `ac_cv_prog_cc_c99` itself.

Closes #22566.

- - - - -
9238d0e4 by Ben Gamari at 2022-12-16T12:27:24-05:00
configure: Use AS_HELP_STRING instead of AC_HELP_STRING

The latter has been deprecated.

See #22566.

- - - - -


3 changed files:

- configure.ac
- distrib/configure.ac.in
- − m4/fp_set_cflags_c99.m4


Changes:

=====================================
configure.ac
=====================================
@@ -143,7 +143,7 @@ if test "$EnableDistroToolchain" = "YES"; then
 fi
 
 AC_ARG_ENABLE(asserts-all-ways,
-[AC_HELP_STRING([--enable-asserts-all-ways],
+[AS_HELP_STRING([--enable-asserts-all-ways],
                 [Usually ASSERTs are only compiled in the DEBUG way,
                  this will enable them in all ways.])],
   [FP_CAPITALIZE_YES_NO(["$enableval"], [EnableAssertsAllWays])],
@@ -485,11 +485,6 @@ FP_CPP_CMD_WITH_ARGS(HaskellCPPCmd, HaskellCPPArgs)
 AC_SUBST([HaskellCPPCmd])
 AC_SUBST([HaskellCPPArgs])
 
-FP_SET_CFLAGS_C99([CC],[CFLAGS],[CPPFLAGS])
-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])
-
 dnl ** Which ld to use
 dnl --------------------------------------------------------------
 AC_ARG_VAR(LD,[Use as the path to ld. See also --disable-ld-override.])


=====================================
distrib/configure.ac.in
=====================================
@@ -111,11 +111,6 @@ FP_CPP_CMD_WITH_ARGS(HaskellCPPCmd, HaskellCPPArgs)
 AC_SUBST([HaskellCPPCmd])
 AC_SUBST([HaskellCPPArgs])
 
-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])
-
 dnl ** Which ld to use?
 dnl --------------------------------------------------------------
 FIND_LD([$target],[GccUseLdOpt])


=====================================
m4/fp_set_cflags_c99.m4 deleted
=====================================
@@ -1,38 +0,0 @@
-# FP_SET_CFLAGS_C99
-# ----------------------------------
-# figure out which CFLAGS are needed to place the compiler into C99 mode
-# $1 is name of CC variable (unmodified)
-# $2 is name of CC flags variable (augmented if needed)
-# $3 is name of CPP flags variable (augmented if needed)
-AC_DEFUN([FP_SET_CFLAGS_C99],
-[
-    dnl save current state of AC_PROG_CC_C99
-    FP_COPY_SHELLVAR([CC],[fp_save_CC])
-    FP_COPY_SHELLVAR([CFLAGS],[fp_save_CFLAGS])
-    FP_COPY_SHELLVAR([CPPFLAGS],[fp_save_CPPFLAGS])
-    FP_COPY_SHELLVAR([ac_cv_prog_cc_c99],[fp_save_cc_c99])
-    dnl set local state
-    CC="$$1"
-    CFLAGS="$$2"
-    CPPFLAGS="$$3"
-    unset ac_cv_prog_cc_c99
-    dnl perform detection
-    AC_PROG_CC_C99
-    fp_cc_c99="$ac_cv_prog_cc_c99"
-    case "x$ac_cv_prog_cc_c99" in
-      x)   ;; # noop
-      xno) AC_MSG_ERROR([C99-compatible compiler needed]) ;;
-      *)   $2="$$2 $ac_cv_prog_cc_c99"
-           $3="$$3 $ac_cv_prog_cc_c99"
-           ;;
-    esac
-    dnl restore saved state
-    FP_COPY_SHELLVAR([fp_save_CC],[CC])
-    FP_COPY_SHELLVAR([fp_save_CFLAGS],[CFLAGS])
-    FP_COPY_SHELLVAR([fp_save_CPPFLAGS],[CPPFLAGS])
-    FP_COPY_SHELLVAR([fp_save_cc_c99],[ac_cv_prog_cc_c99])
-    dnl cleanup
-    unset fp_save_CC
-    unset fp_save_CFLAGS
-    unset fp_save_cc_c99
-])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/984f3fec02e5757c7eb684245bb9cfb91ec63876...9238d0e48f72c9958cf2f145cfbc52cdcdd933e7

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/984f3fec02e5757c7eb684245bb9cfb91ec63876...9238d0e48f72c9958cf2f145cfbc52cdcdd933e7
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/20221216/7f97b239/attachment-0001.html>


More information about the ghc-commits mailing list