Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e19bd4

Browse files
committed
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 awayat -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
1 parent99c51d5 commit4e19bd4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎configure

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18238,6 +18238,10 @@ fi
1823818238
# On most platforms, if perl.h is there then libperl.so will be too, but at
1823918239
# this writing Debian packages them separately. There is no known reason to
1824018240
# waste cycles on separate probes for the Tcl or Python libraries, though.
18241+
# On some Red Hat platforms, the link attempt can fail if we don't use
18242+
# CFLAGS_SL while building the test program.
18243+
ac_save_CFLAGS=$CFLAGS
18244+
CFLAGS="$CFLAGS $CFLAGS_SL"
1824118245
pgac_save_LIBS=$LIBS
1824218246
LIBS="$perl_embed_ldflags"
1824318247
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
@@ -18267,6 +18271,7 @@ fi
1826718271
rm -f core conftest.err conftest.$ac_objext \
1826818272
conftest$ac_exeext conftest.$ac_ext
1826918273
LIBS=$pgac_save_LIBS
18274+
CFLAGS=$ac_save_CFLAGS
1827018275
CPPFLAGS=$ac_save_CPPFLAGS
1827118276
fi
1827218277

‎configure.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,6 +2264,10 @@ if test "$with_perl" = yes; then
22642264
# On most platforms, if perl.h is there then libperl.so will be too, but at
22652265
# this writing Debian packages them separately. There is no known reason to
22662266
# waste cycles on separate probes for the Tcl or Python libraries, though.
2267+
# On some Red Hat platforms, the link attempt can fail if we don't use
2268+
# CFLAGS_SL while building the test program.
2269+
ac_save_CFLAGS=$CFLAGS
2270+
CFLAGS="$CFLAGS $CFLAGS_SL"
22672271
pgac_save_LIBS=$LIBS
22682272
LIBS="$perl_embed_ldflags"
22692273
AC_MSG_CHECKING([for libperl])
@@ -2275,6 +2279,7 @@ if test "$with_perl" = yes; then
22752279
[AC_MSG_RESULT(no)
22762280
AC_MSG_ERROR([libperl library is required for Perl])])
22772281
LIBS=$pgac_save_LIBS
2282+
CFLAGS=$ac_save_CFLAGS
22782283
CPPFLAGS=$ac_save_CPPFLAGS
22792284
fi
22802285

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp