> On 2 May 2016, at 18:42, Joseph Bell <j...@iachieved.it> wrote:
> 
> Karl,
> 
> A number of us are on Slack working with ARM support - would you like an 
> invite?
> 
> Joe
> 

Hi, 

yes that would nice.

The modulemap issue can be fixed by adding a -resource-dir flag. Going with a 
comment in AddSwift.cmake, I switched the include fag to the library output 
directory to "-resource-dir”, but then SwiftShims wouldn’t build. So I changed 
the flag back to a standard include and make it *also* specify “-resource-dir” 
on cross-compile (so the cross command has both -I and -resource-dir). Now the 
native host builds, but the cross-compiled stdlib won’t because of the same 
SwiftShims issue.

So I need to look at how the compiler uses -resource-dir what’s going on with 
SwiftShims.

> My changes are here: https://github.com/karwa/swift 
> <https://github.com/karwa/swift>
> 
> Then I’m building with:
> 
> ../swift/utils/build-script -d \
>       --install-prefix="/usr" \
>       --install-symroot="${cc_files}/out/symroot" \
>       -- \
>       --cross-compile-tools-deployment-targets=linux-armv7 \
>       --cross-compile-sysroot="${sysroot}" \
>       --cross-compile-toolchain-bin="${toolchain}"
>       --stdlib-deployment-targets="macosx-x86_64;linux-armv7=linux-armv7”

Explanation on the flags, process:

${cc_files} = the place where I stick the cross-compile resources. Somewhere 
the stick the output package later.

${toolchain}:

Built from: https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major
Edit install_toolchain.sh and add “--enable-gold” to the binutils flags
Also in install_common.sh, charged TARGET to "arm-linux-eabi”, but not sure 
that’s necessary.

Give the path to the unprefixed versions of the tools, e.g: 
"${cc_files}/toolchain/gcc-arm-none-eabi-5_2-2015q4/install-native/arm-linux-eabi/bin"

${sysroot}:

Created using this script: 
https://gist.github.com/karwa/c73f9fd2768c96f6871be4aae152b264 
<https://gist.github.com/karwa/c73f9fd2768c96f6871be4aae152b264>

./make_sysroot.py --distro debian --version jessie --arch armhf --install 
sysroot.armhf.debian.jessie
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to