You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.0 KiB
52 lines
2.0 KiB
8 years ago
|
From 2fcc388d9bf238673ed84b8f38d7753279aea48c Mon Sep 17 00:00:00 2001
|
||
|
From: Michael Orlitzky <michael@orlitzky.com>
|
||
|
Date: Thu, 4 Aug 2016 11:42:56 -0400
|
||
|
Subject: [PATCH 1/1] Zend/zend_operators.h: disable x86 assembly on all newer
|
||
|
GCC-4.x.
|
||
|
|
||
|
In bug 69896, a fix was committed to work around a build error: 'asm'
|
||
|
operand has impossible constraints, in zend_operators.h, on x86. At
|
||
|
the time, the problem was only visible with gcc-4.8, and the fix was
|
||
|
to disable that chunk of assembly for gcc-4.8. With gcc-4.9, the
|
||
|
problem persists, so we now need to check for gcc-4.9 (at least) in
|
||
|
addition to gcc-4.8.
|
||
|
|
||
|
This commit modifies the earlier conditional that checks for
|
||
|
gcc-4.8. The existing check was for equality on the minor component of
|
||
|
the gcc version, namely 8. The == operator that performs the
|
||
|
comparison has been changed to <=, so that it catches any gcc-4.x with
|
||
|
x >= 8. This has been tested and fixes the build on x86 hardware with
|
||
|
gcc-4.9.
|
||
|
|
||
|
PHP-Bug: 69896
|
||
|
Gentoo-Bug: 571658
|
||
|
---
|
||
|
Zend/zend_operators.h | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
|
||
|
index 3705022..dd7c354 100644
|
||
|
--- a/Zend/zend_operators.h
|
||
|
+++ b/Zend/zend_operators.h
|
||
|
@@ -520,7 +520,7 @@ static zend_always_inline void fast_long_decrement_function(zval *op1)
|
||
|
|
||
|
static zend_always_inline void fast_long_add_function(zval *result, zval *op1, zval *op2)
|
||
|
{
|
||
|
-#if defined(__GNUC__) && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__)
|
||
|
+#if defined(__GNUC__) && defined(__i386__) && !(4 == __GNUC__ && 8 <= __GNUC_MINOR__)
|
||
|
__asm__(
|
||
|
"movl (%1), %%eax\n\t"
|
||
|
"addl (%2), %%eax\n\t"
|
||
|
@@ -606,7 +606,7 @@ static zend_always_inline int fast_add_function(zval *result, zval *op1, zval *o
|
||
|
|
||
|
static zend_always_inline void fast_long_sub_function(zval *result, zval *op1, zval *op2)
|
||
|
{
|
||
|
-#if defined(__GNUC__) && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__)
|
||
|
+#if defined(__GNUC__) && defined(__i386__) && !(4 == __GNUC__ && 8 <= __GNUC_MINOR__)
|
||
|
__asm__(
|
||
|
"movl (%1), %%eax\n\t"
|
||
|
"subl (%2), %%eax\n\t"
|
||
|
--
|
||
|
2.7.3
|
||
|
|