Commit Graph

373 Commits

Author SHA1 Message Date
Peter Kokot
fe2afef36f Fix #78750: configure assumes yacc and re2c work
Closes GH-5681
2020-06-09 00:46:12 +02:00
Christoph M. Becker
4fa3687e56 Unbundle ext/xmlrpc
According to <https://wiki.php.net/rfc/unbundle_xmlprc> we unbundle
ext/xmlrpc.
2020-05-29 16:47:44 +02:00
Máté Kocsis
b3718430de
Annotate internal functions with the mixed type
Closes GH-5618
2020-05-25 17:30:57 +02:00
Bob Weinand
4bc1cf2928 Remove generated zend_jit_x86.c upon make distclean 2020-05-14 16:59:54 +02:00
Nikita Popov
ae5ca5459f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix lcov genhtml: ERROR: cannot read [file]
  Properly detect CRC32 APIs on aarch64 from configure
2020-05-14 09:39:03 +02:00
Gerard Roche
ae1d4a820a Fix lcov genhtml: ERROR: cannot read [file]
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.
2020-05-14 09:38:27 +02:00
Nikita Popov
5dc9418a97 Reapply "Remove configure checks for supported instruction sets"
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.
2020-05-11 12:22:28 +02:00
Nikita Popov
89b4a46d56 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix default sendmail path when not found during build
2020-05-11 10:46:07 +02:00
Nikita Popov
d050d74477 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix default sendmail path when not found during build
2020-05-11 10:46:00 +02:00
Remi Collet
c3d6a0ac02 manage ZEND_DEP_FALIAS in gen_stub 2020-04-29 14:37:06 +02:00
Christoph M. Becker
38ecfe0245 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79532: sizeof off_t can be wrong
2020-04-29 10:43:35 +02:00
Christoph M. Becker
67f9b0b754 Fix #79532: sizeof off_t can be wrong
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.
2020-04-29 10:40:59 +02:00
Dmitry Stogov
5fe723c92d Fix libtool to provide a simple way to generate only "shared" object files or libraries.
- Support for "-shared" option is taken from libtool-2.0 that is already at lease 15 years old.
- Change PHP build system to use "-shared" instead of "--tag=disable-static".
2020-04-27 23:31:54 +03:00
George Peter Banyard
f91f72607b Drop unnecessary stdint and inttypes header checks
These are always available as of C99.

Closes GH-5323

Co-authored-by: "Christoph M. Becker" <cmbecker69@gmx.de>
2020-04-22 20:18:19 +02:00
Nikita Popov
fa4bdf1cda Make gen_stub parallelism safe
If PHP-Parser is not yet installed, make sure we don't try to
install it N times in parallel.
2020-04-21 10:20:51 +02:00
Nikita Popov
661c0ac7f3 Remove support for EBCDIC
Closes GH-5390.
2020-04-20 16:39:39 +02:00
Nikita Popov
110e6e4f95 Make gen_stub.php compatible with PHP 7.1 again
Not worth bumping requirements over this...
2020-04-14 17:55:27 +02:00
Máté Kocsis
dfd0acf0d7
Generate method entries for ext/dom
Closes GH-5374
2020-04-13 00:13:11 +02:00
Tyson Andre
047d814704 Fix an undefined class error running gen_stub in php8
For whatever reason, php 8 would not have loaded the subsequent classes when
running `php build/gen_stub.php path/to/filename.php`.
I assume it didn't load the classes immediately because there's a possibility
the code before it would throw.
(Probably because __toString was added recently and prevents early binding)

Also, fix a typo

Closes GH-5369
2020-04-11 17:17:28 -04:00
Máté Kocsis
3fe49d81f8
Generate method entries from stubs for a couple of extensions
Closes GH-5368
2020-04-11 13:28:53 +02:00
Máté Kocsis
1d05771a70
Add support for generating method entries from stubs
Closes GH-5363
2020-04-11 09:15:14 +02:00
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-04-08 18:37:51 +02:00
Máté Kocsis
d5bbb28f7d
Move variable declaration closer to its usage 2020-04-05 00:03:08 +02:00
Máté Kocsis
610815c0ce
Improve gen_stub.php
Closes GH-5350
Add support for generating deprecated function entries, as well as forward declaration
of function aliases.
2020-04-04 23:52:33 +02:00
Máté Kocsis
a43bc33fb2
Annotate function aliases in stubs 2020-04-04 13:03:16 +02:00
Nikita Popov
2bcc4ab8f4 Verify that all stubs have a return type 2020-04-03 17:59:30 +02:00
Nikita Popov
d2c92d7fd3 Stubs: Store information per-class
We'll need this if we want to generate method entries.
2020-04-03 16:20:47 +02:00
Nikita Popov
51bc6233b2 Generate function entries from stubs
If @generate-function-entries is specified in the stub file,
also generate function entries for the extension.

