Perhaps this has been discussed a lot already, but I'm a bit lost as to the current state of cross-compiling Swift source code from x86_64 Linux to ARM Linux. Given the documentation for cross-compiling for Android, it seems that there is some cross-compiling support, but I'm not sure how I should go about making it not Android specific.
To be more concrete, I would like to experiment with Swift for the FIRST Robotics Competition, which uses ARM Cortex A9, running Real-Time Linux. For now, a reasonable intermediate goal seems like figuring out cross-compiling to a Raspberry Pi, which has already seen some attention from the Swift community.
So, it would be awesome if anyone can point me in the right direction!
I don’t know if anybody else is, but I’m working on cross-compiling the entire toolchain for the RPi. Currently I’m able to compile clang, swift, the standard library, llbuild and lldb (although lldb doesn’t seem to be able to find any symbols right now, so it can pause and step through processes, but can’t set breakpoints or start the REPL — it’s a work in progress).
See my mail to swift-dev: http://comments.gmane.org/gmane.comp.lang.swift.devel/1966
Note that initially my target triple was wrong; you should make binutils for "arm-linux-gnueabihf”, and you should edit “build_toolchain.sh” and “build_common.sh”, not install_toolchain and install_common (they don’t exist anyway).
I’ve been doing it from a Mac, but I’d love to hear if you can replicate it from linux.
Karl
···
On 11 May 2016, at 20:41, Donald Pinckney via swift-users <swift-users@swift.org> wrote:
Hi all,
Perhaps this has been discussed a lot already, but I'm a bit lost as to the current state of cross-compiling Swift source code from x86_64 Linux to ARM Linux. Given the documentation for cross-compiling for Android, it seems that there is some cross-compiling support, but I'm not sure how I should go about making it not Android specific.
To be more concrete, I would like to experiment with Swift for the FIRST Robotics Competition, which uses ARM Cortex A9, running Real-Time Linux. For now, a reasonable intermediate goal seems like figuring out cross-compiling to a Raspberry Pi, which has already seen some attention from the Swift community.
So, it would be awesome if anyone can point me in the right direction!