diff options
author | Piotr Bogdan <ppbogdan@gmail.com> | 2017-08-29 16:13:32 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2017-08-30 21:52:49 +0200 |
commit | d9a0c68775b8e01c2ef2673d2bea8234b5c497bf (patch) | |
tree | d2c458e22b6338a770afac734ab3a11642276ecb /pkgs/development/compilers | |
parent | 46e41da543a3885554733b06e720937f7df742a3 (diff) | |
download | nixlib-d9a0c68775b8e01c2ef2673d2bea8234b5c497bf.tar nixlib-d9a0c68775b8e01c2ef2673d2bea8234b5c497bf.tar.gz nixlib-d9a0c68775b8e01c2ef2673d2bea8234b5c497bf.tar.bz2 nixlib-d9a0c68775b8e01c2ef2673d2bea8234b5c497bf.tar.lz nixlib-d9a0c68775b8e01c2ef2673d2bea8234b5c497bf.tar.xz nixlib-d9a0c68775b8e01c2ef2673d2bea8234b5c497bf.tar.zst nixlib-d9a0c68775b8e01c2ef2673d2bea8234b5c497bf.zip |
hhvm: fix build
Upstream re2 commit: https://github.com/google/re2/commit/b94b7cd42e9f02673cd748c1ac1d16db4052514c Upstream bytecode.h commit: https://github.com/facebook/hhvm/commit/f8a75ca667a1d27be2a304502edd01d064cce20a
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/hhvm/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/hhvm/flexible-array-members-gcc6.patch | 33 |
2 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix index f0f3a130ef68..c00629619ec7 100644 --- a/pkgs/development/compilers/hhvm/default.nix +++ b/pkgs/development/compilers/hhvm/default.nix @@ -26,6 +26,10 @@ stdenv.mkDerivation rec { gmp libyaml libedit libvpx imagemagick fribidi gperf ]; + patches = [ + ./flexible-array-members-gcc6.patch + ]; + enableParallelBuilding = false; # occasional build problems; dontUseCmakeBuildDir = true; NIX_LDFLAGS = "-lpam -L${pam}/lib"; diff --git a/pkgs/development/compilers/hhvm/flexible-array-members-gcc6.patch b/pkgs/development/compilers/hhvm/flexible-array-members-gcc6.patch new file mode 100644 index 000000000000..11affa75bc92 --- /dev/null +++ b/pkgs/development/compilers/hhvm/flexible-array-members-gcc6.patch @@ -0,0 +1,33 @@ +diff --git a/hphp/runtime/vm/bytecode.h b/hphp/runtime/vm/bytecode.h +index ddc7b69..edf807c 100644 +--- a/hphp/runtime/vm/bytecode.h ++++ b/hphp/runtime/vm/bytecode.h +@@ -124,7 +124,7 @@ private: + static void* allocMem(unsigned nargs); + + private: +- TypedValue m_extraArgs[]; ++ TypedValue m_extraArgs[0]; + TYPE_SCAN_FLEXIBLE_ARRAY_FIELD(m_extraArgs); + }; + +diff --git a/third-party/re2/src/re2/dfa.cc b/third-party/re2/src/re2/dfa.cc +index 483f678..3aa3610 100644 +--- a/third-party/re2/src/re2/dfa.cc ++++ b/third-party/re2/src/re2/dfa.cc +@@ -101,8 +101,13 @@ class DFA { + uint flag_; // Empty string bitfield flags in effect on the way + // into this state, along with kFlagMatch if this + // is a matching state. +- std::atomic<State*> next_[]; // Outgoing arrows from State, +- // one per input byte class ++// Work around the bug affecting flexible array members in GCC 6.1 and 6.2. ++// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932) ++#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 6 && __GNUC_MINOR__ >= 1 ++ std::atomic<State*> next_[0]; // Outgoing arrows from State, one per input byte class ++#else ++ std::atomic<State*> next_[]; // Outgoing arrows from State, one per input byte class ++#endif + }; + + enum { |