Reviewers: Michael Starzinger,

Message:
Yo dawg, I heard you like your buildbots green...

Description:
Merge r11643, r11597, and a tiny piece from r11486 to the 3.9 branch.

This should fix the ia32 and arm builders for the 3.9 branch.


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

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

Affected files:
  M Makefile
  M build/common.gypi
  M build/standalone.gypi


Index: Makefile
diff --git a/Makefile b/Makefile
index 2f86c512e47be7e6bc1bb39a77658b3ee63d277f..7a834ff3434b9e106726108710be294dbf308b32 100644
--- a/Makefile
+++ b/Makefile
@@ -243,6 +243,7 @@ $(OUTDIR)/Makefile-native: $(GYPFILES) $(ENVFILE)
 $(OUTDIR)/Makefile-android: $(GYPFILES) $(ENVFILE) build/android.gypi \
                             must-set-ANDROID_NDK_ROOT
        CC="${ANDROID_TOOL_PREFIX}-gcc" \
+       CXX="${ANDROID_TOOL_PREFIX}-g++" \
        build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
                      -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \
                      -S-android $(GYPFLAGS)
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 74a964d4db57e7bf1a7272f31743a138d4163d39..c76071c81b5caf3c64635801af3838e6400ca95c 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -150,16 +150,6 @@
                   'USE_EABI_HARDFLOAT=0',
                 ],
               }],
-              # The ARM assembler assumes the host is 32 bits,
-              # so force building 32-bit host tools.
-              ['host_arch=="x64" or OS=="android"', {
-                'target_conditions': [
-                  ['_toolset=="host"', {
-                    'cflags': ['-m32'],
-                    'ldflags': ['-m32'],
-                  }],
-                ],
-              }],
             ],
           }],
           ['v8_target_arch=="ia32"', {
@@ -218,16 +208,6 @@
               ['mips_arch_variant=="loongson"', {
                 'defines': ['_MIPS_ARCH_LOONGSON',],
               }],
-              # The MIPS assembler assumes the host is 32 bits,
-              # so force building 32-bit host tools.
-              ['host_arch=="x64"', {
-                'target_conditions': [
-                  ['_toolset=="host"', {
-                    'cflags': ['-m32'],
-                    'ldflags': ['-m32'],
-                  }],
-                ],
-              }],
             ],
           }],
           ['v8_target_arch=="x64"', {
@@ -272,10 +252,6 @@
       ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
          or OS=="netbsd"', {
         'conditions': [
-          [ 'target_arch=="ia32"', {
-            'cflags': [ '-m32' ],
-            'ldflags': [ '-m32' ],
-          }],
           [ 'v8_no_strict_aliasing==1', {
             'cflags': [ '-fno-strict-aliasing' ],
           }],
@@ -284,6 +260,29 @@
       ['OS=="solaris"', {
         'defines': [ '__C99FEATURES__=1' ],  # isinf() etc.
       }],
+      ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
+         or OS=="netbsd" or OS=="mac" or OS=="android") and \
+        (v8_target_arch=="arm" or v8_target_arch=="ia32" or \
+         v8_target_arch=="mips")', {
+        # Check whether the host compiler and target compiler support the
+        # '-m32' option and set it if so.
+        'target_conditions': [
+          ['_toolset=="host"', {
+            'variables': {
+ 'm32flag': '<!((echo | $(echo ${CXX_host:-$(which g++)}) -m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)',
+            },
+            'cflags': [ '<(m32flag)' ],
+            'ldflags': [ '<(m32flag)' ],
+          }],
+          ['_toolset=="target"', {
+            'variables': {
+ 'm32flag': '<!((echo | $(echo ${CXX_target:-${CXX:-$(which g++)}}) -m32 -E - > /dev/null 2>&1) && echo -n "-m32" || true)',
+            },
+            'cflags': [ '<(m32flag)' ],
+            'ldflags': [ '<(m32flag)' ],
+          }],
+        ],
+      }],
     ],  # conditions
     'configurations': {
       'Debug': {
Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index b5707800f82e52a5ade5496c8d03572e2ab89774..f104d08c197b4d1ba515541a63a6020bfd1e36d5 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -71,6 +71,10 @@
         'want_separate_host_toolset': 0,
       }],
     ],
+    # Default ARM variable settings.
+    'armv7%': 1,
+    'arm_neon%': 0,
+    'arm_fpu%': 'vfpv3',
   },
   'target_defaults': {
     'default_configuration': 'Debug',


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

Reply via email to