summaryrefslogtreecommitdiff
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* Add --enable-memory-sanitizer flagNikita Popov2020-05-201-1/+13
| | | | | | | | | | | | This flag enabled msan late in the pipeline, so that it does not affect configure checks. Otherwise we get a false positive report for openpty availability without -lutil, which will then result in infinite recursion if actually called. This also sets origin tracking to 2, so bump the timeout to 90 minutes.
* Add PTY support to proc_open (again after 16 long years)Alex Dowad2020-05-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2004, a feature was added to proc_open which allowed it to open a PTY, connecting specific FDs in the child process to the slave end of the PTY and returning the master end of the PTY (wrapped as a PHP stream) in the `$pipes` array. However, this feature was disabled just about a month later. Little information is available about why this was done, but from talking to the original implementer, it seems there were portability problems with some rare flavors of Unix. Re-enable this feature with a simplified implementation which uses openpty(). No attempt is made to support PTYs if the platform does not have openpty(). The configure script checks if linking with -lutil is necessary to use openpty(), but if anything else is required, like including some special header or linking with some other library, PTY support will be disabled. The original PTY support for proc_open automatically daemonized the child process (disassociating it from the TTY session and process group of the parent). However, I don't think this is a good idea. Just because a user opens a child process in a PTY, it doesn't mean they want it to continue running even when the parent process is killed. Of course, if the child process is some kind of server, it will likely daemonize itself; but we have no reason to preempt that decision. It turns out that since 2015, there has been one test case for PTY support in proc_open() in the test suite. This test was added in GitHub PR #1588 (https://github.com/php/php-src/pull/1588). That PR mentioned that the PHP binary in the Debian/Ubuntu repositories is patched to *enable* PTY support. Checking the Debian PHP repository (https://salsa.debian.org/php-team/php.git) shows that this is still true. Debian's patch does not modify the implementation from 2004 in any way; it just removes the #if 0 line which disables it. Naturally, the test case is skipped if PTY support is not enabled. This means that ever since it was added, every test run against the 'vanilla' PHP codebase has skipped it. Interestingly, the test case which was added in 2015 fails on my Linux Mint PC... both with this simplified implementation *and* when enabling the original implementation. Investigation reveals the reason: when the child process using the slave end of the PTY exits and its FDs are all closed, and all buffered data is read from the master end of the PTY, any further attempt to read from the master end fails with EIO. The test case seems to expect that reading from the master end will always return an empty string if no data is available. Likely this is because PHP's fread() was updated to report errors from the underlying system calls only recently. One way out of this dilemma: IF at least one FD referring to the slave end of the PTY is kept open *in the parent process*, the failure with EIO will not occur even after the child process exits. However, that would raise another issue: we would need a way to ensure the FD will be closed eventually in long-running programs. Another discovery made while testing this code is that fread() does not always return all the data written to the slave end of the PTY in a single call, even if the data was written with a single syscall and it is only a few bytes long. Specifically, when the child process in the test case writes "foo\n" to the PTY, the parent sometimes receives "foo" (3 bytes) and sometimes "foo\r\n" (5 bytes). (The "\r" is from the TTY line discipline converting "\n" to "\r\n".) A second call to fread() does return the remaining bytes, though sometimes all the data is read in the first call, and by the time the second call is made, the child process has already exited. It seems that liberal use of the @ operator is needed when using fread() on pipes. Thanks to Nikita Popov for suggesting that we should just use openpty() rather than grantpt(), unlockpt(), etc.
* Merge branch 'PHP-7.4'Nikita Popov2020-05-141-0/+6
|\ | | | | | | | | | | * PHP-7.4: Fix lcov genhtml: ERROR: cannot read [file] Properly detect CRC32 APIs on aarch64 from configure
| * Properly detect CRC32 APIs on aarch64 from configureOndřej Surý2020-05-141-0/+6
| | | | | | | | | | | | | | The CRC32 APIs are optional for armv8-a. They became mandatory since armv8.1-a. Closes GH-5564.
| * The 7.4 branch is now for 7.4.6Derick Rethans2020-03-311-1/+1
| |
* | Reapply "Remove configure checks for supported instruction sets"Nikita Popov2020-05-111-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I reverted this previously for 7.4 because of bug #78769. Relanding it now for master, because I still believe that this change is right, and if it causes complications, those indicate a bug elsewhere. --- These were checking whether the instruction set is supported by the host CPU, however they were only used to condition on whether this instruction set is targeted at all. It would still use dynamic dispatch (e.g. based on ifunc resolvers) to select the actual implementation. Whether the target is guaranteed to support the instruction set without dispatch is determined based on pre-defined macros like __SSE2__. This removes the configure-time builtin cpu checks to remove confusion. Additionally this allows targeting an architecture that is newer than the host architecture.
* | Nothing in codebase cares whether platform has fpclass()Alex Dowad2020-04-241-1/+0
| | | | | | | | | | | | Therefore, don't bother checking for it in 'configure' script. Closes GH-5453
* | Drop wchar header check as always defined since C95George Peter Banyard2020-03-311-1/+0
| |
* | Remove rand_r implementationNikita Popov2020-03-261-1/+0
| | | | | | | | | | We already use our own mt13397 implementation nowadays, so we no longer need this shim.
* | Remove HAVE_REALPATH checksNikita Popov2020-03-261-1/+0
| | | | | | | | | | | | | | We do not actually use realpath(), but a custom implementation. Make sure the realpath() function is always available. Closes GH-5290.
* | Merge branch 'PHP-7.4'Nikita Popov2020-03-101-0/+1
|\ \ | |/ | | | | | | * PHP-7.4: Check for sys/auxv.h before using it.
| * Check for sys/auxv.h before using it.Peter Seiderer2020-03-101-0/+1
| | | | | | | | | | | | | | | | | | Fixes aarch64 compile with uclibc-ng (does not provide sys/auxv.h header file). Closes GH-5248. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
| * PHP-7.4 is now 7.4.5-devDerick Rethans2020-03-031-1/+1
| |
* | Remove mergesort implementationNikita Popov2020-02-271-1/+1
| | | | | | | | | | | | php_mergesort() isn't being used for anything, and hasn't been for a long time. Even if we wanted to use a stable sort, this isn't the implementation we'd use...
* | Merge branch 'PHP-7.4'Nikita Popov2020-02-181-14/+0
|\ \ | |/ | | | | | | * PHP-7.4: Don't use VLA in mysqlnd auth
| * Don't use VLA in mysqlnd authNikita Popov2020-02-181-14/+0
| | | | | | | | | | We use alloca instead of VLA. This should also allow building this code on Windows.
* | Merge branch 'PHP-7.4'Dmitry Stogov2020-01-291-7/+36
|\ \ | |/ | | | | | | * PHP-7.4: Fixed bug #79092 (Building with clang+lld-9 results in a broken PHP binary)
| * Fixed bug #79092 (Building with clang+lld-9 results in a broken PHP binary)Dmitry Stogov2020-01-291-7/+36
| |
| * Fix #79086: Bump version not appliedChristoph M. Becker2020-01-091-1/+1
| | | | | | | | We must not forget to update the version in configure.ac as well.
| * PHP-7.4 is now 7.4.2-devDerick Rethans2019-12-101-1/+1
| |
| * PHP-7.4 is now 7.4.1-devDerick Rethans2019-11-151-1/+1
| |
* | Move isinf, isnan, and isfinite to zend_portability.hGeorge Peter Banyard2019-12-051-15/+0
| | | | | | | | Closes GH-4966
* | Remove money_format() functionMáté Kocsis2019-12-051-1/+0
| |
* | Remove obsolete configure checks for isinf, isnan, and isfiniteGeorge Peter Banyard2019-12-041-27/+0
| |
* | Merge branch 'PHP-7.4'Christoph M. Becker2019-11-071-6/+6
|\ \ | |/ | | | | | | * PHP-7.4: Fix #78788: ./configure generates invalid php_version.h
| * Fix #78788: ./configure generates invalid php_version.hmax2019-11-071-6/+6
| | | | | | | | | | Change $SED to "${SED}" such that the IFS is not used to split the output of that variable.
* | Merge branch 'PHP-7.4'Nikita Popov2019-11-041-0/+6
|\ \ | |/ | | | | | | * PHP-7.4: Revert "Remove configure checks for supported instruction sets"
| * Revert "Remove configure checks for supported instruction sets"Nikita Popov2019-11-041-0/+6
| | | | | | | | | | | | | | | | This reverts commit edccf32f7f36a8bc759b9482737e0c3efcb3a005. This was reported to cause issues for as yet unknown reasons in bug #78769. As this was intended as code cleanup, revert this from 7.4 at least. May reapply it to master later.
* | Merge branch 'PHP-7.4'Nikita Popov2019-10-311-6/+0
|\ \ | |/ | | | | | | * PHP-7.4: Remove configure checks for supported instruction sets
| * Remove configure checks for supported instruction setsNikita Popov2019-10-311-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These were checking whether the instruction set is supported by the host CPU, however they were only used to condition on whether this instruction set is targeted at all. It would still use dynamic dispatch (e.g. based on ifunc resolvers) to select the actual implementation. Whether the target is guaranteed to support the instruction set without dispatch is determined based on pre-defined macros like __SSE2__. This removes the configure-time builtin cpu checks to remove confusion. Additionally this allows targeting an architecture that is newer than the host architecture.
* | Fix bug #78681 by renaming libphp8.so to libphp.soNikita Popov2019-10-291-3/+3
| | | | | | | | The major version number is no longer included.
* | Merge branch 'PHP-7.4'Nikita Popov2019-10-111-49/+1
|\ \ | |/
| * Remove configure checks for ltp when using --enable-gcovNikita Popov2019-10-111-49/+1
| | | | | | | | | | gcov builds can also be used with other tools like gcovr, so remove the hard dependency on LTP.
| * Revert "Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI"Dmitry Stogov2019-10-101-3/+1
| | | | | | | | This reverts commit db094b4b2e5ef0f0c30f412ce3a2516e31e17da7.
* | Merge branch 'PHP-7.4'Dmitry Stogov2019-09-171-1/+3
|\ \ | |/ | | | | | | * PHP-7.4: Fixed CLI/CGI/FPM build, when they are built together with Apache SAPI
| * Fixed CLI/CGI/FPM build, when they are built together with Apache SAPIDmitry Stogov2019-09-171-1/+3
| |
* | Various improvements to fuzzer SAPIsNikita Popov2019-09-161-0/+12
| |
* | Port various autoconf bits to C99 compilersFlorian Weimer2019-09-101-0/+2
| | | | | | | | | | | | C99 no longer has implicit function declarations and implicit ints. Current GCC versions enable them as an extension, but this will change in a future GCC version.
* | Merge branch 'PHP-7.4'Peter Kokot2019-08-301-0/+2
|\ \ | |/ | | | | | | | | * PHP-7.4: Update NEWS Fix #78460: PEAR installation failure
| * Fix #78460: PEAR installation failurePeter Kokot2019-08-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When building PHP outside of the source tree: mkdir custom-build-dir cd custom-build-dir ../path/to/php-src/configure The directories need to be manually created including the pear directory so the pear installation PHAR file doesn't need to be downloaded from the remote location. Closes GH-4639
* | Merge branch 'PHP-7.4'Peter Kokot2019-07-241-8/+0
|\ \ | |/ | | | | | | * PHP-7.4: Remove outdated Libtool hack for macs
| * Remove outdated Libtool hack for macsPeter Kokot2019-07-241-8/+0
| | | | | | | | | | | | This was once relevant for older versions of macs and autoconf 2.13. Closes GH-4435
* | Remove HAVE_LOCALE_H and locale.h checkPeter Kokot2019-07-211-2/+0
| | | | | | | | | | | | | | This was a left over for supporting old code in PHP extensions out there. Check is not needed anymore since this is part of C89+ standard. Closes GH-4445
* | Merge branch 'PHP-7.4'Peter Kokot2019-07-181-1/+9
|\ \ | |/ | | | | | | * PHP-7.4: Remove duplicate socklen_t check
| * Remove duplicate socklen_t checkPeter Kokot2019-07-181-1/+9
| | | | | | | | | | | | - Use Autoconf's default AC_CHECK_TYPES Closes GH-4418
* | Merge branch 'PHP-7.4'Peter Kokot2019-07-161-10/+0
|\ \ | |/ | | | | | | | | * PHP-7.4: Update changelog Remove unused build checks
| * Remove unused build checksPeter Kokot2019-07-161-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - yp_get_default_domain was part of ext/yp - functions checks produce HAVE_function_name symbols. These checks are currently not used in php-src neither in the extensions out there. - Removed symbols because they are not used in the code: - HAVE_GCVT - HAVE_PUTENV - HAVE_PUTENV - HAVE_SETVBUF - HAVE_TEMPNAM - HAVE_SIN (sin is also defined in C89 standard) - HAVE_SETSOCKOPT - HAVE_LOCKF - HAVE_ISASCII - HAVE_YP_GET_DEFAULT_DOMAIN (and other yp extension related unused checks) - HAVE_LINK - HAVE_USLEEP is already defined in Windows configuration header - HAVE_LIBBIND has not been used in php-src for a while anymore - HAVE_GETHOSTNAME is duplicated in Windows configuration header Closes GH-4417
* | Merge branch 'PHP-7.4'Peter Kokot2019-07-141-2/+0
|\ \ | |/ | | | | | | * PHP-7.4: Remove usage of PHP_AIX_LDFLAGS
| * Remove usage of PHP_AIX_LDFLAGSPeter Kokot2019-07-141-2/+0
| | | | | | | | | | | | | | These are currently not defined since their usage has been removed via 51ca2dba530883a8e07d6869e66ee6c5b3c978a6 and 53349d69ddf7a2ba128f0928fb3b376422611a3b
* | Merge branch 'PHP-7.4'Peter Kokot2019-07-141-2/+0
|\ \ | |/ | | | | | | * PHP-7.4: Remove duplicate PTHREADS template define