Commit 00491fd2 authored by Tristan Cavelier's avatar Tristan Cavelier

xxx __WORDSIZE

parent 9eb99398
...@@ -14,7 +14,7 @@ url = https://github.com/ONLYOFFICE/core/archive/f84ee9a5a30b79a2995a96f8019978d ...@@ -14,7 +14,7 @@ url = https://github.com/ONLYOFFICE/core/archive/f84ee9a5a30b79a2995a96f8019978d
md5sum = 2ead88646094941dc8de12cdc72ba3b2 md5sum = 2ead88646094941dc8de12cdc72ba3b2
patch-options = -p0 patch-options = -p0
patches = patches =
${:_profile_base_location_}/rewrite-scripts.patch#1c001e448c68237426e18d4c2b0e674e ${:_profile_base_location_}/rewrite-scripts.patch#332e95ceda960f50bd3f7db5da1f3de5
${:_profile_base_location_}/cryptopp.patch#a2f892e23e13952539d1acfd013be7de ${:_profile_base_location_}/cryptopp.patch#a2f892e23e13952539d1acfd013be7de
# ${:_profile_base_location_}/avoid-7z.patch#0dd7356c1a766ec14e0e8bcafcffe1a7 # ${:_profile_base_location_}/avoid-7z.patch#0dd7356c1a766ec14e0e8bcafcffe1a7
# error: 'to_wstring' is not a member of 'std' -> http://www.cplusplus.com/forum/general/109469/ # error: 'to_wstring' is not a member of 'std' -> http://www.cplusplus.com/forum/general/109469/
......
...@@ -338,7 +338,7 @@ ...@@ -338,7 +338,7 @@
+git apply ../slapos-v8.patch +git apply ../slapos-v8.patch
--- /dev/null 2017-01-30 09:00:09.914078893 +0100 --- /dev/null 2017-01-30 09:00:09.914078893 +0100
+++ Common/3dParty/v8/slapos-v8.patch 2017-02-01 16:39:12.093279611 +0100 +++ Common/3dParty/v8/slapos-v8.patch 2017-02-01 16:39:12.093279611 +0100
@@ -0,0 +1,184 @@ @@ -0,0 +1,235 @@
+diff --git a/build/standalone.gypi b/build/standalone.gypi +diff --git a/build/standalone.gypi b/build/standalone.gypi
+index f804715..48eea0f 100644 +index f804715..48eea0f 100644
+--- a/build/standalone.gypi +--- a/build/standalone.gypi
...@@ -375,36 +375,45 @@ ...@@ -375,36 +375,45 @@
+ 'linux_use_gold_flags%': 0, + 'linux_use_gold_flags%': 0,
+ }], + }],
+diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc +diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc
+index b3841d0..992d092 100644 +index b3841d0..a351755 100644
+--- a/src/compiler/arm64/code-generator-arm64.cc +--- a/src/compiler/arm64/code-generator-arm64.cc
++++ b/src/compiler/arm64/code-generator-arm64.cc ++++ b/src/compiler/arm64/code-generator-arm64.cc
+@@ -12,6 +12,10 @@ +@@ -12,6 +12,17 @@
+ #include "src/compiler/node-matchers.h" + #include "src/compiler/node-matchers.h"
+ #include "src/compiler/osr.h" + #include "src/compiler/osr.h"
+ +
++#ifndef INT64_MIN ++# ifndef __INT64_C
++#define INT64_MIN (-9223372036854775807LL -1) ++# if __WORDSIZE == 64
++#endif ++# define __INT64_C(c) c ## L
++# else
++# define __INT64_C(c) c ## LL
++# endif
++# endif
++# ifndef INT64_MIN
++# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
++# endif
++ ++
+ namespace v8 { + namespace v8 {
+ namespace internal { + namespace internal {
+ namespace compiler { + namespace compiler {
+diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc +diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
+index 053c646..efd4242 100644 +index 053c646..94211ec 100644
+--- a/src/compiler/instruction-selector.cc +--- a/src/compiler/instruction-selector.cc
++++ b/src/compiler/instruction-selector.cc ++++ b/src/compiler/instruction-selector.cc
+@@ -14,6 +14,10 @@ +@@ -14,6 +14,12 @@
+ #include "src/compiler/state-values-utils.h" + #include "src/compiler/state-values-utils.h"
+ #include "src/deoptimizer.h" + #include "src/deoptimizer.h"
+ +
++#ifndef SIZE_MAX ++# if __WORDSIZE == 64
++#define SIZE_MAX (4294967295U) ++# define SIZE_MAX (18446744073709551615UL)
++#endif ++# else
++# define SIZE_MAX (4294967295U)
++# endif
++ ++
+ namespace v8 { + namespace v8 {
+ namespace internal { + namespace internal {
+ namespace compiler { + namespace compiler {
+@@ -387,6 +391,7 @@ size_t AddOperandToStateValueDescriptor(StateValueDescriptor* descriptor, +@@ -387,6 +393,7 @@ size_t AddOperandToStateValueDescriptor(StateValueDescriptor* descriptor,
+ return 1; + return 1;
+ } + }
+ } + }
...@@ -413,57 +422,85 @@ ...@@ -413,57 +422,85 @@
+ +
+ +
+diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc +diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
+index 8a64744..7c9b425 100644 +index 8a64744..86d3ba1 100644
+--- a/src/compiler/x64/code-generator-x64.cc +--- a/src/compiler/x64/code-generator-x64.cc
++++ b/src/compiler/x64/code-generator-x64.cc ++++ b/src/compiler/x64/code-generator-x64.cc
+@@ -12,6 +12,10 @@ +@@ -12,6 +12,17 @@
+ #include "src/x64/assembler-x64.h" + #include "src/x64/assembler-x64.h"
+ #include "src/x64/macro-assembler-x64.h" + #include "src/x64/macro-assembler-x64.h"
+ +
++#ifndef INT64_MIN ++# ifndef __INT64_C
++#define INT64_MIN (-9223372036854775807LL -1) ++# if __WORDSIZE == 64
++#endif ++# define __INT64_C(c) c ## L
++# else
++# define __INT64_C(c) c ## LL
++# endif
++# endif
++# ifndef INT64_MIN
++# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
++# endif
++ ++
+ namespace v8 { + namespace v8 {
+ namespace internal { + namespace internal {
+ namespace compiler { + namespace compiler {
+diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc +diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
+index cea90a2..9f4978a 100644 +index cea90a2..44d0a0f 100644
+--- a/test/cctest/compiler/test-run-machops.cc +--- a/test/cctest/compiler/test-run-machops.cc
++++ b/test/cctest/compiler/test-run-machops.cc ++++ b/test/cctest/compiler/test-run-machops.cc
+@@ -14,6 +14,16 @@ +@@ -14,6 +14,30 @@
+ #include "test/cctest/compiler/graph-builder-tester.h" + #include "test/cctest/compiler/graph-builder-tester.h"
+ #include "test/cctest/compiler/value-helper.h" + #include "test/cctest/compiler/value-helper.h"
+ +
++#ifndef INT64_MIN ++# ifndef __INT64_C
++#define INT64_MIN (-9223372036854775807LL -1) ++# if __WORDSIZE == 64
++#endif ++# define __INT64_C(c) c ## L
++#ifndef INT64_MAX ++# else
++#define INT64_MAX (9223372036854775807LL) ++# define __INT64_C(c) c ## LL
++#endif ++# endif
++#ifndef UINT64_MAX ++# endif
++#define UINT64_MAX (18446744073709551615ULL) ++# ifndef INT64_MIN
++#endif ++# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
++# endif
++# ifndef INT64_MAX
++# define INT64_MAX (__INT64_C(9223372036854775807))
++# endif
++# ifndef __UINT64_C
++# if __WORDSIZE == 64
++# define __UINT64_C(c) c ## UL
++# else
++# define __UINT64_C(c) c ## ULL
++# endif
++# endif
++# ifndef UINT64_MAX
++# define UINT64_MAX (__UINT64_C(18446744073709551615))
++# endif
++ ++
+ using namespace v8::base; + using namespace v8::base;
+ +
+ namespace v8 { + namespace v8 {
+diff --git a/test/cctest/test-macro-assembler-mips64.cc b/test/cctest/test-macro-assembler-mips64.cc +diff --git a/test/cctest/test-macro-assembler-mips64.cc b/test/cctest/test-macro-assembler-mips64.cc
+index e74703b..5648984 100644 +index e74703b..4c91684 100644
+--- a/test/cctest/test-macro-assembler-mips64.cc +--- a/test/cctest/test-macro-assembler-mips64.cc
++++ b/test/cctest/test-macro-assembler-mips64.cc ++++ b/test/cctest/test-macro-assembler-mips64.cc
+@@ -36,6 +36,10 @@ +@@ -36,6 +36,17 @@
+ #include "src/mips64/macro-assembler-mips64.h" + #include "src/mips64/macro-assembler-mips64.h"
+ #include "src/mips64/simulator-mips64.h" + #include "src/mips64/simulator-mips64.h"
+ +
++#ifndef INT64_MAX ++# ifndef __INT64_C
++#define INT64_MAX (9223372036854775807LL) ++# if __WORDSIZE == 64
++#endif ++# define __INT64_C(c) c ## L
++# else
++# define __INT64_C(c) c ## LL
++# endif
++# endif
++# ifndef INT64_MAX
++# define INT64_MAX (__INT64_C(9223372036854775807))
++# endif
++ ++
+ +
+ using namespace v8::internal; + using namespace v8::internal;
+ +
+@@ -456,7 +460,7 @@ static uint64_t run_dlsa(uint64_t rt, uint64_t rs, int8_t sa) { +@@ -456,7 +467,7 @@ static uint64_t run_dlsa(uint64_t rt, uint64_t rs, int8_t sa) {
+ Handle<Code> code = isolate->factory()->NewCode( + Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); + desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ +
...@@ -490,22 +527,36 @@ ...@@ -490,22 +527,36 @@
+ using namespace v8::internal; + using namespace v8::internal;
+ +
+diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc +diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
+index a3730ca..9cb5026 100644 +index a3730ca..7a7b21f 100644
+--- a/test/cctest/wasm/test-run-wasm.cc +--- a/test/cctest/wasm/test-run-wasm.cc
++++ b/test/cctest/wasm/test-run-wasm.cc ++++ b/test/cctest/wasm/test-run-wasm.cc
+@@ -13,6 +13,16 @@ +@@ -13,6 +13,30 @@
+ #include "test/cctest/wasm/test-signatures.h" + #include "test/cctest/wasm/test-signatures.h"
+ #include "test/cctest/wasm/wasm-run-utils.h" + #include "test/cctest/wasm/wasm-run-utils.h"
+ +
++#ifndef INT64_MIN ++# ifndef __INT64_C
++#define INT64_MIN (-9223372036854775807LL -1) ++# if __WORDSIZE == 64
++#endif ++# define __INT64_C(c) c ## L
++#ifndef INT64_MAX ++# else
++#define INT64_MAX (9223372036854775807LL) ++# define __INT64_C(c) c ## LL
++#endif ++# endif
++#ifndef UINT64_MAX ++# endif
++#define UINT64_MAX (18446744073709551615ULL) ++# ifndef INT64_MIN
++#endif ++# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
++# endif
++# ifndef INT64_MAX
++# define INT64_MAX (__INT64_C(9223372036854775807))
++# endif
++# ifndef __UINT64_C
++# if __WORDSIZE == 64
++# define __UINT64_C(c) c ## UL
++# else
++# define __UINT64_C(c) c ## ULL
++# endif
++# endif
++# ifndef UINT64_MAX
++# define UINT64_MAX (__UINT64_C(18446744073709551615))
++# endif
++ ++
+ using namespace v8::base; + using namespace v8::base;
+ using namespace v8::internal; + using namespace v8::internal;
......
# ifndef __UINT64_C
# if __WORDSIZE == 64
# define __UINT64_C(c) c ## UL
# else
# define __UINT64_C(c) c ## ULL
# endif
# endif
# ifndef UINT64_MAX
# define UINT64_MAX (__UINT64_C(18446744073709551615))
# endif
# ifndef __INT64_C
# if __WORDSIZE == 64
# define __INT64_C(c) c ## L
# else
# define __INT64_C(c) c ## LL
# endif
# endif
# ifndef INT64_MIN
# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
# endif
# ifndef INT64_MAX
# define INT64_MAX (__INT64_C(9223372036854775807))
# endif
# ifndef UINT64_C
# if __WORDSIZE == 64
# define UINT64_C(c) c ## UL
# else
# define UINT64_C(c) c ## ULL
# endif
# endif
# if __WORDSIZE == 64
# define SIZE_MAX (18446744073709551615UL)
# else
# define SIZE_MAX (4294967295U)
# endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment