ErikNatanael Thanks for the post, I've been using this method to write most of my project in Rust.
l0calh05t Recently, I was also able to set up full cross compilation using xcBela. One tweak I made to xcBela was using llvm14 toolchain to match rust's llvm version. I also used gpp/cpp9 etc., instead of gpp5 since I'm running ubuntu 20 (through wsl).
Everything is working until I try to do lto using the -flto flag. Here is the modified xcCompile command (note the flags from the first export can all be excluded though I don't know what effect most of them have):
...snip
export BELA_C_OPTS="-DXENOMAI_SKIN_posix -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard -mfpu=neon -ftree-vectorize -ffast-math -O3 -fPIC "
export BELA_C_OPTS="-flto ${BELA_C_OPTS} "
export BELA_C_OPTS=" \
-I${XC_SYSROOT}/root/Bela \
-I${XC_SYSROOT}/root/Bela/include \
-I${XC_SYSROOT}/usr/xenomai/include \
${BELA_C_OPTS} \
...snip
With these modifications I get this error (note that the "no such file or directory" on the first line happens even without -flto but I haven't looked into it since it doesn't seem to matter):
realpath: /home/jacob/xcBela/Bela/Core/default_main.cpp: No such file or directory
...snip
/usr/bin/arm-linux-gnueabihf-ld: BFD (GNU Binutils for Ubuntu) 2.34 internal error, aborting at .../bfd/elfcode.h:224 in bfd_elf32_swap_symbol_out
/usr/bin/arm-linux-gnueabihf-ld: Please report this bug.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Also important to note that when it comes to c/c++ compilation/linking most of that knowledge has atrophied from my brain.
Any ideas? If anyone has any questions about getting xcBela working I can give more details.