v8: Be able to build V8 for MIPS
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>
Mon, 21 Nov 2011 20:37:48 +0000 (21:37 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 1 Dec 2011 16:46:57 +0000 (17:46 +0100)
Add mips to the list in configure and the v8.pri, build the existing
MIPS files. The result has not been verified to work.

Change-Id: I0f4fd29cd9752d32b6d87e0df0e888822f40ac0a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
configure
src/v8/v8.pri

index 220482a..d62d3bd 100755 (executable)
--- a/configure
+++ b/configure
@@ -7509,7 +7509,7 @@ fi
 
 
 case "$CFG_ARCH" in
-i386|x86_64|arm|macosx) ;;
+i386|x86_64|arm|mips|macosx) ;;
 *) canBuildV8="no";;
 esac
 
index 66ec11a..9277a23 100644 (file)
@@ -9,6 +9,7 @@ isEmpty(V8_TARGET_ARCH) {
     # Detect target
     equals(QT_ARCH, x86_64)|contains(CONFIG, x86_64):V8_TARGET_ARCH = x64
     else:equals(QT_ARCH, "i386"):                    V8_TARGET_ARCH = ia32
+    else:equals(QT_ARCH, "mips"):                    V8_TARGET_ARCH = mips
     else:equals(QT_ARCH, "arm"):                     V8_TARGET_ARCH = arm
     else:equals(QMAKE_HOST.arch, armv7l):            V8_TARGET_ARCH = arm
     else:equals(QMAKE_HOST.arch, armv5tel):          V8_TARGET_ARCH = arm
@@ -211,6 +212,27 @@ SOURCES += \
     $$V8SRC/x64/stub-cache-x64.cc
 }
 
+arch_mips {
+DEFINES += V8_TARGET_MIPS
+SOURCES += \
+    $$V8SRC/mips/assembler-mips.cc \
+    $$V8SRC/mips/builtins-mips.cc \
+    $$V8SRC/mips/codegen-mips.cc \
+    $$V8SRC/mips/code-stubs-mips.cc \
+    $$V8SRC/mips/constants-mips.cc \
+    $$V8SRC/mips/cpu-mips.cc \
+    $$V8SRC/mips/debug-mips.cc \
+    $$V8SRC/mips/deoptimizer-mips.cc \
+    $$V8SRC/mips/disasm-mips.cc \
+    $$V8SRC/mips/frames-mips.cc \
+    $$V8SRC/mips/full-codegen-mips.cc \
+    $$V8SRC/mips/ic-mips.cc \
+    $$V8SRC/mips/macro-assembler-mips.cc \
+    $$V8SRC/mips/regexp-macro-assembler-mips.cc \
+    $$V8SRC/mips/simulator-mips.cc \
+    $$V8SRC/mips/stub-cache-mips.cc
+}
+
 unix:!symbian:!macx {
 SOURCES += \
     $$V8SRC/platform-linux.cc \