Use CFLAGS_SL while probing linkability of libperl.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 6d2b18d0701ba5637a149467478a4c68af0a0a43
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2019-10-21T17:52:26Z
Releases: 9.4.25
Use CFLAGS_SL while probing linkability of libperl.

On recent Red Hat platforms (at least RHEL 8 and Fedora 30, maybe older),
configure's probe for libperl failed if the user forces CFLAGS to be -O0.
This is because some code in perl's inline.h fails to be optimized away
at -O0, and said code doesn't work if compiled without -fPIC.

To fix, add CFLAGS_SL to the compile flags used during the libperl probe.
This is a better simulation of the way that plperl is built, anyway,
so it might forestall other issues in future.

Per gripe from Kyotaro Horiguchi.  Back-patch to all supported branches,
since people might want to build older branches on these platforms.

Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota.ntt@gmail.com

Files

PathChange+/−
configure modified +5 −0
configure.in modified +5 −0

Discussion