From 677a4a7ba57e1ad0ce1d0872c63786c1e4c1033e Mon Sep 17 00:00:00 2001 From: "jkummerow@chromium.org" Date: Wed, 8 Feb 2012 13:14:24 +0000 Subject: [PATCH] MIPS: Enabled native/cross-compilation for MIPS targets in the gyp system. Also added selectable mips32r2 mode. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/9361024 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- build/common.gypi | 25 +++++++++++++++++++++++++ build/mipsu.gypi | 1 + 2 files changed, 26 insertions(+) diff --git a/build/common.gypi b/build/common.gypi index 8201e2c..548df7b 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -169,6 +169,28 @@ 'V8_TARGET_ARCH_MIPS', ], 'conditions': [ + [ 'target_arch=="mips"', { + 'target_conditions': [ + ['_toolset=="target"', { + 'cflags': ['-EL'], + 'ldflags': ['-EL'], + 'conditions': [ + [ 'v8_use_mips_abi_hardfloat=="true"', { + 'cflags': ['-mhard-float'], + 'ldflags': ['-mhard-float'], + }, { + 'cflags': ['-msoft-float'], + 'ldflags': ['-msoft-float'], + }], + ['mips_arch_variant=="mips32r2"', { + 'cflags': ['-mips32r2', '-Wa,-mips32r2'], + }, { + 'cflags': ['-mips32', '-Wa,-mips32'], + }], + ], + }], + ], + }], [ 'v8_can_use_fpu_instructions=="true"', { 'defines': [ 'CAN_USE_FPU_INSTRUCTIONS', @@ -184,6 +206,9 @@ '__mips_soft_float=1' ], }], + ['mips_arch_variant=="mips32r2"', { + 'defines': ['_MIPS_ARCH_MIPS32R2',], + }], # The MIPS assembler assumes the host is 32 bits, # so force building 32-bit host tools. ['host_arch=="x64"', { diff --git a/build/mipsu.gypi b/build/mipsu.gypi index 8dfea74..306f105 100644 --- a/build/mipsu.gypi +++ b/build/mipsu.gypi @@ -29,5 +29,6 @@ 'variables': { 'target_arch': 'ia32', 'v8_target_arch': 'mips', + 'mips_arch_variant': 'mips32r2', }, } -- 2.7.4