From 780d884369ba6bea78d0e2535a4d68dddf3a594e Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Mon, 8 Nov 2021 21:59:28 +0800 Subject: [PATCH] build: support loongarch64 platform Signed-off-by: Liwei Ge --- 1000-anolis-php-support-loongarch64.patch | 32 +++++++++++++++++++++++ php.spec | 10 ++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 1000-anolis-php-support-loongarch64.patch diff --git a/1000-anolis-php-support-loongarch64.patch b/1000-anolis-php-support-loongarch64.patch new file mode 100644 index 0000000..ebe3880 --- /dev/null +++ b/1000-anolis-php-support-loongarch64.patch @@ -0,0 +1,32 @@ +diff -Nur php-7.2.24.new/config.guess php-7.2.24/config.guess +--- php-7.2.24.new/config.guess 2021-11-08 19:01:51.684000000 +0800 ++++ php-7.2.24/config.guess 2021-11-08 19:04:15.004000000 +0800 +@@ -891,6 +891,9 @@ + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; ++ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) ++ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Nur php-7.2.24.new/config.sub php-7.2.24/config.sub +--- php-7.2.24.new/config.sub 2021-11-08 19:01:52.552000000 +0800 ++++ php-7.2.24/config.sub 2021-11-08 19:05:13.632000000 +0800 +@@ -249,6 +249,7 @@ + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ ++ | loongarch32 | loongarch64 | loongarchx32 \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -371,6 +372,7 @@ + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ ++ | loongarch32-* | loongarch64-* | loongarchx32-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ diff --git a/php.spec b/php.spec index cbf07cf..f7f9604 100644 --- a/php.spec +++ b/php.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # RHEL / Fedora spec file for php # # License: MIT @@ -67,7 +68,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{rcver}} -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -121,6 +122,8 @@ Patch47: php-5.6.3-phpinfo.patch # Factory is droped from system tzdata Patch300: php-5.6.3-datetests.patch +Patch1000: 1000-anolis-php-support-loongarch64.patch + BuildRequires: bzip2-devel, curl-devel >= 7.9 BuildRequires: httpd-devel >= 2.0.46-1, pam-devel @@ -725,6 +728,8 @@ low-level PHP extension for the libsodium cryptographic library. # Fixes for tests %patch300 -p1 -b .datetests +%patch1000 -p1 + # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE Zend/ZEND_LICENSE @@ -1569,6 +1574,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %changelog +* Mon Nov 8 2021 Liwei Ge - 7.3.20-1.0.1 +- Support loongarch64 platform + * Fri Jul 10 2020 Remi Collet - 7.3.20-1 - update to 7.3.20 #1856655 -- Gitee