diff mbox

php: fix bfin compile error

Message ID 20160930060702.GA30641@waldemar-brodkorb.de
State Changes Requested
Headers show

Commit Message

Waldemar Brodkorb Sept. 30, 2016, 6:07 a.m. UTC
Avoid a gcc segfault with Os.

Fixes:
  http://autobuild.buildroot.net/results/61532c31701c9bf756d85c639a00627667baa4fb

Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
---
 package/php/0008-fix-bfin-gcc-segfault.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/php/0008-fix-bfin-gcc-segfault.patch

Comments

Thomas Petazzoni Sept. 30, 2016, 8:21 a.m. UTC | #1
Hello,

On Fri, 30 Sep 2016 08:07:02 +0200, Waldemar Brodkorb wrote:
> Avoid a gcc segfault with Os.
> 
> Fixes:
>   http://autobuild.buildroot.net/results/61532c31701c9bf756d85c639a00627667baa4fb
> 
> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>

Thanks, but could you please report a gcc bug upstream, and add the
reference to the bug report in the patch?

Thanks!

Thomas
Thomas Petazzoni Oct. 7, 2016, 1:41 p.m. UTC | #2
Hello,

On Fri, 30 Sep 2016 10:21:16 +0200, Thomas Petazzoni wrote:

> > Fixes:
> >   http://autobuild.buildroot.net/results/61532c31701c9bf756d85c639a00627667baa4fb
> > 
> > Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>  
> 
> Thanks, but could you please report a gcc bug upstream, and add the
> reference to the bug report in the patch?

Ping?

Thomas
Thomas Petazzoni Oct. 7, 2016, 1:42 p.m. UTC | #3
Hello,

On Fri, 30 Sep 2016 08:07:02 +0200, Waldemar Brodkorb wrote:

> diff --git a/package/php/0008-fix-bfin-gcc-segfault.patch b/package/php/0008-fix-bfin-gcc-segfault.patch
> new file mode 100644
> index 0000000..7ff7ed6
> --- /dev/null
> +++ b/package/php/0008-fix-bfin-gcc-segfault.patch
> @@ -0,0 +1,19 @@
> +diff -Nur php-7.0.11.orig/Zend/zend_compile.c php-7.0.11/Zend/zend_compile.c
> +--- php-7.0.11.orig/Zend/zend_compile.c	2016-09-13 20:52:26.000000000 +0200
> ++++ php-7.0.11/Zend/zend_compile.c	2016-09-30 04:24:32.380877446 +0200

Also patches need a description + Signed-off-by line.

Thanks,

Thomas
diff mbox

Patch

diff --git a/package/php/0008-fix-bfin-gcc-segfault.patch b/package/php/0008-fix-bfin-gcc-segfault.patch
new file mode 100644
index 0000000..7ff7ed6
--- /dev/null
+++ b/package/php/0008-fix-bfin-gcc-segfault.patch
@@ -0,0 +1,19 @@ 
+diff -Nur php-7.0.11.orig/Zend/zend_compile.c php-7.0.11/Zend/zend_compile.c
+--- php-7.0.11.orig/Zend/zend_compile.c	2016-09-13 20:52:26.000000000 +0200
++++ php-7.0.11/Zend/zend_compile.c	2016-09-30 04:24:32.380877446 +0200
+@@ -6689,7 +6689,14 @@
+ }
+ /* }}} */
+ 
+-void zend_compile_resolve_class_name(znode *result, zend_ast *ast) /* {{{ */
++// Blackfin gcc 6.2.0 fails with segmentation fault
++#if defined(__bfin__)
++#define disable_opt __attribute__ ((optimize("O2")))
++#else
++#define disable_opt 
++#endif
++
++void disable_opt zend_compile_resolve_class_name(znode *result, zend_ast *ast) /* {{{ */
+ {
+ 	zend_ast *name_ast = ast->child[0];
+ 	uint32_t fetch_type = zend_get_class_fetch_type(zend_ast_get_str(name_ast));