cross compiling for arm

35 views
Skip to first unread message

Shyam Jayaraman

unread,
Aug 12, 2015, 4:44:30 PM8/12/15
to mojo...@chromium.org
Is there any support for cross compiling mojo for arm.  I am trying to get the mojo shell and parts to run on a raspberry pi.

Thanks,
Shyam

Adam Barth

unread,
Aug 12, 2015, 5:17:01 PM8/12/15
to Shyam Jayaraman, mojo...@chromium.org
Yes.  If you look in mojob.py you'll see some code that sets the target architecture to arm on Android.  You should be able to build for arm in Linux too if you have an arm toolchain.

Shyam Jayaraman

unread,
Aug 25, 2015, 6:24:36 PM8/25/15
to Adam Barth, mojo...@chromium.org
So I finally got around to trying this and it looks like there are issues trying to build for linux arm because of collisions with ndk support.  Namely I get this error:
ERROR at //native_client/build/config/arm.gni:14:21: Duplicate build argument declaration.
    arm_float_abi = ""
                    ^-
Here you're declaring an argument that was already declared elsewhere.
You can only declare each argument once in the entire build so there is one
canonical place for documentation and the default value. Either move this
argument to the build config file (for visibility everywhere) or to a .gni file
that you "import" from the files where you need it (preferred).
See //build/config/arm.gni:14:21: Previous declaration.
    arm_float_abi = ""


when I try to run ./mojo/tools/mojob.py build --target-cpu=arm

Is there someway that the arm and native client build rules can be set up to make this work?

Thanks,
Shyam

Reply all
Reply to author
Forward
0 new messages