Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable asm context on BSD. #4082

Merged
merged 1 commit into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ if test "$PHP_SWOOLE" != "no"; then
[cygwin*], [SW_OS="CYGWIN"],
[mingw*], [SW_OS="MINGW"],
[linux*], [SW_OS="LINUX"],
[*bsd*], [SW_OS="BSD"],
[]
)

Expand Down Expand Up @@ -611,6 +612,7 @@ if test "$PHP_SWOOLE" != "no"; then

AS_CASE([$host_cpu],
[x86_64*], [SW_CPU="x86_64"],
[amd64*], [SW_CPU="x86_64"],
[x86*], [SW_CPU="x86"],
[i?86*], [SW_CPU="x86"],
[arm*], [SW_CPU="arm"],
Expand All @@ -625,25 +627,25 @@ if test "$PHP_SWOOLE" != "no"; then
if test "$SW_OS" = "MAC"; then
SW_CONTEXT_ASM_FILE="combined_sysv_macho_gas.S"
elif test "$SW_CPU" = "x86_64"; then
if test "$SW_OS" = "LINUX"; then
if test "$SW_OS" = "LINUX" || test "$SW_OS" = "BSD"; then
SW_CONTEXT_ASM_FILE="x86_64_sysv_elf_gas.S"
else
SW_USE_ASM_CONTEXT="no"
fi
elif test "$SW_CPU" = "x86"; then
if test "$SW_OS" = "LINUX"; then
if test "$SW_OS" = "LINUX" || test "$SW_OS" = "BSD"; then
SW_CONTEXT_ASM_FILE="i386_sysv_elf_gas.S"
else
SW_USE_ASM_CONTEXT="no"
fi
elif test "$SW_CPU" = "arm"; then
if test "$SW_OS" = "LINUX"; then
if test "$SW_OS" = "LINUX" || test "$SW_OS" = "BSD"; then
SW_CONTEXT_ASM_FILE="arm_aapcs_elf_gas.S"
else
SW_USE_ASM_CONTEXT="no"
fi
elif test "$SW_CPU" = "arm64"; then
if test "$SW_OS" = "LINUX"; then
if test "$SW_OS" = "LINUX" || test "$SW_OS" = "BSD"; then
SW_CONTEXT_ASM_FILE="arm64_aapcs_elf_gas.S"
else
SW_USE_ASM_CONTEXT="no"
Expand All @@ -655,7 +657,7 @@ if test "$PHP_SWOOLE" != "no"; then
SW_USE_ASM_CONTEXT="no"
fi
elif test "$SW_CPU" = "ppc64"; then
if test "$SW_OS" = "LINUX"; then
if test "$SW_OS" = "LINUX" || test "$SW_OS" = "BSD"; then
SW_CONTEXT_ASM_FILE="ppc64_sysv_elf_gas.S"
else
SW_USE_ASM_CONTEXT="no"
Expand Down
4 changes: 2 additions & 2 deletions thirdparty/boost/asm/combined.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef __linux__
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#if defined(__i386__)
#include "make_i386_sysv_elf_gas.S"
#include "jump_i386_sysv_elf_gas.S"
Expand All @@ -25,4 +25,4 @@
#include "jump_combined_sysv_macho_gas.S"
#else
#error "not supports"
#endif
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/jump_arm64_aapcs_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,7 @@ jump_fcontext:

ret x4
.size jump_fcontext,.-jump_fcontext
#ifndef __NetBSD__
# Mark that we don't need executable stack.
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/jump_arm_aapcs_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,7 @@ jump_fcontext:
pop {v1-v8,lr,pc}
.size jump_fcontext,.-jump_fcontext

#ifndef __NetBSD__
@ Mark that we don't need executable stack.
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/jump_ppc32_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -204,5 +204,7 @@ jump_fcontext:
bctr
.size jump_fcontext, .-jump_fcontext

#ifndef __NetBSD__
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/jump_ppc64_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,7 @@ jump_fcontext:
#endif


#ifndef __NetBSD__
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/jump_x86_64_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,7 @@ jump_fcontext:
jmp *%r8
.size jump_fcontext,.-jump_fcontext

#ifndef __NetBSD__
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/make_arm64_aapcs_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,7 @@ finish:
bl _exit

.size make_fcontext,.-make_fcontext
#ifndef __NetBSD__
# Mark that we don't need executable stack.
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/make_arm_aapcs_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,7 @@ finish:
bl _exit@PLT
.size make_fcontext,.-make_fcontext

#ifndef __NetBSD__
@ Mark that we don't need executable stack.
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/make_ppc32_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@ finish:
bl _exit@plt
.size make_fcontext, .-make_fcontext

#ifndef __NetBSD__
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/make_ppc64_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,7 @@ finish:
# endif
#endif

#ifndef __NetBSD__
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif
2 changes: 2 additions & 0 deletions thirdparty/boost/asm/make_x86_64_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,7 @@ finish:
hlt
.size make_fcontext,.-make_fcontext

#ifndef __NetBSD__
/* Mark that we don't need executable stack. */
.section .note.GNU-stack,"",%progbits
#endif