Skip to content

Commit ff8c52e

Browse files
chenming1986zhouganqing
authored and
zhouganqing
committed
ax_gcc_func_attribute: Revise the detection of unknown attributes
GCC outputs a warning when Wstrict-prototypes is on, in such case the attribute detection always fails even if the attribute is actually supported. This change checks for the "-Wattributes" warning in conftest.err instead of the existence of the file. Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/php8.1/+bug/1882279 Forwarded: php/php-src#8483 Origin: http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commitdiff;h=df0894ad1a8195df67a52108b931e07d708cec9a Last-Update: 2022-05-02 Gbp-Pq: Name 0046-Update-gcc-func-attr-macro.patch
1 parent 6960492 commit ff8c52e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/ax_gcc_func_attribute.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
227227
dnl GCC doesn't exit with an error if an unknown attribute is
228228
dnl provided but only outputs a warning, so accept the attribute
229229
dnl only if no warning were issued.
230-
[AS_IF([test -s conftest.err],
230+
[AS_IF([grep -- -Wattributes conftest.err],
231231
[AS_VAR_SET([ac_var], [no])],
232232
[AS_VAR_SET([ac_var], [yes])])],
233233
[AS_VAR_SET([ac_var], [no])])

0 commit comments

Comments
 (0)