Skip to content

Commit e358634

Browse files
authored
Sync Zend/*_i386_sysv_elf_gas.S with upstream (#15788)
This is a sync with upstream already fixed in early 2024 which fixes 64-bit builds on 32-bit hosts. PHP's bundled config.guess sets the host_alias, for example, on Solaris systems to 64-bit if the compiler supports it even though the architecture is actually 32-bit. These assembly files resolve this situation in a build-system-agnostic way by including the architecture file that is supported by the compiler.
1 parent dfe6c13 commit e358634

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Zend/asm/jump_i386_sysv_elf_gas.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
* *
2525
****************************************************************************************/
2626

27+
#ifdef __x86_64__
28+
#include "jump_x86_64_sysv_elf_gas.S"
29+
#else
30+
2731
.file "jump_i386_sysv_elf_gas.S"
2832
.text
2933
.globl jump_fcontext
@@ -91,3 +95,5 @@ jump_fcontext:
9195

9296
/* Mark that we don't need executable stack. */
9397
.section .note.GNU-stack,"",%progbits
98+
99+
#endif

Zend/asm/make_i386_sysv_elf_gas.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
* *
2525
****************************************************************************************/
2626

27+
#ifdef __x86_64__
28+
#include "make_x86_64_sysv_elf_gas.S"
29+
#else
30+
2731
.file "make_i386_sysv_elf_gas.S"
2832
.text
2933
.globl make_fcontext
@@ -111,3 +115,5 @@ finish:
111115

112116
/* Mark that we don't need executable stack. */
113117
.section .note.GNU-stack,"",%progbits
118+
119+
#endif

0 commit comments

Comments
 (0)