From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] "PATCH": hack to be able to build Rust targetting MIPS
Date: Sun, 19 Jan 2020 22:31:02 +0100 [thread overview]
Message-ID: <20200119213102.GA2894@ned> (raw)
In-Reply-To: <CAPAYC_y98TxMoBtG=P9hDe26=1rHfaoMyoH5NJyLHbRxcxpMAQ@mail.gmail.com>
Hi!
On 2020-01-18 19:46, Alex Corcoles wrote:
> Hi guys,
>
> I'm trying to build mipsel Rust stuff, and I've had to do this:
[...]
>
> HOST_RUST_POST_EXTRACT_HOOKS += HOST_RUST_EXCLUDE_ORIG_FILES
>
> +RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-gnu$(RUSTC_ABI)
> +
[...]
> To advance things up (I'm currently compiling LLVM, apparently), as
> otherwise the config.toml created is wrong. I'm attaching the .config I'm
> using (I'm using the non-pre-built host rust- the pre-built one apparently
> doesn't have std).
>
> I certainly doubt what I'm doing is "correct", but maybe you guys want to
> take a look at it.
The RUSTC_TARGET_NAME variable is defined in rustc.mk only if the symbol
BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS is selected. This symbols is
used to ensure all the conditions to build a rust package are met. One
of them is that the toolchain is glibc-based. This is required, because
the standard library provided by the pre-built host Rust toolchain is
built against glibc.
In your defconfig, the toolchain is uclibc-based and the host Rust
toolchain is built from source.
Hence BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS is not defined and so
is RUSTC_TARGET_NAME.
So there is a bug: the restriction on having a glibc-based toolchain
should apply either when using a pre-built rust toolchain or building
one from source. I'll see how to fix it.
The list of supported platforms [1] mentions GNU glibc and musl, but not
uclibc. Does the build with your defconfig and patch successful?
[1] https://forge.rust-lang.org/release/platform-support.html
Regards,
--
ELB
next prev parent reply other threads:[~2020-01-19 21:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAPAYC_xPtDO=j3fWeOEbC41X3PXJZ+7AD=WRm8A1DGQrtbadFQ@mail.gmail.com>
2020-01-18 18:46 ` [Buildroot] "PATCH": hack to be able to build Rust targetting MIPS Alex Corcoles
2020-01-18 19:58 ` Alex Corcoles
2020-01-18 21:27 ` Yann E. MORIN
2020-01-19 19:40 ` Alex Corcoles
2020-01-19 21:31 ` Eric Le Bihan [this message]
2020-01-20 16:31 ` Alex Corcoles
2020-02-03 17:08 ` Alex Corcoles
2020-02-03 17:14 ` [Buildroot] Fwd: " Alex Corcoles
2020-02-05 17:21 ` [Buildroot] " Alex Corcoles
2020-02-06 17:18 ` Alex Corcoles
2020-02-06 17:50 ` Vincent Fazio
2020-02-06 18:00 ` Alex Corcoles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200119213102.GA2894@ned \
--to=eric.le.bihan.dev@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox