summaryrefslogtreecommitdiff
path: root/build
Commit message (Collapse)AuthorAgeFilesLines
* Use standard types in fopencookie testNikita Popov2020-08-051-4/+4
| | | | | Instead of internal __size_t / __off64_t types use ssize_t and off64_t. This makes it work on musl as well.
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-07-291-2/+2
|\ | | | | | | | | * PHP-7.3: Fix #79895: support = in PHP_CHECK_GCC_ARG m4 macro
* | Fix lcov genhtml: ERROR: cannot read [file]Gerard Roche2020-05-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lcov is emitting several errors for generated regex files that have no code coverage data. The fix is to add the files to the lcov exlusion list. This is not an issue for CI because it uses gcovr to generate code coverage. The errors: Processing ext/date/lib/parse_date.gcda geninfo: WARNING: could not open /home/code/vendor/php/php-src/parse_date.re geninfo: WARNING: could not open /home/code/vendor/php/php-src/<stdout> geninfo: WARNING: some exclusion markers may be ignored Processing ext/date/lib/parse_tz.gcda Processing ext/date/lib/tm2unixtime.gcda Processing ext/date/lib/parse_iso_intervals.gcda geninfo: WARNING: could not open /home/code/vendor/php/php-src/<stdout> geninfo: WARNING: could not open /home/code/vendor/php/php-src/parse_iso_intervals.re geninfo: WARNING: some exclusion markers may be ignored ... genhtml: ERROR: cannot read /home/code/vendor/php/php-src/parse_date.re Processing file /home/code/vendor/php/php-src/parse_date.re make: *** [Makefile:443: lcov-html] Error 2 Closes GH-5568.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-05-111-1/+1
|\ \ | |/ | | | | | | * PHP-7.3: Fix default sendmail path when not found during build
* | Fix #79532: sizeof off_t can be wrongChristoph M. Becker2020-04-291-0/+1
| | | | | | | | | | | | | | | | | | We have to actually determine the proper `SIZEOF_OFF_T`. Interestingly, it is `4` on Windows x64. We also have to prevent the redefinition in pg_config.h. The clean solution would likely be to not include pg_config.h at all, but that's out of scope for BC reasons for now.
* | Update bundled stdxx check macrosAnatol Belski2020-02-081-0/+3
| |
* | Fix bug #79112: IMAP can't find OpenSSL during configureNikita Popov2020-01-201-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the check of PHP_OPENSSL inside SETUP_OPENSSL. It's the responsibility of the caller to determine whether they want to enable openssl or not. This makes SSL detection in IMAP work, which uses a different option. Additionally also clarify that --with-openssl-dir cannot actually be used to specify an OpenSSL directory -- these options just serve as a way to enable OpenSSL in extensions without also enabling the OpenSSL extension. They need to be renamed to something clearer in master. Closes GH-5091.
* | Revert "Remove configure checks for supported instruction sets"Nikita Popov2019-11-041-0/+24
| | | | | | | | | | | | | | | | 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.
* | Remove configure checks for supported instruction setsNikita Popov2019-10-311-24/+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.
* | Add "-pthread" to EXTRA_LDFLAGS_PROGRAM as wellNikita Popov2019-10-141-0/+2
| |
* | Azure: Publish code coverage resultsGerard Roche2019-10-111-18/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add an Azure Publish Code Coverage Results task * Add `make gcovr-html` to generate a gcovr test coverage report in HTML * Add `make gcovr-xml` to generate a gcovr test coverage report in XML * Remove `test` target dependency from `make lcov-html`; Run the two targets together instead: `make test lcov-html`. Re: https://github.com/php/php-src/pull/4739#issuecomment-534911441 See: https://externals.io/message/107113, https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results?view=azure-devops, and https://github.com/php/php-src/pull/4759.
* | Remove configure checks for ltp when using --enable-gcovNikita Popov2019-10-111-0/+3
| | | | | | | | | | gcov builds can also be used with other tools like gcovr, so remove the hard dependency on LTP.
* | Revert "Don't buid static libaraies when only DSO required"Dmitry Stogov2019-10-102-2/+2
| | | | | | | | This reverts commit f633c347574c0d814050b4bf2493e0cac6a5988c.
* | Fixed bug #78614 (Does not compile with DTRACE anymore)Dmitry Stogov2019-10-041-2/+2
| |
* | Fix GCOV not working for PHP-7.4 and master branchesGerard Roche2019-09-251-58/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code coverage reports (`make lcov`), since commit eef8522 (7.4 branch), generates incorrect coverage and emits warnings. Simplifying the Makefile.gcov file has the side-effect of resolving the issue. Processing sapi/cli/php_http_parser.gcda php-src/lcov_data/sapi/cli/php_http_parser.gcda:stamp mismatch with notes file geninfo: WARNING: gcov did not create any files for php-src/lcov_data/sapi/cli/php_http_parser.gcda! ... Processing ext/mbstring/mb_gpc.gcda php-src/lcov_data/ext/mbstring/mb_gpc.gcda:stamp mismatch with notes file geninfo: WARNING: gcov did not create any files for php-src/lcov_data/ext/mbstring/mb_gpc.gcda! Closes: https://bugs.php.net/bug.php?id=52718. See also: https://bugs.php.net/bug.php?id=78288.
* | Don't buid static libaraies when only DSO requiredDmitry Stogov2019-09-192-2/+2
| |
* | Remove build.mk usagePeter Kokot2019-07-211-40/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First step when creating the `configure` script is currently using make. This is helpful when developing buildsystem to only rebuild `configure` and `main/php_config.h.in` files when one of the *.m4 or configure.ac file changes and saves the developer time a little. Realistically however, it is not needed that much considering the times of several seconds to fully rebuild the configure script and configuration header. The next step when running the `configure` script is much more time consuming so performance on buildconf level is a bit questionable and won't be noticed on today's systems. Additionally: - buildconf now removes cache and all targets and uses -f option on the first step i.e. autoconf. The autoheader does not need the -f option in this case. Closes GH-4437
* | Remove duplicate socklen_t checkPeter Kokot2019-07-181-20/+0
| | | | | | | | | | | | - Use Autoconf's default AC_CHECK_TYPES Closes GH-4418
* | Refactor undefining PACKAGE_* symbolsPeter Kokot2019-07-112-3/+17
| | | | | | | | | | | | | | | | | | | | Instead of patching configuration headers template generated by the given tools - autoheader, this moves patching these symbols to the configure step before creating and invoking the config.status and before the configuration header file is generated from the patched template. Closes GH-4374
* | Refactor genif.shPeter Kokot2019-07-081-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Coding style fixes - ${1+"$@"} replaced with "$@" [1] - EXTRA_MODULE_PTRS variable is not used anymore - awk tool defined via environment variable - srcdir determined automatically from the genif.sh location [1] https://www.in-ulm.de/~mascheck/various/bourne_args/ Closes GH-4372
* | Simplify PHP_CHECK_PDO_INCLUDES callsPeter Kokot2019-07-081-1/+0
| | | | | | | | | | | | | | Conditional checks were once used for backwards compatibility with phpize from PHP versions that didn't have this macro call yet. Closes GH-4376
* | Remove some unused variablesPeter Kokot2019-07-081-1/+1
| | | | | | | | | | | | | | - Variables php_abs_top_srcdir php_abs_top_builddir are no longer used. - ZEND_EXT_TYPE is always zend_extension and variable is no longer used. Closes GH-4378
* | Remove PHP_DEBUG_MACROPeter Kokot2019-07-071-31/+0
| | | | | | | | | | The macro is no longer used. The warning at the end of the configure script therefore is also no longer used.
* | Remove some more Apache 1 left oversPeter Kokot2019-07-071-1/+1
| | | | | | | | | | - warning in configure.ac is relevant for the sapi/apache - errors output redirected to /dev/null when checking Apache version
* | Remove PHP_CHECK_CONFIGURE_OPTIONSPeter Kokot2019-07-021-55/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of building a custom macro for checking configure options, Autoconf 2.62+ already outputs a warning at the beginning and the end of the output of configure script. It automatically detects correct and wrong options better. This is related also to bug #55634. So now instead a better way is the default Autoconf approach: This outputs a warning at the beginning and end of the configure output: ./configure --with-non-existing This results in fatal error: ./configure --non-existing configure: error: unrecognized option: `--non-existing' Try `./configure --help' for more information The `--enable-option-checking=fatal` results in fatal error for all non existing options: ./configure --with-non-existing --enable-option-checking=fatal configure: error: unrecognized options: --with-non-existing Closes GH-4348
* | Remove warnings for bison and re2c checksPeter Kokot2019-06-271-6/+2
| | | | | | | | | | | | | | | | | | | | This patch removes warnings when lexer and parser files are already generated. For example, when downloading a PHP release. Realistically, it is not so trivial to rebuild lexer and parser files without removing them first. And considering that tarballs don't have cleaning tools such as Git, this would require manual removali. Related also to https://bugs.gentoo.org/593278
* | Use a common setup macro to detect the Expat libraryHugh McMaster2019-06-041-0/+14
| | | | | | | | Closes GH-4221.
* | Enhance makedist scriptPeter Kokot2019-05-181-26/+0
| | | | | | | | | | | | | | | | | | | | | | This enhances the makidst script: - integrate both snapshot and makedist scripts together - add help and options - generated files are created in the php-src repository directly - other minor enhancemenets such as CS fixes - functionality moved from the Makefile to only shell script - Add missed patching of the Zend Parsers to the main build step - Add all *.tmp files to gitignore
* | Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-239/+280
| | | | | | | | | | | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* | Bump config.guess and config.subPeter Kokot2019-05-112-1292/+1439
| | | | | | | | | | | | | | ``` wget -O config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' wget -O config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' ```
* | Remove vcsclean scriptPeter Kokot2019-05-081-6/+0
| | | | | | | | | | | | | | The vcsclean script is really only a wrapper for a git clean command. Developers should use the more proper and clear native Git command directly instead: `git clean -Xfd`
* | Remove TSRM configuration headerPeter Kokot2019-04-291-1/+1
| | | | | | | | | | | | TSRM configuration header file was once created by separate autoconf build system for TSRM and is with the current code not directly needed like this anymore.
* | Simplify checking of *nix build toolsPeter Kokot2019-04-293-78/+2
| | | | | | | | | | | | | | | | | | The buildmk.stamp file has been created by the *nix build checking step to run the check step only once. Instead of poluting the project root directory, the stamp file can be also omitted. Performance difference is very minimal to not justify having the stamp check at all today anymore. This patch integrates the buildcheck.sh to buildconf script directly.
* | Automatically remove aclocal.m4 if presentPeter Kokot2019-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4e7064d173d2b5b22e159fcf52d22b10213b67b8 removed the usage of `aclocal.m4`. When using Git repositories, many times cleaning of the generated files is not done prior to running phpize or buildconf. For example: git clone git://github.com/php/php-src cd php-src git checkout PHP-7.3 ./buildconf ./configure git checkout PHP-7.4 ./buildconf # -> warnings ./configure # -> errors To not accidentally include `aclocal.m4` file in the generated configure this enhances build system experience a bit more by removing aclocal.m4 file prior to start building configure file using phpize or buildconf.
* | Move Autoconf Archive macros to a common m4 dirPeter Kokot2019-04-231-0/+196
| | | | | | | | | | In PHP the build dir is used as a directory for external macros including Autoconf Archive macros.
* | Move acinclude.m4 to build/php.m4Peter Kokot2019-04-232-5/+2754
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The acinclude.m4 file is in a usual Autotools build processed with Automake's aclocal tool. Since PHP currently doesn't use Automake and aclocal this file can be moved into the build directory. PHP build system currently generates a combined aclocal.m4 file that Autoconf can processes automatically. However, a newer practice is writing all local macros in separate dedicated files prefixed with package name, in PHP's case PHP_MACRO_NAME and putting them in a common `m4` directory. PHP uses currently `build` directory for this purpose. Name `php.m4` probably most resembles such file for PHP's case. PHP manually created the aclocal.m4 file from acinclude.m4 and build/libtool.m4. Which is also not a particularly good practice [1], so this patch also removes the generated alocal.m4 usage and uses m4_include() calls manually in the configure.ac and phpize.m4 files manually. - sort order is not important but can be alphabetical - list of *.m4 files prerequisites for configure script generation updated - Moving m4_include() before AC_INIT also removes all comments starting with hash character (`#`) in the included files. [1] https://autotools.io/autoconf/macros.html
* | Join build makefiles togetherPeter Kokot2019-04-172-52/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - Joins build/build.mk and build/build2.mk files together since there isn't any practical reason for having two different files with the current build system. - Makefile is now more portable. All special syntaxes are omitted, for example, a conditional assignment operators `?=`. This makes buildconf more useful on Solaris make derivative, so there is no longer need to override make with gmake: `MAKE=gmake ./buildconf`. - Suppressing autoconf and autoheader warnings is not needed anymore with current build system. Instead, the option `-Wall` has been used when running `./buildconf --debug` to get more useful debug info about current M4.
* | Simplify generated_lists generationPeter Kokot2019-04-162-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The `generated_lists` file is generated as a helper for build related Makefile to include a list of *.m4 files prerequisites. When some of these *.m4 files change, the configure script is regenerated when buildconf is run. This can be simplified using dynamic environment variable passed to the Makefile directly so it avoids another file from being generated in the project root directory and shipping it with the PHP release or creating a dedicated gitignore rule. This is portable across all POSIX compatible makes So this patch includes GNU Make, and everybody elses' make derivative support.
* | Disable PACKAGE_* preprocessor symbolsPeter Kokot2019-04-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autoconf defines PACKAGE_* symbols: - PACKAGE_NAME - PACKAGE_VERSION - PACKAGE_TARNAME - PACKAGE_STRING - PACKAGE_BUGREPORT - PACKAGE_URL and appends them to the generated config.h.in files. With AC_INIT change via afd52f9d9986d92dd0c63832a07ab1a16bf11d53 where package version, URL, bug report location and similar meta data are defined, these preprocessor macros are then non empty strings in the generated configuration header file. When using phpize, PHP shares the config files in extensions, warnings of redefined macros appear, such as: - `warning: 'PACKAGE_NAME' macro redefined` This patch now disables these non utilized symbols in the generated config header files. Better practice would be to include only API specific headers where needed but this would require even more refactorings. Some extensions such as pcre, pgsql, and pdo_pgsql solve this issue by undefining some of these symbols before including the library configuration headers in the code also. Because these symbols can be defined by any library which uses Autotools. Additionally, the unused PACKAGE_* symbols were cleaned for the bundled libmbfl library and with this patch not needed undef code removed.
* | Remove php7.spec.in filePeter Kokot2019-03-281-1/+1
| | | | | | | | | | | | | | | | | | RPM specification file was introduced via 7c2f1384d45876bbdef255c4a57301e6406f6964 for PHP to include official RPM packages long time agon. With removal of the makerpm script via 3d51d4c90c77a30a7b88aae7184dcce4b6e26b07 and Linux repositories to manage such updated and customized info in their repositories this file is most likely not needed anymore.
* | Enhance Autoconf version checkingPeter Kokot2019-03-241-19/+43
| | | | | | | | | | | | | | | | | | | | With this required Autoconf version is now defined only on two places: - configure.ac - scripts/phpize.m4 and additionally: - Script can be run from other locations - Synced CS and portability a bit
* | Merge branch 'PHP-7.3' into PHP-7.4Remi Collet2019-03-201-4/+3
|\ \ | |/ | | | | | | | | * PHP-7.3: NEWS Revert "Fix #77609: Tests from mailparse extension fails"
* | Move Makefile.global and Makefile.gcov to build directoryPeter Kokot2019-03-042-0/+226
| | | | | | | | | | These files can be stored in the build directory instead of bloating the project root directory.
* | Remove mkinstalldirs, install-sh and missingPeter Kokot2019-03-041-6/+1
| | | | | | | | | | | | | | These scripts are part of Automake [1] and are in current *nix build system not used anymore nor empty files need to be created. [1] https://www.gnu.org/software/automake/manual/html_node/Auxiliary-Programs.html
* | Fix file permissionsPeter Kokot2019-02-283-0/+0
| | | | | | | | | | | | | | | | Git can track executable (0755) and non-executable (0644) file modes. This patch fixes file permissions in the php-src repository according to the predefined executable files with 0755 permissions (shell scripts) and all others with 0644 permissions.
* | Remove deprecated PHP_EXTENSION m4 macroPeter Kokot2019-02-271-32/+0
| | | | | | | | | | | | | | | | | | | | | | The PHP_EXTENSION macro was used before the introduction of the updated build system in the 9d9d39a0de3bec962c343051011f5a2ed7d7b242. The extensions at that time possibly still used the Makefile.in and Automake and the PHP_EXTENSION macro has been replaced with the PHP_NEW_EXTENSION macro. Today, the once deprecated macro can be removed in favor of only PHP_NEW_EXTENSION macro.
* | Remove yearly range from copyright noticeZeev Suraski2019-01-303-3/+3
| |
* | Set AC_CONFIG_AUX_DIR to build directoryPeter Kokot2018-12-104-2/+10266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Autoconf macro AC_CONFIG_AUX_DIR can set the location of the auxiliary build tools such as config.guess, config.sub, and bundled libtool scripts and moves these bundled files from the root directory to the build subdirectory. Additionally some changes in this context or as a part of obsoletion: - The LT_TARGETS variable in build/build2.mk file was once used as a part of the Automake step. It's not used anymore and has been refactored to separate makedist script directly. - ltconfig is not used anymore since libtool 1.4+ cf8d1563c27a70fdd24055c1e80218ec7b5962d6 - phpize file locations for the config.guess, config.sub, and ltmain.sh has been refactored accordingly.
* | ext/gd: Use pkg-config to detect the availability of freetype2Eli Schwartz2018-11-071-0/+275
| | | | | | | | | | | | | | | | | | | | The latest version of freetype2 does not install freetype-config by default, but pkg-config support has been there for approximately 15 years. In order to reliably detect freetype2, pkg-config *must* be used. See: https://savannah.nongnu.org/bugs/?53093 https://bugs.php.net/bug.php?id=76324
* | Remove mkdep.awkPeter Kokot2018-10-201-73/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `mkdep.awk` file was part of the previous *nix build system and was used to create a .deps file with a list of dependencies that could be processed by Automake further on. Newer build system was done via 9d9d39a0de3bec962c343051011f5a2ed7d7b242 and outdated files removed via 22815419f8c5da902971d3aa12f2cbfcc3b41aff so the current file in the PHP source code is not used anymore. Additionally, the *.slo files were processed by this file. The *.slo files also used to be generated by older libtool so today, these don't get generated anymore.