From 552afe2fcdbcb32f49954dbcade4e009521d424c Mon Sep 17 00:00:00 2001 From: ignisf Date: Wed, 15 May 2013 15:10:37 +0300 Subject: [PATCH] Add patches that allow compiling under GCC4.8 --- patches/disable-building-tests.patch | 25 +++++++++++++++++ patches/gcc48-wno-unused-local-typedefs.patch | 28 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 patches/disable-building-tests.patch create mode 100644 patches/gcc48-wno-unused-local-typedefs.patch diff --git a/patches/disable-building-tests.patch b/patches/disable-building-tests.patch new file mode 100644 index 0000000..a9f2555 --- /dev/null +++ b/patches/disable-building-tests.patch @@ -0,0 +1,25 @@ +diff --git a/Makefile b/Makefile +index 0cdae4b..2bf8aa5 100644 +--- a/Makefile ++++ b/Makefile +@@ -153,7 +153,7 @@ ANDROID_ARCHES = android_ia32 android_arm + # List of files that trigger Makefile regeneration: + GYPFILES = build/all.gyp build/common.gypi build/standalone.gypi \ + preparser/preparser.gyp samples/samples.gyp src/d8.gyp \ +- test/cctest/cctest.gyp tools/gyp/v8.gyp ++ tools/gyp/v8.gyp + + # Generates all combinations of ARCHES and MODES, e.g. "ia32.release". + BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) +diff --git a/build/all.gyp b/build/all.gyp +index 4b2fe52..9885678 100644 +--- a/build/all.gyp ++++ b/build/all.gyp +@@ -11,7 +11,6 @@ + '../preparser/preparser.gyp:*', + '../samples/samples.gyp:*', + '../src/d8.gyp:d8', +- '../test/cctest/cctest.gyp:*', + ], + } + ] diff --git a/patches/gcc48-wno-unused-local-typedefs.patch b/patches/gcc48-wno-unused-local-typedefs.patch new file mode 100644 index 0000000..d45276d --- /dev/null +++ b/patches/gcc48-wno-unused-local-typedefs.patch @@ -0,0 +1,28 @@ +diff --git a/build/common.gypi b/build/common.gypi +index 3a59639..365178a 100644 +--- a/build/common.gypi ++++ b/build/common.gypi +@@ -376,7 +376,8 @@ + }], + ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { + 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', +- '-Wnon-virtual-dtor', '-Woverloaded-virtual' ], ++ '-Wnon-virtual-dtor', '-Woverloaded-virtual', ++ '-Wno-unused-local-typedefs' ], + }], + ['OS=="linux" and v8_enable_backtrace==1', { + # Support for backtrace_symbols. +diff --git a/build/standalone.gypi b/build/standalone.gypi +index 125c5bf..32eaf85 100644 +--- a/build/standalone.gypi ++++ b/build/standalone.gypi +@@ -98,7 +98,8 @@ + 'target_defaults': { + 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', + '-Wnon-virtual-dtor', '-pthread', '-fno-rtti', +- '-fno-exceptions', '-pedantic' ], ++ '-fno-exceptions', '-pedantic', ++ '-Wno-unused-local-typedefs' ], + 'ldflags': [ '-pthread', ], + 'conditions': [ + [ 'OS=="linux"', {