Michael Orlitzky [Wed, 14 Sep 2016 17:13:15 +0000 (13:13 -0400)]
Ship AX_CHECK_COMPILE_FLAG in a separate file to preserve its license.
In commit 086f9ad, I added a new macro AX_CHECK_COMPILE_FLAG from the
autoconf archive. Jakub Zelenka pointed out that the license of the
macro (GPL-3+ with exception) does not agree with the license of PHP
itself (PHP-3.01). We should therefore ship the macro in a separate
file with its own license header. That is allowed and is done for
many other files in the PHP repository.
This commit adds a new top-level "m4" directory and places the
upstream ax_check_compile_flag.m4 file in it. The macro is no longer
inlined; instead, our acinclude.m4 now includes the aforementioned
file with m4_include.
Michael Orlitzky [Sat, 10 Sep 2016 15:20:50 +0000 (11:20 -0400)]
Use AX_CHECK_COMPILE_FLAG macro to check for -fvisibility=hidden support.
The existing check for -fvisibility=hidden support came from a time
when only GCC had it. The test for it used a regular expression to
parse the GCC major version from the output of `$CC --version`, and
would look for version 4 or greater.
The regular expression used to accomplish this is doomed, however,
since GCC can be built with a custom version string
(--with-pkgversion). Moreover, the $CC variable can be set to
something that confuses it but is otherwise valid. For example, it
would fail with CC=x86_64-pc-linux-gnu-gcc.
This commit fixes two aspects of the feature test. First, it no longer
limits the test to GCC. At least clang now supports the flag, and can
make use of it when GCC is its backend. Second, support for the flag
is tested directly, by attempting to pass it to the compiler, rather
than by parsing its version string. The latter is accomplished with a
new macro, AX_CHECK_COMPILE_FLAG, taken from the autoconf archive.
The new macro has been added to acinclude.m4, and the test stanza in
configure.in has been replaced with a single call to the new macro.
Note that the new macro calls AC_PREREQ(2.64) -- a more stringent
requirement than the existing AC_PREREQ(2.59) in configure.in. The
difference represents about six years of autoconf releases, from v2.59
in December of 2003 to v2.64 in July of 2009.
This problem was noticed by Brian Evans, who also suggested the fix.
Merge branch 'PHP-7.1' of git.php.net:php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:php-src: (53 commits)
Fix bug #72785 - allowed_classes only applies to outermost unserialize()
Fix #70752: Depacking with wrong password leaves 0 length files
Unbreak FAST_ZPP dead code
Updated NEWS
Fixes #72590: Opcache restart with kill_all_lockers does not work
Limit editorconfig to C code
Updated NEWS
Updated NEWS
Updated NEWS
Fix #72972, Bad filter for the flags FILTER_FLAG_NO_RES_RANGE and FILTER_FLAG_NO_PRIV_RANGE
Change the name of the second parameter of image writer functions
Added editorconfig file
Implement #47456: Missing PCRE option 'J'
Use integer placeholders, since values can vary with the TDS version
phpdbg: couple of network function return checks. Possible overflow when copy the socket_path configuration.
Same issue as #72926 in another place.
Sync fix for bug #72910 with current upstream
Fix #72994: mbc_to_code() out of bounds read
Bump PHP_API_VERSION
Fix bug #72996
...
Fixes #72590: Opcache restart with kill_all_lockers does not work
ACCEL_LOG_ERROR is special and causes a zend_bailout() and the code
never gets to call kill() in the next line after the logging. Change
the log level to WARNING.
Fix some sizeof(zend_long) > sizeof(size_t) issues
Fix a couple of mistakes that are only relevant if
sizeof(zend_long) > sizeof(size_t).
* Fix cast order in string offset check: Negation should happen
after the (zend_long) cast, otherwise sign extension does not
occur.
* Use Z_UL in zend_inference.
* Use aligned size for HT_USED_SIZE in zend_persist: The issue is
that on x86-32 uint64_t is considered to be 4-aligned, so the
alignment assumption does not hold.
Change the name of the second parameter of image writer functions
As of PHP 5.4.0 the second parameter of all image writer functions (except
imagexbm) accepts also a stream resource. Therefore the parameter name
`filename` is inappropriate. We change it to `to` according to what it's
already called in _php_image_output_ctx().
We consider the reflection only related BC break acceptable for a minor version.