Skip to content

Commit

Permalink
php-swoole: 2nd try to fix arm64 build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandesign committed Dec 17, 2020
1 parent dbb7242 commit c3f52de
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 34 deletions.
6 changes: 2 additions & 4 deletions php/php-swoole/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
15 changes: 0 additions & 15 deletions php/php-swoole/files/arm64-4.4.patch

This file was deleted.

15 changes: 0 additions & 15 deletions php/php-swoole/files/arm64-4.5.patch

This file was deleted.

44 changes: 44 additions & 0 deletions php/php-swoole/files/arm64.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c3f52de

Please sign in to comment.