diff options
author | vanilla <vanilla@FreeBSD.org> | 2011-09-25 10:17:44 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2011-09-25 10:17:44 +0800 |
commit | cdcc5db389e40dcdefdd5afaa3e2a6f7a5bae2ef (patch) | |
tree | a36273c961a81165054ef676e0ce7abf2e860052 /lang | |
parent | cd3b0f5a1352edb4dfaa963b38aa7d043f201fd2 (diff) | |
download | freebsd-ports-gnome-cdcc5db389e40dcdefdd5afaa3e2a6f7a5bae2ef.tar.gz freebsd-ports-gnome-cdcc5db389e40dcdefdd5afaa3e2a6f7a5bae2ef.tar.zst freebsd-ports-gnome-cdcc5db389e40dcdefdd5afaa3e2a6f7a5bae2ef.zip |
Fix build error with clang.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/v8/Makefile | 1 | ||||
-rw-r--r-- | lang/v8/files/patch-src_conversions.h | 19 | ||||
-rw-r--r-- | lang/v8/files/patch-src_hydrogen-instructions.cc | 28 | ||||
-rw-r--r-- | lang/v8/files/patch-src_jsregexp.cc | 29 | ||||
-rw-r--r-- | lang/v8/files/patch-src_jsregexp.h | 11 | ||||
-rw-r--r-- | lang/v8/files/patch-src_lithium-codegen-ia32.cc | 10 |
6 files changed, 98 insertions, 0 deletions
diff --git a/lang/v8/Makefile b/lang/v8/Makefile index 9e36993b375b..c44039edbba0 100644 --- a/lang/v8/Makefile +++ b/lang/v8/Makefile @@ -52,6 +52,7 @@ V8ARCH=x64 .endif PLIST_SUB+= ARCH=${V8ARCH} SCONS_ARGS+= arch=${V8ARCH} +SCONS_BUILDENV+= CC="${CC} ${CFLAGS}" CXX="${CXX} ${CXXFLAGS}" do-build: @cd ${BUILD_WRKSRC} && \ diff --git a/lang/v8/files/patch-src_conversions.h b/lang/v8/files/patch-src_conversions.h new file mode 100644 index 000000000000..bd594edb5935 --- /dev/null +++ b/lang/v8/files/patch-src_conversions.h @@ -0,0 +1,19 @@ +--- src/conversions.h.orig 2011-09-23 16:57:57.000000000 +0800 ++++ src/conversions.h 2011-09-23 16:58:09.000000000 +0800 +@@ -45,14 +45,14 @@ namespace internal { + const int kMaxSignificantDigits = 772; + + +-static bool isDigit(int x, int radix) { ++static inline bool isDigit(int x, int radix) { + return (x >= '0' && x <= '9' && x < '0' + radix) + || (radix > 10 && x >= 'a' && x < 'a' + radix - 10) + || (radix > 10 && x >= 'A' && x < 'A' + radix - 10); + } + + +-static double SignedZero(bool negative) { ++static inline double SignedZero(bool negative) { + return negative ? -0.0 : 0.0; + } + diff --git a/lang/v8/files/patch-src_hydrogen-instructions.cc b/lang/v8/files/patch-src_hydrogen-instructions.cc new file mode 100644 index 000000000000..ed2927964f77 --- /dev/null +++ b/lang/v8/files/patch-src_hydrogen-instructions.cc @@ -0,0 +1,28 @@ +--- src/hydrogen-instructions.cc.orig 2011-08-31 17:03:56.000000000 +0800 ++++ src/hydrogen-instructions.cc 2011-09-23 20:39:25.000000000 +0800 +@@ -1203,10 +1203,10 @@ void HBinaryOperation::PrintDataTo(Strin + Range* HBitAnd::InferRange() { + int32_t left_mask = (left()->range() != NULL) + ? left()->range()->Mask() +- : 0xffffffff; ++ : (int32_t) 0xffffffff; + int32_t right_mask = (right()->range() != NULL) + ? right()->range()->Mask() +- : 0xffffffff; ++ : (int32_t) 0xffffffff; + int32_t result_mask = left_mask & right_mask; + return (result_mask >= 0) + ? new Range(0, result_mask) +@@ -1217,10 +1217,10 @@ Range* HBitAnd::InferRange() { + Range* HBitOr::InferRange() { + int32_t left_mask = (left()->range() != NULL) + ? left()->range()->Mask() +- : 0xffffffff; ++ : (int32_t) 0xffffffff; + int32_t right_mask = (right()->range() != NULL) + ? right()->range()->Mask() +- : 0xffffffff; ++ : (int32_t) 0xffffffff; + int32_t result_mask = left_mask | right_mask; + return (result_mask >= 0) + ? new Range(0, result_mask) diff --git a/lang/v8/files/patch-src_jsregexp.cc b/lang/v8/files/patch-src_jsregexp.cc new file mode 100644 index 000000000000..8a2ae3266311 --- /dev/null +++ b/lang/v8/files/patch-src_jsregexp.cc @@ -0,0 +1,29 @@ +--- src/jsregexp.cc.orig 2011-08-31 17:03:56.000000000 +0800 ++++ src/jsregexp.cc 2011-09-23 20:41:09.000000000 +0800 +@@ -2661,7 +2661,7 @@ int TextNode::GreedyLoopTextLength() { + // this alternative and back to this choice node. If there are variable + // length nodes or other complications in the way then return a sentinel + // value indicating that a greedy loop cannot be constructed. +-int ChoiceNode::GreedyLoopTextLength(GuardedAlternative* alternative) { ++int ChoiceNode::GreedyLoopTextLengthForAlternative(GuardedAlternative* alternative) { + int length = 0; + RegExpNode* node = alternative->node(); + // Later we will generate code for all these text nodes using recursion +@@ -2700,7 +2700,7 @@ void LoopChoiceNode::AddContinueAlternat + void LoopChoiceNode::Emit(RegExpCompiler* compiler, Trace* trace) { + RegExpMacroAssembler* macro_assembler = compiler->macro_assembler(); + if (trace->stop_node() == this) { +- int text_length = GreedyLoopTextLength(&(alternatives_->at(0))); ++ int text_length = GreedyLoopTextLengthForAlternative(&(alternatives_->at(0))); + ASSERT(text_length != kNodeIsTooComplexForGreedyLoops); + // Update the counter-based backtracking info on the stack. This is an + // optimization for greedy loops (see below). +@@ -2893,7 +2893,7 @@ void ChoiceNode::Emit(RegExpCompiler* co + + Trace* current_trace = trace; + +- int text_length = GreedyLoopTextLength(&(alternatives_->at(0))); ++ int text_length = GreedyLoopTextLengthForAlternative(&(alternatives_->at(0))); + bool greedy_loop = false; + Label greedy_loop_label; + Trace counter_backtrack_trace; diff --git a/lang/v8/files/patch-src_jsregexp.h b/lang/v8/files/patch-src_jsregexp.h new file mode 100644 index 000000000000..c4d9009f4636 --- /dev/null +++ b/lang/v8/files/patch-src_jsregexp.h @@ -0,0 +1,11 @@ +--- src/jsregexp.h.orig 2011-09-23 16:55:52.000000000 +0800 ++++ src/jsregexp.h 2011-09-23 16:56:04.000000000 +0800 +@@ -1071,7 +1071,7 @@ class ChoiceNode: public RegExpNode { + virtual bool try_to_emit_quick_check_for_alternative(int i) { return true; } + + protected: +- int GreedyLoopTextLength(GuardedAlternative* alternative); ++ int GreedyLoopTextLengthForAlternative(GuardedAlternative* alternative); + ZoneList<GuardedAlternative>* alternatives_; + + private: diff --git a/lang/v8/files/patch-src_lithium-codegen-ia32.cc b/lang/v8/files/patch-src_lithium-codegen-ia32.cc new file mode 100644 index 000000000000..425edb3e6450 --- /dev/null +++ b/lang/v8/files/patch-src_lithium-codegen-ia32.cc @@ -0,0 +1,10 @@ +--- src/ia32/lithium-codegen-ia32.cc.orig 2011-09-23 17:00:54.000000000 +0800 ++++ src/ia32/lithium-codegen-ia32.cc 2011-09-23 17:01:10.000000000 +0800 +@@ -3175,7 +3175,6 @@ void LCodeGen::DoStoreKeyedFastElement(L + void LCodeGen::DoStoreKeyedFastDoubleElement( + LStoreKeyedFastDoubleElement* instr) { + XMMRegister value = ToDoubleRegister(instr->value()); +- Register key = instr->key()->IsRegister() ? ToRegister(instr->key()) : no_reg; + Label have_value; + + __ ucomisd(value, value); |