diff --git a/CMakeLists.txt b/CMakeLists.txt index b004012d33..75f6837127 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,14 @@ endif () math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}") add_definitions("-DTRI_BITS=${BITS}") -add_definitions("-DTRI_ENABLE_CLUSTER=1") + +################################################################################ +### @brief raspberry pi +################################################################################ + +if (BUILD_PACKAGE STREQUAL "raspbian") + add_definitions("-DTRI_FORCE_ARMV6") +endif () ## ----------------------------------------------------------------------------- ## --SECTION-- OPTIONS diff --git a/arangod/V8Server/ApplicationV8.cpp b/arangod/V8Server/ApplicationV8.cpp index 48ef47434a..db97425bf2 100644 --- a/arangod/V8Server/ApplicationV8.cpp +++ b/arangod/V8Server/ApplicationV8.cpp @@ -1037,6 +1037,11 @@ bool ApplicationV8::prepare () { v8::V8::SetFlagsFromString(_v8Options.c_str(), (int) _v8Options.size()); } +#ifdef TRI_FORCE_ARMV6 + const string forceARMv6 = "--noenable-armv7"; + v8::V8::SetFlagsFromString(forceARMv6.c_str(), (int) forceARMv6.size()); +#endif + // use a minimum of 1 second for GC if (_gcFrequency < 1) { _gcFrequency = 1; diff --git a/arangosh/Makefile.files b/arangosh/Makefile.files index fdcbe8302a..c9e853d15e 100644 --- a/arangosh/Makefile.files +++ b/arangosh/Makefile.files @@ -15,8 +15,7 @@ bin_arangob_CPPFLAGS = \ bin_arangob_LDADD = \ lib/libarango_client.a \ lib/libarango.a \ - $(LIBS) \ - @V8_LIBS@ + $(LIBS) bin_arangob_SOURCES = \ arangosh/ArangoShell/ArangoClient.cpp \ @@ -33,8 +32,7 @@ bin_arangodump_CPPFLAGS = \ bin_arangodump_LDADD = \ lib/libarango_client.a \ lib/libarango.a \ - $(LIBS) \ - @V8_LIBS@ + $(LIBS) bin_arangodump_SOURCES = \ arangosh/ArangoShell/ArangoClient.cpp \ @@ -72,8 +70,7 @@ bin_arangorestore_CPPFLAGS = \ bin_arangorestore_LDADD = \ lib/libarango_client.a \ lib/libarango.a \ - $(LIBS) \ - @V8_LIBS@ + $(LIBS) bin_arangorestore_SOURCES = \ arangosh/ArangoShell/ArangoClient.cpp \ diff --git a/arangosh/V8Client/arangosh.cpp b/arangosh/V8Client/arangosh.cpp index 19f0058217..b68e349f38 100644 --- a/arangosh/V8Client/arangosh.cpp +++ b/arangosh/V8Client/arangosh.cpp @@ -2348,9 +2348,7 @@ int main (int argc, char* args[]) { // ............................................................................. v8::V8::InitializeICU(); - v8::Platform* platform = v8::platform::CreateDefaultPlatform(); - v8::V8::InitializePlatform(platform); // set V8 options if (! V8Options.empty()) { // explicit option --javascript.v8-options used @@ -2361,6 +2359,14 @@ int main (int argc, char* args[]) { v8::V8::SetFlagsFromCommandLine(&argc, args, true); } +#ifdef TRI_FORCE_ARMV6 + const string forceARMv6 = "--noenable-armv7"; + v8::V8::SetFlagsFromString(forceARMv6.c_str(), (int) forceARMv6.size()); +#endif + + v8::Platform* platform = v8::platform::CreateDefaultPlatform(); + v8::V8::InitializePlatform(platform); + BufferAllocator bufferAllocator; v8::V8::SetArrayBufferAllocator(&bufferAllocator);