Skip to contentSkip to conversation

php: fix a building failure on aarch64

PATCH In review [email protected] 2 participants 2 messages Jul 1, 2015 – Aug 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 php: fix a building failure on aarch64

From: Roy Li <[email protected]>

When -O0 of gcc is used to compile the macro ZEND_SIGNED_MULTIPLY_LONG
in Zend/zend_multiply.h, the compiling will fail with the below error:
: Assembler messages:
:3113: Error: operand 2 should be an integer register -- mul x1,[x29,200],[x29,192]' :3114: Error: operand 2 should be an integer register -- smulh x0,[x29,200],[x29,192]'

---
 meta-oe/recipes-devtools/php/php_5.5.26.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-devtools/php/php_5.5.26.bb +1 -0
index 8b64b2b..85fdccb 100644
@@ -101,6 +101,7 @@ PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \
 export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
 export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
 CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
+CFLAGS_append_aarch64 = " -O2"
 
 EXTRA_OEMAKE = "INSTALL_ROOT=${D}"
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 21 lines · On Jun 30, 2015, at 6:24 PM, [email protected] wrote:

From: Roy Li <[email protected]>

When -O0 of gcc is used to compile the macro ZEND_SIGNED_MULTIPLY_LONG
in Zend/zend_multiply.h, the compiling will fail with the below error:
: Assembler messages:
:3113: Error: operand 2 should be an integer register -- mul x1,[x29,200],[x29,192]' :3114: Error: operand 2 should be an integer register -- smulh x0,[x29,200],[x29,192]'

---
meta-oe/recipes-devtools/php/php_5.5.26.bb | 1 +

1 file changed, 1 insertion(+)
meta-oe/recipes-devtools/php/php_5.5.26.bb +0 -0
index 8b64b2b..85fdccb 100644
@@ -101,6 +101,7 @@ PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \
Quoted 4 lines

export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}"
export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php"
CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" +CFLAGS_append_aarch64 = " -O2”

removing -O0 if its in CFLAGS is better that way you do not force -O2 always

CFLAGS_remove_aarch64 = “-O0” is more suitable.

Quoted 11 lines

EXTRA_OEMAKE = "INSTALL_ROOT=${D}"

--
1.9.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel