It works fine for mips target with CodeSourcery toolchain, but it failed to
build V8 with ubuntu's default gcc (4.4.3-4ubuntu5.1) for mips simulator,
because gcc returns misleading return value (please look at my in-line
comments).


https://chromiumcodereview.appspot.com/10268010/diff/1/build/common.gypi
File build/common.gypi (right):

https://chromiumcodereview.appspot.com/10268010/diff/1/build/common.gypi#newcode177
build/common.gypi:177: 'mipscompiler': '<!((echo | $(echo ${CXX:-$(which
g++)}) -EL -E - > /dev/null 2>&1) && echo -n "yes" || echo -n "no")',
This command:
echo | $(echo ${CXX:-$(which g++)}) -EL -E -
always returns 0 on my system, even if gcc doesn't support mips target.
My suggestion is to use -march=mips32r3 instead of -EL .
So the actual command would be:
(echo | $(echo ${CXX:-$(which g++)}) -march=mips32r2 -E - > /dev/null
2>&1) && echo -n "yes" || echo -n "no")

https://chromiumcodereview.appspot.com/10268010/

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

Reply via email to