Bug: https://bugs.gentoo.org/594220
Commit: https://github.com/rethinkdb/rethinkdb/commit/871bd3705a1f29c4ab07a096d562a4b06231a97c

From 871bd3705a1f29c4ab07a096d562a4b06231a97c Mon Sep 17 00:00:00 2001
From: Etienne Laurin <etienne@atnnn.com>
Date: Wed, 16 Nov 2016 04:17:41 +0000
Subject: [PATCH] Workaround for building V8 with GCC 6.2

---
 mk/support/pkg/v8.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mk/support/pkg/v8.sh b/mk/support/pkg/v8.sh
index dc339ad0715..97f4d336c03 100644
--- a/mk/support/pkg/v8.sh
+++ b/mk/support/pkg/v8.sh
@@ -44,8 +44,10 @@ pkg_install () {
         arm*)   arch=arm; arch_gypflags=$raspberry_pi_gypflags ;;
         *)      arch=native ;;
     esac
+
     mode=release
-    pkg_make $arch.$mode CXX=$CXX LINK=$CXX LINK.target=$CXX GYPFLAGS="-Dwerror= $arch_gypflags" V=1
+    pkg_make $arch.$mode CXX=$CXX LINK=$CXX LINK.target=$CXX GYPFLAGS="-Dwerror= -Dv8_use_snapshot=false $arch_gypflags" V=1 
+
     for lib in `find "$build_dir/out/$arch.$mode" -maxdepth 1 -name \*.a` `find "$build_dir/out/$arch.$mode/obj.target" -name \*.a`; do
         name=`basename $lib`
         cp $lib "$install_dir/lib/${name/.$arch/}"
@@ -56,7 +58,7 @@ pkg_install () {
 pkg_link-flags () {
     # These are the necessary libraries recommended by the docs:
     # https://developers.google.com/v8/get_started#hello
-    for lib in libv8_{base,libbase,snapshot,libplatform}; do
+    for lib in libv8_{base,nosnapshot,libbase,libplatform}; do
         echo "$install_dir/lib/$lib.a"
     done
     for lib in libicu{i18n,uc,data}; do
