php-src/build
George Peter Banyard 07a2f30417 Extensions should have the final say on their compiler flags
Currently compiler flags passed by extensions using the standard
``PHP_NEW_EXTENSION`` and ``PHP_ADD_SOURCES`` m4 macros are prepended
before the ones defined by ``Zend/Zend.m4``.

This was not really an issue before as ``Zend.m4`` only included
``-Wall`` but since the addition of ``-Wextra`` various issue about
disabling flags have been brought up.

A preliminary attempt was done in commit 5c1cf7669b
but this turns out to be more or less irrelevant.

The root issue is that  ``PHP_NEW_EXTENSION`` and ``PHP_ADD_SOURCES`` call the
``PHP_ADD_SOURCES_X`` macro and pass their flags as the 3rd argument which prepends
the flags. There exists a 6th argument for this macro which appends them but from a
cursory look at https://heap.space/search?full=PHP_ADD_SOURCES_X&project=php-src
this is not used. Moreover, the comment describing this macro explicitly informs
that this macro should not be used directly.

As such we drop the 6th argument of ``PHP_ADD_SOURCES_X`` and move the `special-flags`
argument to be appended instead of prepended.

Closes GH-6204
2020-09-28 13:18:47 +01:00
..
ax_check_compile_flag.m4 Upgrade AX_CHECK_COMPILE_FLAG macro to serial 6 2018-07-28 01:40:02 +02:00
ax_func_which_gethostbyname_r.m4 Move Autoconf Archive macros to a common m4 dir 2019-04-23 20:37:31 +02:00
ax_gcc_func_attribute.m4 Optimized php_addslashes with SSE4.2 instructions 2018-01-15 21:17:50 +08:00
config-stubs Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
config.guess Update bundled config.guess and config.sub 2020-02-15 13:43:31 +01:00
config.sub Update bundled config.guess and config.sub 2020-02-15 13:43:31 +01:00
gen_stub.php Add option to print parameter name stats to gen_stub 2020-09-24 15:16:29 +02:00
genif.sh Refactor genif.sh 2019-07-08 14:58:26 +02:00
libtool.m4 Port various autoconf bits to C99 compilers 2019-09-10 12:32:14 +02:00
ltmain.sh Fix libtool to provide a simple way to generate only "shared" object files or libraries. 2020-04-27 23:31:54 +03:00
Makefile.gcov Unbundle ext/xmlrpc 2020-05-29 16:47:44 +02:00
Makefile.global Remove more leftovers of PHP_DEFINE handling 2020-08-07 17:03:41 +02:00
order_by_dep.awk Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
php_cxx_compile_stdcxx.m4 Update bundled stdxx check macros 2020-02-08 10:13:46 +01:00
php.m4 Extensions should have the final say on their compiler flags 2020-09-28 13:18:47 +01:00
pkg.m4 ext/gd: Use pkg-config to detect the availability of freetype2 2018-11-07 13:05:47 +01:00
print_include.awk Replace the incomprehensible newline escaping with @NEWLINE@ 2001-03-30 14:02:20 +00:00
shtool fix bug #51076 (race condition in shtool's mkdir -p) 2013-10-08 08:37:08 +02:00