[Buildroot] [PATCH 1/1] rust: make sure the cxx compiler is also set for the target

Charles Hardin charles.hardin at storagecraft.com
Sun Apr 1 23:00:58 UTC 2018


Yeah - for “upstream” drop the HOST - TARGET thing that is a problem for
us - I think…

The def config was basically this… but, it doesn’t show an error - i just read
the logs of the build.

BR2_x86_64=y
BR2_x86_core_avx2=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9=y
BR2_GCC_VERSION_7_X=y
BR2_GCC_ENABLE_LTO=y
BR2_GCC_ENABLE_LIBMUDFLAP=y
BR2_ENABLE_LOCALE_PURGE=y
BR2_LINUX_KERNEL=n
BR2_KERNEL_HEADERS_4_9=y
BR2_INIT_NONE=y
BR2_PACKAGE_HOST_GO=y
BR2_PACKAGE_HOST_RUST=y
BR2_PACKAGE_HOST_RUSTC=y
BR2_PACKAGE_HOST_CARGO=y

To basically just build a toolchain.

On Apr 1, 2018, at 3:57 PM, Thomas Petazzoni <thomas.petazzoni at bootlin.com<mailto:thomas.petazzoni at bootlin.com>> wrote:

Hello,

Thanks for the quick feedback!

On Sun, 1 Apr 2018 22:52:42 +0000, Charles Hardin wrote:
We have a problem where we build on a HOST with x86_64 and RUST
doesn’t realize the difference between the host tool chain and the buildroot
toolchain.

In the old days - we had to patch rust to make a “x86_64-buildroot-linux-gnu”
target that would be recognized, but the latest patches removed that around
rust 1.9 or so.

This was literally just looking at the logs and seeing the “cc” was the buildroot
cc and the the cxx was “c++”, so it is just what we hacked together to get
things to work.

But - definitely need to set “cxx” in some appropriate fashion for rust to get
compiled correctly.

Setting cxx looks definitely OK in your patch. It's the
RUSTC_HOST_NAME != RUSTC_TARGET_NAME that looks wrong.

Could you provide some specific examples (with defconfigs to reproduce)
for the two problems:

- Lack of cxx variable

- Case of RUSTC_HOST_NAME == RUSTC_TARGET_NAME

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180401/807488c4/attachment.html>


More information about the buildroot mailing list