diff options
| author | Andres Freund | 2018-08-24 01:33:40 +0000 |
|---|---|---|
| committer | Andres Freund | 2018-08-24 01:33:57 +0000 |
| commit | d9dd406fe281d22d5238d3c26a7182543c711e74 (patch) | |
| tree | acf080f7799ae2ce67b68aa28db812266ff238fe /configure.in | |
| parent | a569eea6998a26689409ff6eb5fce2c1eab0f5e1 (diff) | |
Require C99 (and thus MSCV 2013 upwards).
In 86d78ef50e01 I enabled configure to check for C99 support, with the
goal of checking which platforms support C99. While there are a few
machines without C99 support among our buildfarm animals,
de-supporting them for v12 was deemed acceptable.
While not tested in aforementioned commit, the biggest increase in
minimum compiler version comes from MSVC, which gained C99 support
fairly late. The subset in MSVC 2013 is sufficient for our needs, at
this point. While that is a significant increase in minimum version,
the existing windows binaries are already built with a new enough
version.
Make configure error out if C99 support could not be detected. For
MSVC builds, increase the minimum version to 2013.
The increase to MSVC 2013 allows us to get rid of VCBuildProject.pm,
as that was only required for MSVC 2005/2008.
Author: Andres Freund
Discussion: https://postgr.es/m/97d4b165-192d-3605-749c-f614a0c4e783@2ndquadrant.com
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 6e141064e5..5869ab7c5b 100644 --- a/configure.in +++ b/configure.in @@ -359,6 +359,13 @@ esac AC_PROG_CC([$pgac_cc_list]) AC_PROG_CC_C99() + +# Error out if the compiler does not support C99, as the codebase +# relies on that. +if test "$ac_cv_prog_cc_c99" = no; then + AC_MSG_ERROR([C compiler "$CC" does not support C99]) +fi + AC_PROG_CXX([$pgac_cxx_list]) # Check if it's Intel's compiler, which (usually) pretends to be gcc, @@ -477,6 +484,9 @@ if test "$GCC" = yes -a "$ICC" = no; then # These work in some but not all gcc versions PGAC_PROG_CC_CFLAGS_OPT([-Wdeclaration-after-statement]) # -Wdeclaration-after-statement isn't applicable for C++ + # Really don't want VLAs to be used in our dialect of C + PGAC_PROG_CC_CFLAGS_OPT([-Werror=vla]) + # -Wvla is not applicable for C++ PGAC_PROG_CC_CFLAGS_OPT([-Wendif-labels]) PGAC_PROG_CXX_CFLAGS_OPT([-Wendif-labels]) PGAC_PROG_CC_CFLAGS_OPT([-Wmissing-format-attribute]) |
