| 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
,
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.
,
Dec 29 2009
,
Dec 29 2009
,
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'],
,
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" ?
,
Jan 4 2010
croscompiling is when host != target
,
Jan 8 2010
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?
,
Jan 8 2010
We should take ownership. I'll stick a uname -m somewhere to detect the host arch.
,
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)',
,
Jan 8 2010
hmm. maybe that should be in v8 only/too?
,
Jan 12 2010
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
------------------------------------------------------------------------
,
Jan 13 2010
The fix has been pushed to v8 but hasn't trickled down yet.
,
Feb 10 2010
This should be fixed.
,
Oct 12 2012
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.
,
Mar 10 2013
|
|||||||
| ► Sign in to add a comment | |||||||