diff options
| author | Tom Lane | 2019-10-21 16:32:36 +0000 |
|---|---|---|
| committer | Tom Lane | 2019-10-21 16:32:36 +0000 |
| commit | 99c51d5ed88c92db7d9b61b3c53c3d1eea32f9ec (patch) | |
| tree | d3445598f66f01d3a4cd8ea8beea55b22f528ee2 /configure.in | |
| parent | af4477b00cf93c8305aebe3b58ea26499664336e (diff) | |
Select CFLAGS_SL at configure time, not in platform-specific Makefiles.
Move the platform-dependent logic that sets CFLAGS_SL from
src/makefiles/Makefile.foo to src/template/foo, so that the value
is determined at configure time and thus is available while running
configure's tests.
On a couple of platforms this might save a few microseconds of build
time by eliminating a test that make otherwise has to do over and over.
Otherwise it's pretty much a wash for build purposes; in particular,
this makes no difference to anyone who might be overriding CFLAGS_SL
via a make option.
This patch in itself does nothing with the value and thus should not
change any behavior, though you'll probably have to re-run configure
to get a correctly updated Makefile.global. We'll use the new
configure variable in a follow-on patch.
Per gripe from Kyotaro Horiguchi. Back-patch to all supported branches,
because the follow-on patch is a portability bug fix.
Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota.ntt@gmail.com
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.in b/configure.in index b2a71bec23c..5f7e2d0a9b2 100644 --- a/configure.in +++ b/configure.in @@ -536,7 +536,7 @@ elif test "$PORTNAME" = "hpux"; then PGAC_PROG_CXX_CFLAGS_OPT([+Olibmerrno]) fi -AC_SUBST(CFLAGS_VECTOR, $CFLAGS_VECTOR) +AC_SUBST(CFLAGS_VECTOR) # Determine flags used to emit bitcode for JIT inlining. Need to test # for behaviour changing compiler flags, to keep compatibility with @@ -596,8 +596,11 @@ CXXFLAGS="$CXXFLAGS $user_CXXFLAGS" BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS" BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS" -AC_SUBST(BITCODE_CFLAGS, $BITCODE_CFLAGS) -AC_SUBST(BITCODE_CXXFLAGS, $BITCODE_CXXFLAGS) +AC_SUBST(BITCODE_CFLAGS) +AC_SUBST(BITCODE_CXXFLAGS) + +# The template file must set up CFLAGS_SL; we don't support user override +AC_SUBST(CFLAGS_SL) # Check if the compiler still works with the final flag settings # (note, we're not checking that for CXX, which is optional) |
