From f9a83a4bd432a23730a94895c3860cda9b31b82b Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 3 Feb 2024 21:18:59 +0000 Subject: [PATCH] fiber fix wrong asm directives on (default) solaris build mode. Illumos/Solaris while being 64 bits produces by default 32 bits build. In this case building the i386 assembly. Close GH-13320 --- NEWS | 1 + Zend/asm/jump_x86_64_sysv_elf_gas.S | 16 ++++++++++------ Zend/asm/make_x86_64_sysv_elf_gas.S | 16 ++++++++++------ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 6395fe4b147..a4827b22259 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ Core: (nielsdos) . Fixed bug GH-13178 (Iterator positions incorrect when converting packed array to hashed). (ilutov) + . Fixed zend fiber build for solaris default mode (32 bits). (David Carlier) Curl: . Deprecated the CURLOPT_BINARYTRANSFER constant. (divinity76) diff --git a/Zend/asm/jump_x86_64_sysv_elf_gas.S b/Zend/asm/jump_x86_64_sysv_elf_gas.S index 40f8734daee..be264bdc2e2 100644 --- a/Zend/asm/jump_x86_64_sysv_elf_gas.S +++ b/Zend/asm/jump_x86_64_sysv_elf_gas.S @@ -31,13 +31,16 @@ * * ****************************************************************************************/ -# if defined __CET__ -# include -# define SHSTK_ENABLED (__CET__ & 0x2) -# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) +# ifdef __i386__ +# include "jump_i386_sysv_elf_gas.S" # else -# define _CET_ENDBR -# endif +# if defined __CET__ +# include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) +# else +# define _CET_ENDBR +# endif .file "jump_x86_64_sysv_elf_gas.S" .text .globl jump_fcontext @@ -148,3 +151,4 @@ jump_fcontext: /* Mark that we don't need executable stack. */ .section .note.GNU-stack,"",%progbits +# endif diff --git a/Zend/asm/make_x86_64_sysv_elf_gas.S b/Zend/asm/make_x86_64_sysv_elf_gas.S index 3358a27d844..b0d0c0341ef 100644 --- a/Zend/asm/make_x86_64_sysv_elf_gas.S +++ b/Zend/asm/make_x86_64_sysv_elf_gas.S @@ -31,13 +31,16 @@ * * ****************************************************************************************/ -# if defined __CET__ -# include -# define SHSTK_ENABLED (__CET__ & 0x2) -# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) +# ifdef __i386__ +# include "make_i386_sysv_elf_gas.S" # else -# define _CET_ENDBR -# endif +# if defined __CET__ +# include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) +# else +# define _CET_ENDBR +# endif .file "make_x86_64_sysv_elf_gas.S" .text .globl make_fcontext @@ -184,3 +187,4 @@ finish: /* Mark that we don't need executable stack. */ .section .note.GNU-stack,"",%progbits +# endif