Currently limited to free functions only.
2020-04-03 15:41:41 +02:00
Remi Collet
75b01c797e add some output when generating arginfo 2020-04-03 10:48:20 +02:00
Remi Collet
e11d3b1690 Move gen_stub.php to build directory and install it so phpize can take care of it, and thus extension can use it as it is already in Makefile 2020-04-03 10:48:20 +02:00
Anatol Belski
66c85c3f2f Update bundled config.guess and config.sub 2020-02-15 13:43:31 +01:00
Xinchen Hui
9c5fb54c97 Improved the check
makefile.global is also used while building shared extension
2020-02-13 15:59:21 +08:00
Xinchen Hui
9e5650265c Fixed build (Only PHP above 7.1 could run the gen_stub.php) 2020-02-12 14:22:01 +08:00
Anatol Belski
538c088a82 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update bundled stdxx check macros
2020-02-08 10:18:08 +01:00
Anatol Belski
34bab6c9fc Update bundled stdxx check macros 2020-02-08 10:13:46 +01:00
Akim Demaille
2127a37b83
Bison: enable all the warnings and fix them
First, fix 5547d36120: the definition of
YFLAGS was not passed into the Makefile: AC_SUBST does not suffice, we
need PHP_SUBST_OLD.  While at it, allow to pass variable and value at
the same time.

Then pass -Wall to bison, rather than only -Wempty-rules.

Use %precedence where associativity is useless.

Remove useless %precedence.
GH-5138
2020-02-01 14:21:21 +01:00
Akim Demaille
37d0f7d3b3
Use "%empty" in the parsers, instead of comments
The annotation %empty is properly enforced: warnings when it's
missing, and errors when it's inappropriate.  Support for %empty was
introduced in Bison 3.0.

Pass -Wempty-rule to Bison.

Closes GH-5134
2020-01-31 09:52:40 +01:00
Nikita Popov
5947437d47 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #79112: IMAP can't find OpenSSL during configure
2020-01-20 09:59:40 +01:00
Nikita Popov
74380465ec Fix bug #79112: IMAP can't find OpenSSL during configure
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.
2020-01-20 09:59:27 +01:00
Nikita Popov
b509d67554 Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Remove configure checks for supported instruction sets"
2019-11-04 11:34:02 +01:00
Nikita Popov
451314111b Revert "Remove configure checks for supported instruction sets"
This reverts commit edccf32f7f.

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.
2019-11-04 11:32:46 +01:00
Nikita Popov
1517bc4426 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove configure checks for supported instruction sets
2019-10-31 11:34:15 +01:00
Nikita Popov
edccf32f7f Remove configure checks for supported instruction sets
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.
2019-10-31 11:27:53 +01:00
Nikita Popov
ad53bacf38 Fix bug #78681 by renaming libphp8.so to libphp.so
The major version number is no longer included.
2019-10-29 16:06:09 +01:00
Nikita Popov
9257fa79be Merge branch 'PHP-7.4'
* PHP-7.4:
  Add "-pthread" to EXTRA_LDFLAGS_PROGRAM as well
2019-10-14 11:34:38 +02:00
Nikita Popov
c518932c03 Add "-pthread" to EXTRA_LDFLAGS_PROGRAM as well 2019-10-14 11:33:39 +02:00
Nikita Popov
242b5547a2 Merge branch 'PHP-7.4' 2019-10-11 17:44:59 +02:00
Gerard Roche
db54b0fa18 Azure: Publish code coverage results
* 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.
2019-10-11 17:44:36 +02:00
Nikita Popov
393aa057d3 Merge branch 'PHP-7.4' 2019-10-11 16:51:50 +02:00
Nikita Popov
3718a95526 Remove configure checks for ltp when using --enable-gcov
gcov builds can also be used with other tools like gcovr, so remove
the hard dependency on LTP.
2019-10-11 16:51:03 +02:00