Skip to content

Commit 1f38c00

Browse files
m6w6nikic
authored andcommitted
fix #81656: GCC-11 silently ignores -R
Closes GH-7688.
1 parent 582a291 commit 1f38c00

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2022, PHP 8.0.15
44

5+
- Core:
6+
. Fixed bug #81656 (GCC-11 silently ignores -R). (Michael Wallner)
57

68
16 Dec 2021, PHP 8.0.14
79

build/php.m4

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -275,25 +275,25 @@ dnl
275275
dnl Checks for -R, etc. switch.
276276
dnl
277277
AC_DEFUN([PHP_RUNPATH_SWITCH],[
278-
AC_MSG_CHECKING([if compiler supports -R])
279-
AC_CACHE_VAL(php_cv_cc_dashr,[
278+
AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
279+
AC_CACHE_VAL(php_cv_cc_rpath,[
280280
SAVE_LIBS=$LIBS
281-
LIBS="-R /usr/$PHP_LIBDIR $LIBS"
282-
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_dashr=yes],[php_cv_cc_dashr=no])
281+
LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
282+
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_rpath=yes],[php_cv_cc_rpath=no])
283283
LIBS=$SAVE_LIBS])
284-
AC_MSG_RESULT([$php_cv_cc_dashr])
285-
if test $php_cv_cc_dashr = "yes"; then
286-
ld_runpath_switch=-R
284+
AC_MSG_RESULT([$php_cv_cc_rpath])
285+
if test $php_cv_cc_rpath = "yes"; then
286+
ld_runpath_switch=-Wl,-rpath,
287287
else
288-
AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
289-
AC_CACHE_VAL(php_cv_cc_rpath,[
288+
AC_MSG_CHECKING([if compiler supports -R])
289+
AC_CACHE_VAL(php_cv_cc_dashr,[
290290
SAVE_LIBS=$LIBS
291-
LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
292-
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_rpath=yes],[php_cv_cc_rpath=no])
291+
LIBS="-R /usr/$PHP_LIBDIR $LIBS"
292+
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],[php_cv_cc_dashr=yes],[php_cv_cc_dashr=no])
293293
LIBS=$SAVE_LIBS])
294-
AC_MSG_RESULT([$php_cv_cc_rpath])
295-
if test $php_cv_cc_rpath = "yes"; then
296-
ld_runpath_switch=-Wl,-rpath,
294+
AC_MSG_RESULT([$php_cv_cc_dashr])
295+
if test $php_cv_cc_dashr = "yes"; then
296+
ld_runpath_switch=-R
297297
else
298298
dnl Something innocuous.
299299
ld_runpath_switch=-L

0 commit comments

Comments
 (0)