Reviewers: Jakob, danno, gergely.kis, palfia,
Message:
PTAL...
Description:
MIPS: Add android build support for mips in gyp.
Added mipsel target in gyp and makefiles used for android build.
BUG=
Please review this at https://codereview.chromium.org/12248014/
SVN Base: git://github.com/v8/v8.git@gbleed
Affected files:
M Makefile
M Makefile.android
M build/android.gypi
Index: Makefile
diff --git a/Makefile b/Makefile
index
0cdae4b05d22eaf0d1517680b7cbd9356abdc97b..8e550d0126c5c694151fdd83652b48e8c51910b2
100644
--- a/Makefile
+++ b/Makefile
@@ -148,7 +148,7 @@ endif
ARCHES = ia32 x64 arm mipsel
DEFAULT_ARCHES = ia32 x64 arm
MODES = release debug
-ANDROID_ARCHES = android_ia32 android_arm
+ANDROID_ARCHES = android_ia32 android_arm android_mipsel
# List of files that trigger Makefile regeneration:
GYPFILES = build/all.gyp build/common.gypi build/standalone.gypi \
Index: Makefile.android
diff --git a/Makefile.android b/Makefile.android
index
8e4ce0814ab6835dd59f4b55795f9a82cfef5f45..aeff01c665e1da1c9c6fc51daff0bb6c8f671bf6
100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -26,7 +26,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Those definitions should be consistent with the main Makefile
-ANDROID_ARCHES = android_ia32 android_arm
+ANDROID_ARCHES = android_ia32 android_arm android_mipsel
MODES = release debug
# Generates all combinations of ANDROID ARCHES and MODES,
@@ -50,11 +50,17 @@ ifeq ($(ARCH), android_arm)
DEFINES += arm_neon=0 armv7=1
TOOLCHAIN_ARCH = arm-linux-androideabi-4.6
else
- ifeq ($(ARCH), android_ia32)
- DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86
- TOOLCHAIN_ARCH = x86-4.6
+ ifeq ($(ARCH), android_mipsel)
+ DEFINES = target_arch=mipsel v8_target_arch=mipsel
android_target_arch=mips
+ DEFINES += mips_arch_variant=mips32r2
+ TOOLCHAIN_ARCH = mipsel-linux-android-4.6
else
- $(error Target architecture "${ARCH}" is not supported)
+ ifeq ($(ARCH), android_ia32)
+ DEFINES = target_arch=ia32 v8_target_arch=ia32
android_target_arch=x86
+ TOOLCHAIN_ARCH = x86-4.6
+ else
+ $(error Target architecture "${ARCH}" is not supported)
+ endif
endif
endif
Index: build/android.gypi
diff --git a/build/android.gypi b/build/android.gypi
index
67a9d35820884478d8f43fa96775d4a0aa218e46..092d98af03a747c2608c9d4d5bd0b0b03dcf737b
100644
--- a/build/android.gypi
+++ b/build/android.gypi
@@ -160,6 +160,24 @@
'-mfpu=vfp3',
],
}],
+ ['target_arch=="mipsel"', {
+ 'cflags': [
+ '-EL',
+ ],
+ 'conditions': [
+ ['mips_arch_variant=="mips32r2"', {
+ 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
+ }],
+ ['mips_arch_variant=="loongson"', {
+ 'cflags': ['-mips3', '-Wa,-mips3'],
+ }, {
+ 'cflags': ['-mips32', '-Wa,-mips32'],
+ }],
+ ],
+ 'ldflags': [
+ '-EL',
+ ],
+ }],
# NOTE: The stlport header include paths below are specified in
# cflags rather than include_dirs because they need to come
# after include_dirs. Think of them like system headers, but
@@ -181,6 +199,11 @@
'-L<(android_stlport_libs)/armeabi',
],
}],
+ ['target_arch=="mipsel"', {
+ 'ldflags': [
+ '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/mips',
+ ],
+ }],
['target_arch=="ia32"', {
'ldflags': [
'-L<(android_stlport_libs)/x86',
@@ -197,6 +220,16 @@
'-fno-stack-protector',
],
}],
+ ['target_arch=="mipsel"', {
+ # The mips toolchain currently has problems with
stack-protector.
+ 'cflags!': [
+ '-fstack-protector',
+ '-U__linux__'
+ ],
+ 'cflags': [
+ '-fno-stack-protector',
+ ],
+ }],
],
'target_conditions': [
['_type=="executable"', {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.