com php-src: Disable add/sub asm for gcc 4.9 pic/pie builds: Zend/zend_operators.h
| From: | Nikita Popov | Date: | Fri, 16 Sep 2016 19:06:02 +0000 |
| Subject: | com php-src: Disable add/sub asm for gcc 4.9 pic/pie builds: Zend/zend_operators.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94570@lists.php.net to get a copy of this message | ||
Commit: 0e76cafaf18dbbb6af609b2e765fe68fd30b8002
Author: Michael Orlitzky <michael@orlitzky.com> Fri, 16 Sep 2016 21:03:01 +0200
Committer: Nikita Popov <nikic@php.net> Fri, 16 Sep 2016 21:06:02 +0200
Parents: 0ad82e41f251354517a90b21bb36fef6dc44b2a1
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0e76cafaf18dbbb6af609b2e765fe68fd30b8002
Log:
Disable add/sub asm for gcc 4.9 pic/pie builds
Changed paths:
M Zend/zend_operators.h
Diff:
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index f0ad030..a08b49c 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -510,7 +510,10 @@ 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__) \
+ && !(4 == __GNUC__ && 9 == __GNUC_MINOR__ && (defined(__PIC__) ||
defined(__PIE__)))
+ /* Position-independent builds fail with gcc-4.9.x */
__asm__(
"movl (%1), %%eax\n\t"
"addl (%2), %%eax\n\t"
@@ -596,7 +599,10 @@ 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__) && \
+ !(4 == __GNUC__ && 9 == __GNUC_MINOR__ && (defined(__PIC__) || defined(__PIE__)))
+ /* Position-independent builds fail with gcc-4.9.x */
__asm__(
"movl (%1), %%eax\n\t"
"subl (%2), %%eax\n\t"