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

Commitd995fd6

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 parent44273ce commitd995fd6

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
@@ -18490,6 +18490,10 @@ fi
1849018490
# On most platforms, if perl.h is there then libperl.so will be too, but at
1849118491
# this writing Debian packages them separately. There is no known reason to
1849218492
# waste cycles on separate probes for the Tcl or Python libraries, though.
18493+
# On some Red Hat platforms, the link attempt can fail if we don't use
18494+
# CFLAGS_SL while building the test program.
18495+
ac_save_CFLAGS=$CFLAGS
18496+
CFLAGS="$CFLAGS $CFLAGS_SL"
1849318497
pgac_save_LIBS=$LIBS
1849418498
LIBS="$perl_embed_ldflags"
1849518499
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
@@ -18519,6 +18523,7 @@ fi
1851918523
rm -f core conftest.err conftest.$ac_objext \
1852018524
conftest$ac_exeext conftest.$ac_ext
1852118525
LIBS=$pgac_save_LIBS
18526+
CFLAGS=$ac_save_CFLAGS
1852218527
CPPFLAGS=$ac_save_CPPFLAGS
1852318528
fi
1852418529

‎configure.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,6 +2253,10 @@ if test "$with_perl" = yes; then
22532253
# On most platforms, if perl.h is there then libperl.so will be too, but at
22542254
# this writing Debian packages them separately. There is no known reason to
22552255
# waste cycles on separate probes for the Tcl or Python libraries, though.
2256+
# On some Red Hat platforms, the link attempt can fail if we don't use
2257+
# CFLAGS_SL while building the test program.
2258+
ac_save_CFLAGS=$CFLAGS
2259+
CFLAGS="$CFLAGS $CFLAGS_SL"
22562260
pgac_save_LIBS=$LIBS
22572261
LIBS="$perl_embed_ldflags"
22582262
AC_MSG_CHECKING([for libperl])
@@ -2264,6 +2268,7 @@ if test "$with_perl" = yes; then
22642268
[AC_MSG_RESULT(no)
22652269
AC_MSG_ERROR([libperl library is required for Perl])])
22662270
LIBS=$pgac_save_LIBS
2271+
CFLAGS=$ac_save_CFLAGS
22672272
CPPFLAGS=$ac_save_CPPFLAGS
22682273
fi
22692274

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp