[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

rustc on armel


Just as a heads-up: rustc should work on armel in general as the compiler
suppors the armv5te-unknown-linux-gnu target which is exactly the baseline
that Debian's armel port now uses.

I haven't been able to bootstrap rustc for armel yet, because I ran into
two issues which need to be resolved first.

The first one was that with rustc_1.24 the CROSS_COMPILE target was not
properly set and rustc tried to compile ARM code with just the "cc"
command instead of invoking "arm-linux-gnueabi-cc". This is normally
done by the cc-rs crate which has a mapping for target and GNU triplet.

I could workaround this issue by setting CROSS_COMPILE to "arm-linux-gnueabi-"
as an environment variable. I also noticed that the problem didn't exist
with rustc from git master. It might also just be an artifact, but it
seemed reproducible. I will try with a freshly unpacked rustc_1.24
source tree later.

And, secondly, there is the problem that the compiler builtins for
atomics on armv5te are defined twice: One definition comes from
libcompiler_builtin in rustc and the other one comes from gcc. This
results in the linker complaining about symbols like __sync_synchronize
being defined twice. I have filed an upstream issue for that [1].

If anyone is interested working on that, let me know.


[1] https://github.com/rust-lang/rust/issues/48625

 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply to: