1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

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
This commit is contained in:
Tom Lane
2019-10-21 12:32:36 -04:00
parent 083929372e
commit e167b1ae37
21 changed files with 53 additions and 22 deletions

5
configure vendored
View File

@ -728,6 +728,7 @@ autodepend
TAS
GCC
CPP
CFLAGS_SL
CFLAGS_VECTOR
SUN_STUDIO_CC
OBJEXT
@ -5143,7 +5144,6 @@ fi
fi
CFLAGS_VECTOR=$CFLAGS_VECTOR
# supply -g if --enable-debug
@ -5182,6 +5182,9 @@ fi
# the automatic additions.
CFLAGS="$CFLAGS $user_CFLAGS"
# The template file must set up CFLAGS_SL; we don't support user override
# Check if the compiler still works with the final flag settings
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
$as_echo_n "checking whether the C compiler still works... " >&6; }