Skip to content

Commit 335b940

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: fix #81656: GCC-11 silently ignores -R
2 parents e32642c + 53ae2b1 commit 335b940

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

build/php.m4

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -279,25 +279,25 @@ dnl
279279
dnl Checks for -R, etc. switch.
280280
dnl
281281
AC_DEFUN([PHP_RUNPATH_SWITCH],[
282-
AC_MSG_CHECKING([if compiler supports -R])
283-
AC_CACHE_VAL(php_cv_cc_dashr,[
282+
AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
283+
AC_CACHE_VAL(php_cv_cc_rpath,[
284284
SAVE_LIBS=$LIBS
285-
LIBS="-R /usr/$PHP_LIBDIR $LIBS"
286-
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_dashr=yes],[php_cv_cc_dashr=no])
285+
LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
286+
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_rpath=yes],[php_cv_cc_rpath=no])
287287
LIBS=$SAVE_LIBS])
288-
AC_MSG_RESULT([$php_cv_cc_dashr])
289-
if test $php_cv_cc_dashr = "yes"; then
290-
ld_runpath_switch=-R
288+
AC_MSG_RESULT([$php_cv_cc_rpath])
289+
if test $php_cv_cc_rpath = "yes"; then
290+
ld_runpath_switch=-Wl,-rpath,
291291
else
292-
AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
293-
AC_CACHE_VAL(php_cv_cc_rpath,[
292+
AC_MSG_CHECKING([if compiler supports -R])
293+
AC_CACHE_VAL(php_cv_cc_dashr,[
294294
SAVE_LIBS=$LIBS
295-
LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
296-
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_rpath=yes],[php_cv_cc_rpath=no])
295+
LIBS="-R /usr/$PHP_LIBDIR $LIBS"
296+
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_dashr=yes],[php_cv_cc_dashr=no])
297297
LIBS=$SAVE_LIBS])
298-
AC_MSG_RESULT([$php_cv_cc_rpath])
299-
if test $php_cv_cc_rpath = "yes"; then
300-
ld_runpath_switch=-Wl,-rpath,
298+
AC_MSG_RESULT([$php_cv_cc_dashr])
299+
if test $php_cv_cc_dashr = "yes"; then
300+
ld_runpath_switch=-R
301301
else
302302
dnl Something innocuous.
303303
ld_runpath_switch=-L

0 commit comments

Comments
 (0)