From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [Patch v7 01/10] rustc: new virtual package
Date: Thu, 7 Sep 2017 19:02:03 +0200 [thread overview]
Message-ID: <20170907170203.GA6001@ned> (raw)
In-Reply-To: <804837fe-f89d-175a-129f-6061d9f11b08@mind.be>
Hi!
On 17-08-11 00:34:43, Arnout Vandecappelle wrote:
>
>
> On 23-07-17 10:11, Eric Le Bihan wrote:
> [snip]
> > +RUST_TARGET_NAME := $(subst buildroot,unknown,$(GNU_TARGET_NAME))
>
> GNU_TARGET_NAME is not exactly predictable - in particular, the buildroot bit
> depends on (or may depend on) BR2_TOOLCHAIN_BUILDROOT_VENDOR. So instead, I'd
> build up RUST_TARGET_NAME explicitly as
> $(RUST_ARCH)-unknown-$(TARGET_OS)-$(LIBC)$(RUST_ABI)
>
> As you can see, instead of redefining RUST_TARGET_NAME below, it's also better
> to first define its components and then build it properly.
>
> And finally, does rust work with TARGET_OS == uclinux, LIBC == uclibc/musl, ABI
> == spe/gnueabi/eabihf ?
This looks like a good solution. Rust supports musl, but not uclibc. I
prefered to focus on glibc first. Then later, I'll add musl support.
>
>
> > +
> > +ifeq ($(BR2_ARM_CPU_ARMV7A),y)
> > +RUST_TARGET_NAME := $(subst arm-,armv7-,$(RUST_TARGET_NAME))
> > +endif
> > +
> > +ifeq ($(BR2_mips64)$(BR2_mips64el),y)
> > +RUST_TARGET_NAME := $(subst -gnu,-gnuabi64,$(RUST_TARGET_NAME))
> > +endif
> > +
> > +ifeq ($(HOSTARCH),x86_64)
> > +RUST_HOST_ARCH = x86_64
> > +else ifeq ($(HOSTARCH),x86)
> > +RUST_HOST_ARCH = i686
>
> And in other cases? I guess Config.in somewhere should specify the constraints
> on the host arch as well.
Rust provides rustc binaries for aarch64, arm, armv7, i686/x86, mips,
mipsel, mips64, mips64el powerpc, powerpc64, powerpc64le.
I only handled the x86/x86_64, without thinking about users running
Buildroot on these other architectures. I'll check this.
Anyway, the rust-bin patch modifies package/rustc/Config.in.host to add
$(BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS) which sets:
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> Also, this is better expressed as
>
> ifeq ($(HOSTARCH),x86)
> RUST_HOST_ARCH = i686
> else
> RUST_HOST_ARCH = $(HOSTARCH)
> endif
OK.
Thanks for the review!
next prev parent reply other threads:[~2017-09-07 17:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-23 8:11 [Buildroot] [Patch v7 00/10] Add support for the Rust programming language Eric Le Bihan
2017-07-23 8:11 ` [Buildroot] [Patch v7 01/10] rustc: new virtual package Eric Le Bihan
2017-07-23 13:14 ` Jörg Krause
2017-08-10 22:34 ` Arnout Vandecappelle
2017-09-07 17:02 ` Eric Le Bihan [this message]
2017-07-23 8:11 ` [Buildroot] [Patch v7 02/10] rust-bin: new package Eric Le Bihan
2017-07-23 13:44 ` Jörg Krause
2017-07-23 14:00 ` Jörg Krause
2017-08-10 23:08 ` Arnout Vandecappelle
2017-09-07 18:13 ` Eric Le Bihan
2017-07-23 8:11 ` [Buildroot] [Patch v7 03/10] rustc: expose host variant in menuconfig Eric Le Bihan
2017-08-10 23:09 ` Arnout Vandecappelle
2017-07-23 8:12 ` [Buildroot] [Patch v7 04/10] rust-bootstrap: new package Eric Le Bihan
2017-08-10 23:13 ` Arnout Vandecappelle
2017-09-07 19:33 ` Eric Le Bihan
2017-07-23 8:12 ` [Buildroot] [Patch v7 05/10] cargo-bootstrap: " Eric Le Bihan
2017-07-23 8:12 ` [Buildroot] [Patch v7 06/10] rust: " Eric Le Bihan
2017-08-10 23:38 ` Arnout Vandecappelle
2017-09-07 19:58 ` Eric Le Bihan
2017-07-23 8:12 ` [Buildroot] [Patch v7 07/10] libssh2: add host variant Eric Le Bihan
2017-07-23 8:19 ` Baruch Siach
2017-08-10 23:40 ` Arnout Vandecappelle
2017-07-23 8:12 ` [Buildroot] [Patch v7 08/10] libhttpparser: " Eric Le Bihan
2017-08-10 23:41 ` Arnout Vandecappelle
2017-07-23 8:12 ` [Buildroot] [Patch v7 09/10] libcurl: " Eric Le Bihan
2017-08-10 23:45 ` Arnout Vandecappelle
2017-07-23 8:12 ` [Buildroot] [Patch v7 10/10] cargo: new package Eric Le Bihan
2017-08-10 23:58 ` Arnout Vandecappelle
2017-09-07 20:20 ` Eric Le Bihan
2017-08-10 23:59 ` [Buildroot] [Patch v7 00/10] Add support for the Rust programming language Arnout Vandecappelle
2017-09-07 20:22 ` Eric Le Bihan
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=20170907170203.GA6001@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