New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 5 users
Status: Fixed
Owner: ----
Closed: Feb 2010
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Restricted
  • Only users with Commit permission may comment.



Sign in to add a comment
fails to build on arm natively with "cc1plus: error: unrecognized command line option "-m32""
Reported by a...@jwsdot.com, Dec 29 2009 Back to list
chromium-browser-4.0.283.0~svn20091226r35283

when using v8_use_snapshot=true it fails to compile natively:

  ACTION js2c_js2c out/Release/obj/gen/libraries.cc
  TOUCH out/Release/obj.host/v8/tools/gyp/js2c.stamp
  CXX(host) out/Release/obj.host/v8_nosnapshot/gen/libraries.o
cc1plus: error: unrecognized command line option "-m32"
make[1]: *** [out/Release/obj.host/v8_nosnapshot/gen/libraries.o] Error 1
make[1]: Leaving directory `/home/asac/Dev/chromium-browser-
4.0.283.0~svn20091226r35283/build-tree/src'
make: *** [debian/stamp-makefile-build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1334:


Seems that -m32 is set if _toolset==host ... but i couldnt find where that 
is set/determined. shouldn't _toolset==target if you build natively?



 
Comment 1 by a...@jwsdot.com, Dec 29 2009
$ uname -a
Linux asac-desktop 2.6.31-105-imx51 #14-Ubuntu Tue Oct 13 21:13:53 UTC 2009 armv7l 
GNU/Linux

Comment 2 by a...@jwsdot.com, Dec 29 2009
$ gcc --version
gcc-4.4.real (Ubuntu 4.4.1-4ubuntu8) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Comment 3 by f...@sofaraway.org, Dec 29 2009
Labels: -Area-Undefined Area-Internals OS-Linux
Comment 4 by f...@sofaraway.org, Dec 29 2009
Status: Untriaged
Comment 5 by joel@chromium.org, Dec 29 2009
v8.gyp contains a number of the following condition blocks that are causing the error:

        # The ARM assembler assumes the host is 32 bits, so force building
        # 32-bit host tools.
        # TODO(piman): This assumes that the host is ia32 or amd64. Fixing the
        # code would be better
        ['target_arch=="arm" and _toolset=="host"', {
          'cflags': ['-m32'],
          'ldflags': ['-m32'],

Comment 6 by a...@jwsdot.com, Jan 2 2010
afaiui, those condition blocks were added for X-compile case. is there a way to 
identify that we are cross compiling? maybe "... and host_arch!="arm" ?
croscompiling is when host != target
Do we want to mark this Upstream and point it to 
http://code.google.com/p/v8/issues/detail?id=539 ? Or does Chromium want to take 
ownership of this bug?
Status: Assigned
We should take ownership. I'll stick a uname -m somewhere to detect the host arch.
Comment 10 by asac...@gmail.com, Jan 8 2010
i thought something like this:

Index: build/common.gypi
===================================================================
--- build/common.gypi	(revision 35439)
+++ build/common.gypi	(working copy)
@@ -44,8 +44,10 @@
           # hosts should pass an explicit target_arch to gyp.
           'target_arch%':
             '<!(uname -m | sed -e
"s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")',
+          'host_arch%': '<(target_arch)',
         }, {  # OS!="linux"
           'target_arch%': 'ia32',
+          'host_arch%': '<(target_arch)',
         }],
       ],
 
@@ -79,6 +81,7 @@
     'branding%': '<(branding)',
     'buildtype%': '<(buildtype)',
     'target_arch%': '<(target_arch)',
+    'host_arch%': '<(host_arch)',
     'toolkit_views%': '<(toolkit_views)',
     'chromeos%': '<(chromeos)',
     'inside_chromium_build%': '<(inside_chromium_build)',


Comment 11 by asac...@gmail.com, Jan 8 2010
hmm. maybe that should be in v8 only/too?
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=35993 

------------------------------------------------------------------------
r35993 | piman@chromium.org | 2010-01-11 20:29:59 -0800 (Mon, 11 Jan 2010) | 5 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?r1=35993&r2=35992

linux: add host_arch detection

BUG= 31274 

Review URL: http://codereview.chromium.org/547019
------------------------------------------------------------------------

The fix has been pushed to v8 but hasn't trickled down yet.
Status: Fixed
This should be fixed.
Project Member Comment 15 by bugdroid1@chromium.org, Oct 12 2012
Labels: Restrict-AddIssueComment-Commit
Owner: ----
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 16 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-Internals Cr-Internals
Sign in to add a comment