Skip to content

Commit

Permalink
Fixed various php compilation problems:
Browse files Browse the repository at this point in the history
- Modified php building for buggy old toolchains
php/php-src#12774
https://sourceware.org/bugzilla/show_bug.cgi?id=23169

- Patched php configure script for ubuntu-16 old gcc version 5
The check in php/build/php.m4 is not sufficient to guard for gcc 5 on ubuntu 16

Ticket: ENT-12140
Changelog: none.
  • Loading branch information
craigcomstock committed Sep 5, 2024
1 parent aa0f58a commit add425e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deps-packaging/php/cfbuild-php.spec
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi
--with-iconv \
--with-zlib=%{prefix} \
--with-libmbfl=%{prefix} \
--enable-mbstring \
--enable-mbstring=shared \
--enable-sockets \
--disable-mbregex \
--without-fpm-user \
Expand Down
3 changes: 2 additions & 1 deletion deps-packaging/php/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build: build-stamp
build-stamp:
dh_testdir

patch -p0 < $(CURDIR)/old-gcc-check-avx512-better.patch
./configure --prefix=$(PREFIX)/httpd/php \
--with-config-file-scan-dir=$(PREFIX)/httpd/php/lib \
--with-apxs2=$(PREFIX)/httpd/bin/apxs \
Expand All @@ -22,7 +23,7 @@ build-stamp:
--with-iconv \
--with-zlib=$(PREFIX) \
--with-libmbfl=$(PREFIX) \
--enable-mbstring \
--enable-mbstring=shared \
--enable-sockets \
--disable-mbregex \
--without-fpm-user \
Expand Down
21 changes: 21 additions & 0 deletions deps-packaging/php/old-gcc-check-avx512-better.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- configure.old
+++ configure
@@ -18114,6 +18114,10 @@ printf %s "checking for avx512 supports in compiler... " >&6; }
#include <immintrin.h>
int main(void) {
__m512i mask = _mm512_set1_epi32(0x1);
+ __builtin_cpu_supports("avx512dq");
+ __builtin_cpu_supports("avx512cd");
+ __builtin_cpu_supports("avx512bw");
+ __builtin_cpu_supports("avx512vl");
char out[32];
_mm512_storeu_si512(out, _mm512_shuffle_epi8(mask, mask));
return 0;
@@ -18152,6 +18156,7 @@ printf %s "checking for avx512 vbmi supports in compiler... " >&6; }

#include <immintrin.h>
int main(void) {
+ __builtin_cpu_supports("avx512vbmi");
__m512i mask = _mm512_set1_epi32(0x1);
char out[32];
_mm512_storeu_si512(out, _mm512_permutexvar_epi8(mask, mask));

0 comments on commit add425e

Please sign in to comment.