From c3f52de2da504c06c357e21843f380cd790b0d13 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Thu, 17 Dec 2020 01:56:24 -0600 Subject: [PATCH] php-swoole: 2nd try to fix arm64 build failure --- php/php-swoole/Portfile | 6 ++-- php/php-swoole/files/arm64-4.4.patch | 15 ---------- php/php-swoole/files/arm64-4.5.patch | 15 ---------- php/php-swoole/files/arm64.patch | 44 ++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 34 deletions(-) delete mode 100644 php/php-swoole/files/arm64-4.4.patch delete mode 100644 php/php-swoole/files/arm64-4.5.patch create mode 100644 php/php-swoole/files/arm64.patch diff --git a/php/php-swoole/Portfile b/php/php-swoole/Portfile index 9966940d90c1d..6da07cc40e008 100644 --- a/php/php-swoole/Portfile +++ b/php/php-swoole/Portfile @@ -62,11 +62,9 @@ if {${name} ne ${subport}} { # CLOCK_REALTIME legacysupport.newest_darwin_requires_legacy \ 15 - - patchfiles arm64-4.5.patch - } else { - patchfiles arm64-4.4.patch } + + patchfiles arm64.patch } } diff --git a/php/php-swoole/files/arm64-4.4.patch b/php/php-swoole/files/arm64-4.4.patch deleted file mode 100644 index e1cc938a91092..0000000000000 --- a/php/php-swoole/files/arm64-4.4.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix detection of arm64 CPU. -https://github.com/swoole/swoole-src/issues/3917 ---- config.m4.orig 2019-07-16 03:26:45.000000000 -0500 -+++ config.m4 2020-12-16 23:54:46.000000000 -0600 -@@ -609,9 +609,9 @@ - [x86_64*], [SW_CPU="x86_64"], - [x86*], [SW_CPU="x86"], - [i?86*], [SW_CPU="x86"], -- [arm*], [SW_CPU="arm"], - [aarch64*], [SW_CPU="arm64"], - [arm64*], [SW_CPU="arm64"], -+ [arm*], [SW_CPU="arm"], - [ - SW_NO_USE_ASM_CONTEXT="yes" - AC_DEFINE([SW_NO_USE_ASM_CONTEXT], 1, [use boost asm context?]) diff --git a/php/php-swoole/files/arm64-4.5.patch b/php/php-swoole/files/arm64-4.5.patch deleted file mode 100644 index bf7dac7a7159e..0000000000000 --- a/php/php-swoole/files/arm64-4.5.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix detection of arm64 CPU. -https://github.com/swoole/swoole-src/issues/3917 ---- config.m4.orig 2020-11-26 21:02:32.000000000 -0600 -+++ config.m4 2020-12-16 23:53:09.000000000 -0600 -@@ -602,9 +602,9 @@ - [x86_64*], [SW_CPU="x86_64"], - [x86*], [SW_CPU="x86"], - [i?86*], [SW_CPU="x86"], -- [arm*], [SW_CPU="arm"], - [aarch64*], [SW_CPU="arm64"], - [arm64*], [SW_CPU="arm64"], -+ [arm*], [SW_CPU="arm"], - [mips*], [SW_CPU="mips32"], - [ - SW_USE_ASM_CONTEXT="no" diff --git a/php/php-swoole/files/arm64.patch b/php/php-swoole/files/arm64.patch new file mode 100644 index 0000000000000..a5ab509c3fe13 --- /dev/null +++ b/php/php-swoole/files/arm64.patch @@ -0,0 +1,44 @@ +Fix detection of arm64 CPU. +https://github.com/swoole/swoole-src/issues/3917 +--- config.m4.orig 2020-11-26 21:02:32.000000000 -0600 ++++ config.m4 2020-12-17 01:26:37.000000000 -0600 +@@ -612,13 +612,7 @@ + ) + + if test "$SW_OS" = "MAC"; then +- if test "$SW_CPU" = "arm"; then +- SW_CONTEXT_ASM_FILE="arm_aapcs_macho_gas.S" +- elif test "$SW_CPU" = "arm64"; then +- SW_CONTEXT_ASM_FILE="arm64_aapcs_macho_gas.S" +- else + SW_CONTEXT_ASM_FILE="combined_sysv_macho_gas.S" +- fi + elif test "$SW_CPU" = "x86_64"; then + if test "$SW_OS" = "LINUX"; then + SW_CONTEXT_ASM_FILE="x86_64_sysv_elf_gas.S" +--- thirdparty/boost/asm/jump_combined_sysv_macho_gas.S.orig 2020-11-26 21:02:33.000000000 -0600 ++++ thirdparty/boost/asm/jump_combined_sysv_macho_gas.S 2020-12-17 01:25:22.000000000 -0600 +@@ -15,6 +15,10 @@ + #include "jump_ppc32_sysv_macho_gas.S" + #elif defined(__ppc64__) + #include "jump_ppc64_sysv_macho_gas.S" ++#elif defined(__arm__) ++ #include "jump_arm_aapcs_macho_gas.S" ++#elif defined(__arm64__) ++ #include "jump_arm64_aapcs_macho_gas.S" + #else + #error "No arch's" + #endif +--- thirdparty/boost/asm/make_combined_sysv_macho_gas.S.orig 2020-11-26 21:02:33.000000000 -0600 ++++ thirdparty/boost/asm/make_combined_sysv_macho_gas.S 2020-12-17 01:25:22.000000000 -0600 +@@ -15,6 +15,10 @@ + #include "make_ppc32_sysv_macho_gas.S" + #elif defined(__ppc64__) + #include "make_ppc64_sysv_macho_gas.S" ++#elif defined(__arm__) ++ #include "make_arm_aapcs_macho_gas.S" ++#elif defined(__arm64__) ++ #include "make_arm64_aapcs_macho_gas.S" + #else + #error "No arch's" + #endif