Commit Graph

4 Commits

Author SHA1 Message Date
Remi Collet
09a36812c1
Fix AX_GCC_FUNC_ATTRIBUTE failure 2024-03-22 11:29:45 +01:00
David Carlier
0a47fdf538 Revert "Fix detection of unknown gcc function attributes"
This reverts commit 813d942bac.
2022-06-03 08:04:07 +01:00
Athos Ribeiro
813d942bac Fix detection of unknown gcc function attributes
As described in autoconf-archive upstream [1], from where
`build/ax_gcc_func_attribute.m4` is forked, the old unknown func attr
detection method would throw a false negative anytime an unrelated
warning was raised.

This results in `ax_cv_have_func_attribute_target` being set to `no`
whenever certain compiler Warning flags are switched on. Namely, having
`-Wall` on, which is a default CFLAG for some linux distributions, will
result in

```
warning: ‘bar’ declared ‘static’ but never defined [-Wunused-function]
```

when evaluating support for the `target` function attribute.

With that configuration value set to `no`, the compiled php binaries
will not support x86_64 v3 instructions such as avx2 and sse2, which
should speed up specific tasks ran by PHP.

This issue was originally reported in Ubuntu [2].

[1] http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commitdiff;h=df0894ad1a8195df67a52108b931e07d708cec9a
[2] https://bugs.launchpad.net/ubuntu/+source/php8.1/+bug/1882279
Closes GH-8483.
2022-06-02 21:09:09 +01:00
Xinchen Hui
98aa3a65c4 Optimized php_addslashes with SSE4.2 instructions
According to benchmark
(https://gist.github.com/laruence/fd0d443d2c5bacca9d8ab99250499956) this brings 30%+ execution time reduced.

In the further, this open the door for possible SSE4.2 optimizations in
other places.
2018-01-15 21:17:50 +08:00