Select CFLAGS_SL at configure time, not in platform-specific Makefiles.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Oct 2019 16:32:36 +0000 (12:32 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Oct 2019 16:32:36 +0000 (12:32 -0400)
commit727c2ccfefb5d8b77316902bce2427b7864be997
tree4f88292726a998c882589fc106b832e625d2ebce
parent930787c7fab98f14f1e4a98a201a7f7cef2e55bc
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: http://postgr.es/m/20191010.144533.263180400.horikyota.ntt@gmail.com
27 files changed:
configure
configure.in
src/Makefile.global.in
src/makefiles/Makefile.cygwin
src/makefiles/Makefile.freebsd
src/makefiles/Makefile.hpux
src/makefiles/Makefile.linux
src/makefiles/Makefile.netbsd
src/makefiles/Makefile.openbsd
src/makefiles/Makefile.osf
src/makefiles/Makefile.sco
src/makefiles/Makefile.solaris
src/makefiles/Makefile.unixware
src/makefiles/Makefile.win32
src/template/aix
src/template/cygwin
src/template/darwin
src/template/freebsd
src/template/hpux
src/template/linux
src/template/netbsd
src/template/openbsd
src/template/osf
src/template/sco
src/template/solaris
src/template/unixware
src/template/win32