Error cross compiling for Tier 3 target armv7-unknown-linux-uclibceabihf

Hi, I'm trying to cross-compile for an armv7 board, toolchain I'm using is provided by SDK. I run into two problems, which I can't find a solution.

  1. EABI mismatch

/root/Code/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf-ld.bfd: error: source object /root/Code/linux-port/app/rustify/target/armv7-unknown-linux-uclibceabihf/debug/deps/rustify-cebc2099e8372536.5luvmfr1u2k9j6o1t6npfwt4d.rcgu.o has EABI version 5, but target /root/Code/linux-port/app/rustify/target/armv7-unknown-linux-uclibceabihf/debug/deps/rustify-cebc2099e8372536 has EABI version 0

Seems like object compile by rustc has EABI version 5, while ld in my toolchain has EABI version 0. I didn't find a way to ask rustc to compile in version 0, so is it possible to do so, or anything else I can do to solve this ?

  1. cc option in config.toml expect a table

Example in The Rustc Book has an example which is a config.toml:

[build]
target = ["armv7-unknown-linux-uclibceabihf"]
stage = 2

[target.armv7-unknown-linux-uclibceabihf]
cc = "/TOOLCHAIN_PATH/bin/arm-buildroot-linux-uclibcgnueabihf-gcc"

However, when I try to use this config.toml, error occurred:

expected a table, but found a string for target.armv7-unknown-linux-uclibceabihf.cc

I think this doesn't working any more because the input for "cc" option has change. Again I can't find any information about the different fields under "cc", which I suppose to provide.

Any infomation is helpful, thanks.

That is for building rustc itself with support for this target. For actually using the built toolchain you did put something like the following in .cargo/config.toml:

[target.armv7-unknown-linux-uclibceabihf]
linker = "/TOOLCHAIN_PATH/bin/arm-buildroot-linux-uclibcgnueabihf-gcc"

This error I can't help you with.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.