Index: Makefile
--- Makefile.orig	2015-09-23 11:06:12.000000000 +0200
+++ Makefile	2015-10-31 20:19:26.730405458 +0100
@@ -245,14 +245,13 @@
 NACL_ARCHES = nacl_ia32 nacl_x64
 
 # List of files that trigger Makefile regeneration:
-GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \
+GYPFILES = \
 	   build/shim_headers.gypi build/features.gypi build/standalone.gypi \
 	   build/toolchain.gypi build/all.gyp build/mac/asan.gyp \
 	   test/cctest/cctest.gyp \
 	   test/unittests/unittests.gyp tools/gyp/v8.gyp \
 	   tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \
-	   buildtools/third_party/libc++abi/libc++abi.gyp \
-	   buildtools/third_party/libc++/libc++.gyp samples/samples.gyp \
+	   samples/samples.gyp \
 	   src/third_party/vtune/v8vtune.gyp src/d8.gyp
 
 # If vtunejit=on, the v8vtune.gyp will be appended.
Index: build/all.gyp
--- build/all.gyp.orig	2015-09-23 11:06:12.000000000 +0200
+++ build/all.gyp	2015-10-31 20:19:26.730405458 +0100
@@ -8,10 +8,7 @@
       'target_name': 'All',
       'type': 'none',
       'dependencies': [
-        '../samples/samples.gyp:*',
-        '../src/d8.gyp:d8',
-        '../test/cctest/cctest.gyp:*',
-        '../test/unittests/unittests.gyp:*',
+        '../src/d8.gyp:d8'
       ],
       'conditions': [
         ['component!="shared_library"', {
Index: build/standalone.gypi
--- build/standalone.gypi.orig	2015-09-23 11:06:12.000000000 +0200
+++ build/standalone.gypi	2015-10-31 20:19:26.730405458 +0100
@@ -366,7 +366,7 @@
         # (defines are passed via the command line, and build systems rebuild
         # things when their commandline changes). Nothing should ever read this
         # define.
-        'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'],
+        'defines': ['CR_CLANG_REVISION=0'],
         'cflags+': [
           '-Wno-format-pedantic',
         ],
Index: src/base/platform/platform-freebsd.cc
--- src/base/platform/platform-freebsd.cc.orig	2015-09-23 11:06:12.000000000 +0200
+++ src/base/platform/platform-freebsd.cc	2015-10-31 20:19:26.730405458 +0100
@@ -8,6 +8,7 @@
 #include <pthread.h>
 #include <semaphore.h>
 #include <signal.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <sys/resource.h>
 #include <sys/time.h>
Index: src/base/platform/platform-posix.cc
--- src/base/platform/platform-posix.cc.orig	2015-09-23 11:06:12.000000000 +0200
+++ src/base/platform/platform-posix.cc	2015-10-31 20:19:26.730405458 +0100
@@ -26,6 +26,9 @@
     defined(__NetBSD__) || defined(__OpenBSD__)
 #include <sys/sysctl.h>  // NOLINT, for sysctl
 #endif
+#if defined(__FreeBSD__)
+#include <sys/thr.h>
+#endif
 
 #undef MAP_TYPE
 
@@ -36,6 +39,7 @@
 
 #include <cmath>
 #include <cstdlib>
+#include <cstdio>
 
 #include "src/base/lazy-instance.h"
 #include "src/base/macros.h"
Index: src/log-utils.cc
--- src/log-utils.cc.orig	2015-09-23 11:06:12.000000000 +0200
+++ src/log-utils.cc	2015-10-31 20:19:26.738912614 +0100
@@ -4,6 +4,9 @@
 
 #include "src/v8.h"
 
+#include <stdio.h>
+#include <stdlib.h>
+
 #include "src/log-utils.h"
 #include "src/string-stream.h"
 #include "src/version.h"
Index: src/log-utils.h
--- src/log-utils.h.orig	2015-09-23 11:06:12.000000000 +0200
+++ src/log-utils.h	2015-10-31 20:19:26.738912614 +0100
@@ -5,6 +5,7 @@
 #ifndef V8_LOG_UTILS_H_
 #define V8_LOG_UTILS_H_
 
+#include <stdarg.h>
 #include "src/allocation.h"
 
 namespace v8 {
Index: tools/gyp/v8.gyp
--- tools/gyp/v8.gyp.orig	2015-09-23 11:06:12.000000000 +0200
+++ tools/gyp/v8.gyp	2015-10-31 20:19:26.738912614 +0100
@@ -377,6 +377,9 @@
         '../../include/v8-version.h',
         '../../include/v8.h',
         '../../include/v8config.h',
+        '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
+        '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
+        '../../src/snapshot/snapshot-empty.cc',
         '../../src/accessors.cc',
         '../../src/accessors.h',
         '../../src/allocation.cc',
