[packages/hhvm] - fix building with gcc6

baggins baggins at pld-linux.org
Tue Feb 28 22:21:25 CET 2017


commit 199131a50740ba695dac73c93af523d838e54009
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Feb 28 22:21:12 2017 +0100

    - fix building with gcc6

 gcc6.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 hhvm.spec  |  2 ++
 2 files changed, 54 insertions(+)
---
diff --git a/hhvm.spec b/hhvm.spec
index 9fd37d9..5fe1169 100644
--- a/hhvm.spec
+++ b/hhvm.spec
@@ -55,6 +55,7 @@ Patch5:		cmake.patch
 Patch6:		libvpx2.patch
 Patch7:		gcc5.patch
 Patch8:		cxx.patch
+Patch9:		gcc6.patch
 URL:		https://github.com/facebook/hhvm/wiki
 BuildRequires:	ImageMagick-devel
 BuildRequires:	a52dec-libs-devel
@@ -264,6 +265,7 @@ mv folly-* third-party/folly/src
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 # prefer ones from system
 rm CMake/FindBISON.cmake
diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644
index 0000000..54531d5
--- /dev/null
+++ b/gcc6.patch
@@ -0,0 +1,52 @@
+From f8a75ca667a1d27be2a304502edd01d064cce20a Mon Sep 17 00:00:00 2001
+From: Jesse Schalken <me at jesseschalken.com>
+Date: Wed, 21 Sep 2016 07:43:46 -0700
+Subject: [PATCH] Fix "flexible array member in an otherwise empty struct"
+ error on GCC 6.2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Summary:
+Fixes the following error on GCC 6.2:
+
+```
+In file included from /hphp/runtime/base/rds-header.h:24:0,
+                 from /hphp/runtime/base/request-injection-data.h:20,
+                 from /hphp/runtime/base/thread-info.h:24,
+                 from /hphp/runtime/base/array-init.h:26,
+                 from /hphp/system/systemlib.cpp:18:
+/hphp/runtime/vm/bytecode.h: At global scope:
+/hphp/runtime/vm/bytecode.h:128:26: error: flexible array member ‘HPHP::ExtraArgs::m_extraArgs’ in an otherwise empty ‘struct HPHP::ExtraArgs’
+   TypedValue m_extraArgs[];
+                          ^
+/hphp/runtime/vm/bytecode.h:80:8: note: in the definition of ‘struct HPHP::ExtraArgs’
+ struct ExtraArgs {
+        ^~~~~~~~~
+```
+
+Closes #6933
+Closes https://github.com/facebook/hhvm/pull/7374
+
+Differential Revision: D3899402
+
+Pulled By: aorenste
+
+fbshipit-source-id: 9d7c7de1ee9607e50db584ac8a58b8aaa8cdf5fc
+---
+ hphp/runtime/vm/bytecode.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hphp/runtime/vm/bytecode.h b/hphp/runtime/vm/bytecode.h
+index 6897ff2..22a3c5e 100644
+--- a/hphp/runtime/vm/bytecode.h
++++ b/hphp/runtime/vm/bytecode.h
+@@ -125,7 +125,7 @@ struct ExtraArgs {
+   static void* allocMem(unsigned nargs);
+ 
+ private:
+-  TypedValue m_extraArgs[];
++  TypedValue m_extraArgs[0];
+ };
+ 
+ /*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hhvm.git/commitdiff/199131a50740ba695dac73c93af523d838e54009



More information about the pld-cvs-commit mailing list