Reviewers: Jakob, danno, Paul Lind, kisg,

Description:
MIPS: fix mips_arch_variant bug in GYP build.

There is a small bug that causes to build mips32r2
version of v8 as mips32 (r1). This affects only
the compiled code.

In the default case of building for mips32r2,
the compiler flags are the following:

-EL -mhard-float -mips32r2 -Wa,-mips32r2 -mips32 -Wa,-mips32

Since the "last flag wins" the object files are
compiled as mips32. In a funny twist, the
code sourcery lite compilers do not have multi-lib support,
and there is a bug that if you tell it to link mips32,
it will silently link the object files with
mips32r2 libraries, and then the resulting binary is mips32r2.

This commit fixes the mips32r1/mips32r2 build.

BUG=
TEST=


Please review this at https://chromiumcodereview.appspot.com/11289003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M build/common.gypi


Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index e0564989e62014dd62072f10b746fee942a02f4e..f27603e7207ce22deea6630b133c5fa76ae268bf 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -210,10 +210,11 @@
                   ['mips_arch_variant=="mips32r2"', {
                     'cflags': ['-mips32r2', '-Wa,-mips32r2'],
                   }],
+                  ['mips_arch_variant=="mips32r1"', {
+                    'cflags': ['-mips32', '-Wa,-mips32'],
+                 }],
                   ['mips_arch_variant=="loongson"', {
                     'cflags': ['-mips3', '-Wa,-mips3'],
-                  }, {
-                    'cflags': ['-mips32', '-Wa,-mips32'],
                   }],
                 ],
               }],


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to