<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 2 May 2016, at 18:42, Joseph Bell <<a href="mailto:joe@iachieved.it" class="">joe@iachieved.it</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Karl,<div class=""><br class=""></div><div class="">A number of us are on Slack working with ARM support - would you like an invite?</div><div class=""><br class=""></div><div class="">Joe</div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>Hi, <div class=""><br class=""></div><div class="">yes that would nice.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">So I need to look at how the compiler uses -resource-dir what’s going on with SwiftShims.</div></div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><div class="gmail_quote"><div style="word-wrap:break-word" class=""><div class=""><div class="">My changes are here: <a href="https://github.com/karwa/swift" target="_blank" class="">https://github.com/karwa/swift</a></div></div><div class=""><br class=""></div><div class="">Then I’m building with:</div><div class=""><br class=""></div><div class=""><div class="">../swift/utils/build-script -d \</div><div class=""><span style="white-space:pre-wrap" class="">        </span>--install-prefix="/usr" \</div><div class=""><span style="white-space:pre-wrap" class="">        </span>--install-symroot="${cc_files}/out/symroot" \</div><div class=""><span style="white-space:pre-wrap" class="">        </span>-- \</div><div class=""><span style="white-space:pre-wrap" class="">        </span>--cross-compile-tools-deployment-targets=linux-armv7 \</div><div class=""><span style="white-space:pre-wrap" class="">        </span>--cross-compile-sysroot="${sysroot}" \</div><div class=""><span style="white-space:pre-wrap" class="">        </span>--cross-compile-toolchain-bin="${toolchain}"</div><div class=""><span style="white-space:pre-wrap" class="">        </span>--stdlib-deployment-targets="macosx-x86_64;linux-armv7=linux-armv7”</div></div></div></div></div></div></blockquote><br class=""></div></div><div>Explanation on the flags, process:</div><div><br class=""></div><div>${cc_files} = the place where I stick the cross-compile resources. Somewhere the stick the output package later.</div><div><br class=""></div><div>${toolchain}:</div><div><br class=""></div><div>Built from: <a href="https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major" class="">https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major</a></div><div>Edit install_toolchain.sh and add “--enable-gold” to the binutils flags</div><div>Also in install_common.sh, charged TARGET to "arm-linux-eabi”, but not sure that’s necessary.</div><div><br class=""></div><div>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"</div><div class=""><br class=""></div><div class="">${sysroot}:</div><div class=""><br class=""></div><div class="">Created using this script: <a href="https://gist.github.com/karwa/c73f9fd2768c96f6871be4aae152b264" class="">https://gist.github.com/karwa/c73f9fd2768c96f6871be4aae152b264</a></div><div class=""><div class=""><br class=""></div><div class="">./make_sysroot.py --distro debian --version jessie --arch armhf --install sysroot.armhf.debian.jessie</div></div></body></html>