Skip to contentSkip to conversation

Add support for more rust platforms

PATCH New Thomas Petazzoni 2 participants 5 messages May 18, 2021

lore
Share & tools
lore
#0 lore raw

cover Add support for more rust platforms

Hello,

This (small) patch series started from the patch from Nathaniel Husted enabling support for musl-based platforms in our Rust packaging.

Unfortunately, the patch from Nathaniel was not entirely correct:
indeed, not all CPU architectures have musl support in Rust, so simply replacing "depends on glibc" by "depends on glibc || musl" was not sufficient.

Instead, Rust has a classification of platforms by how well they are
supported: Tier 1 platforms, Tier 2 platforms with host tools, Tier 2 platforms without host tools, Tier 3 platforms.

In order to make it easier to keep track of which platforms are supported, this patch series rewrites how package/rustc/Config.in.host declares which platforms are supported, to map directly with the Tier 1, Tier 2 with host tools and Tier 2 without host tools platforms.

For the sake of simplicity, Tier 3 platforms are not supported at this point.

With this patch series, 3 new glibc-based platforms are supported, and 13 new musl-based platforms are supported.

The series is also available at:

https://github.com/tpetazzoni/buildroot/commits/rustc-arches

Thanks!

Thomas

Nathaniel Husted (1):
package/rustc: prepare for musl-based platforms support

Thomas Petazzoni (1):
package/rustc: add support for Tier 1 and Tier 2 platforms

 package/rust-bin/rust-bin.hash |  48 +++++++++++++++
 package/rustc/Config.in.host   | 104 +++++++++++++++++++++++++++++----
 package/rustc/rustc.mk         |   2 +-
 3 files changed, 141 insertions(+), 13 deletions(-)
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/2 package/rustc: prepare for musl-based platforms support

From: Nathaniel Husted <[email protected]>

The current rustc package only supports configurations based on glibc and hardcodes this requirement. This patch prepares the addition of support for musl-based platforms by using $(LIBC) instead of hardcoding "gnu" as the C library specifier when defining RUSTC_TARGET_NAME.

---
 package/rustc/rustc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/rustc/rustc.mk +1 -1
index 35ffc36106..52860b7eff 100644
@@ -8,7 +8,7 @@ RUSTC_ARCH = $(call qstrip,$(BR2_PACKAGE_HOST_RUSTC_ARCH))
 RUSTC_ABI = $(call qstrip,$(BR2_PACKAGE_HOST_RUSTC_ABI))
 
 ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
-RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-gnu$(RUSTC_ABI)
+RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-$(LIBC)$(RUSTC_ABI)
 endif
 
 ifeq ($(HOSTARCH),x86)
Signature · 1 line
2.31.1
#2 lore raw

PATCH 1/2 package/rustc: prepare for musl-based platforms support

Nathaniel, Thomas, All,

On 2021-05-18 22:54 +0200, Thomas Petazzoni spake thusly:

Quoted 10 lines

From: Nathaniel Husted <[email protected]>

The current rustc package only supports configurations based on glibc and hardcodes this requirement. This patch prepares the addition of support for musl-based platforms by using $(LIBC) instead of hardcoding "gnu" as the C library specifier when defining RUSTC_TARGET_NAME.

This first patch: Applied to next, thanks.

Regards,
Yann E. MORIN.

Quoted 24 lines
---
 package/rustc/rustc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/rustc/rustc.mk +1 -1
index 35ffc36106..52860b7eff 100644
@@ -8,7 +8,7 @@ RUSTC_ARCH = $(call qstrip,$(BR2_PACKAGE_HOST_RUSTC_ARCH))
 RUSTC_ABI = $(call qstrip,$(BR2_PACKAGE_HOST_RUSTC_ABI))
 
 ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
-RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-gnu$(RUSTC_ABI)
+RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-$(LIBC)$(RUSTC_ABI)
 endif
 
 ifeq ($(HOSTARCH),x86)
Signature · 6 lines
2.31.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 2/2 package/rustc: add support for Tier 1 and Tier 2 platforms

In reply to Thomas Petazzoni

This commit reworks how BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS is defined to more clearly map with the list of platforms supported by Rust as listed at
https://doc.rust-lang.org/nightly/rustc/platform-support.html. Indeed, the situation is not as simple as a list of architectures, all supported for both glibc and musl.

So instead, we take the approach of directly mapping with what's described at
https://doc.rust-lang.org/nightly/rustc/platform-support.html, which means:

* A list of Tier 1 platforms (in fact just 3 platforms)

* A list of Tier 2 platforms with host tools (i.e where rustc and cargo themselves are available for the target, something that isn't relevant for Buildroot)

* A list of Tier 2 platforms with no host tools support.

For each platform, we add as a comment its Rust tuple name, as listed at https://doc.rust-lang.org/nightly/rustc/platform-support.html, and then the corresponding Buildroot architecture/libc dependency.

This is obviously more verbose than it was, but it is also a lot easier to maintain.

With this, a total of 16 new platforms are supported, 13 of which are musl-based. The additional non-musl platforms are ARMv5TE, RISC-V 64-bit and Sparc64.

---
 package/rust-bin/rust-bin.hash |  48 +++++++++++++++
 package/rustc/Config.in.host   | 104 +++++++++++++++++++++++++++++----
 2 files changed, 140 insertions(+), 12 deletions(-)
package/rust-bin/rust-bin.hash +48 -0
index 0800dcca97..f7fb983813 100644
@@ -7,33 +7,72 @@ sha256  d440cb932bbaaf43b600bd47b2dd4a05bc669a74d88addeeb943d694638d8e6e  rust-1
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-aarch64-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-aarch64-unknown-linux-gnu.tar.xz.asc
 sha256  3720d98988302bc1f676cef2ea3b2a641404cbbe2d47d0f28f8954658586aa12  rust-std-1.52.0-aarch64-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-aarch64-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-aarch64-unknown-linux-musl.tar.xz.asc
+sha256 153d4a56264b3c38187c566ebdc3dee2e7573cad87b7c68b7e5c52d0c5ad056a  rust-std-1.52.0-aarch64-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-gnueabi.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-gnueabi.tar.xz.asc
 sha256  593ec073c273028f60cf49d6084ee1809e075682f3e65f9cc86067f84f71d5f7  rust-std-1.52.0-arm-unknown-linux-gnueabi.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-gnueabihf.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-gnueabihf.tar.xz.asc
 sha256  c251bf48962ff8f96e3572cecee12b1b3286477e66cb9c42c1fbe0118d6bdaf5  rust-std-1.52.0-arm-unknown-linux-gnueabihf.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-musleabihf.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-musleabihf.tar.xz.asc
+sha256 236944c4ce5dfdc16471b2bc7dc45dfc04f97528a403851ef210fffa55d36434  rust-std-1.52.0-arm-unknown-linux-musleabihf.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-musleabi.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-musleabi.tar.xz.asc
+sha256 73d99f322c9a86219205aa6bb871a0f3e52c605c2d16a6821188ff90423073ec  rust-std-1.52.0-arm-unknown-linux-musleabi.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-armv5te-unknown-linux-gnueabi.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv5te-unknown-linux-gnueabi.tar.xz.asc
+sha256 fbe790020b1178aeb0be213ceabff9aa4542448685b3bc7a70f87edae200d1ae  rust-std-1.52.0-armv5te-unknown-linux-gnueabi.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-armv5te-unknown-linux-musleabi.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv5te-unknown-linux-musleabi.tar.xz.asc
+sha256 7c3f989962ab7d0cf841f1d5c597db3cb14d9f09427ab9ff35a26248cd3b3e01  rust-std-1.52.0-armv5te-unknown-linux-musleabi.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz.asc
 sha256  c28c6870b9717c6c2e2015a6a5581ccb130f9d393db8166da4513680fe03d4ea  rust-std-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-musleabihf.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-musleabihf.tar.xz.asc
+sha256 d483aad358c480d1593ebf6d9605bf012125670823fa7d895f528a2b4e0f5092  rust-std-1.52.0-armv7-unknown-linux-musleabihf.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-musleabi.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-musleabi.tar.xz.asc
+sha256 0a51992109c837a93d77a57edbbd3d25badca68b354a9fe4a77c354baff1559a  rust-std-1.52.0-armv7-unknown-linux-musleabi.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-i586-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-i586-unknown-linux-gnu.tar.xz.asc
 sha256  f4d094e1cd73372f1565473b072e22278afeb2b728a178e6e9f1c813a9b76c23  rust-std-1.52.0-i586-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-i586-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-i586-unknown-linux-musl.tar.xz.asc
+sha256 f364545baba647ce8b5e50b362303885bf5df47a9a285360d8c10a5948a36617  rust-std-1.52.0-i586-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-i686-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-i686-unknown-linux-gnu.tar.xz.asc
 sha256  54749b579a8426dd46afe67feb3c206b0b129e59873a443dcd93ed51232a37d6  rust-std-1.52.0-i686-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-i686-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-i686-unknown-linux-musl.tar.xz.asc
+sha256 517a5a714b696313dc2713b41482ff17034bf1755df859a8c99943932e903079  rust-std-1.52.0-i686-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-mips-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips-unknown-linux-gnu.tar.xz.asc
 sha256  51492598343e5490c620fd04a16c3f41e2fe9f52232dc67fc1bc937233a2e85d  rust-std-1.52.0-mips-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-mips-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips-unknown-linux-musl.tar.xz.asc
+sha256 bec4d58999205aae3224d01e29b8cf74c7899e034444684620d6e7613916de0d  rust-std-1.52.0-mips-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-mips64-unknown-linux-gnuabi64.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips64-unknown-linux-gnuabi64.tar.xz.asc
 sha256  8db8fac92466389629055d590ca06b7ef1c82621f05cba709413f2ce2c3c5407  rust-std-1.52.0-mips64-unknown-linux-gnuabi64.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-mips64-unknown-linux-muslabi64.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips64-unknown-linux-muslabi64.tar.xz.asc
+sha256 43daa71ac3f7b86f98d8e5a4ee81bf0f4979ad33fc5a8e3f9f8604cacaa0ae14  rust-std-1.52.0-mips64-unknown-linux-muslabi64.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-mips64el-unknown-linux-gnuabi64.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips64el-unknown-linux-gnuabi64.tar.xz.asc
 sha256  824391b79c9b28be7a18feab1adb0eed1a9459667e93572fc8b343985ca965ba  rust-std-1.52.0-mips64el-unknown-linux-gnuabi64.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-mips64el-unknown-linux-muslabi64.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips64el-unknown-linux-muslabi64.tar.xz.asc
+sha256 84e9948c8d850dc1c76e146de0f577be7a4d2a8e9b42fee43b05d88237e37c82  rust-std-1.52.0-mips64el-unknown-linux-muslabi64.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-mipsel-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mipsel-unknown-linux-gnu.tar.xz.asc
 sha256  a6de773dfcdc8cac832ac6c356e2c0ecfd94fd7f7242aac82f8922f5bd1639e9  rust-std-1.52.0-mipsel-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-mipsel-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mipsel-unknown-linux-musl.tar.xz.asc
+sha256 724df483aaf0797e30844715c537be9257074355201e92c992d12b2376d1b0ce  rust-std-1.52.0-mipsel-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-powerpc-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-powerpc-unknown-linux-gnu.tar.xz.asc
 sha256  2ad7e17bcb8f632eb4206294ab977bbe1b7562009a3ca84a8d753ff454b1ee07  rust-std-1.52.0-powerpc-unknown-linux-gnu.tar.xz
@@ -43,9 +82,18 @@ sha256  a792384afe034322b4b430049f57ed5e5fe9efbcf74c13c3edaf04062392727a  rust-s
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz.asc
 sha256  af5256a5f1cb189415b0d6b3e349312bbe8a78331a817c8da79ccfe9a07c0aed  rust-std-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-riscv64gc-unknown-linux-gnu.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-riscv64gc-unknown-linux-gnu.tar.xz.asc
+sha256 573d8681cfc0ce71e735254ac33bfca7644fd4251699781b16dd18633a8e92ad  rust-std-1.52.0-riscv64gc-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-sparc64-unknown-linux-gnu.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-sparc64-unknown-linux-gnu.tar.xz.asc
+sha256 0320e71a4c010295968b7ba05e68550b97c6b42520e72f1a534b0135c966cc99  rust-std-1.52.0-sparc64-unknown-linux-gnu.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-x86_64-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-x86_64-unknown-linux-gnu.tar.xz.asc
 sha256  dcdc0083facd6484527494ee5b8f72e040a095ab346bb658ce176be573d5c9b4  rust-std-1.52.0-x86_64-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-x86_64-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-x86_64-unknown-linux-musl.tar.xz.asc
+sha256 d5809f3f1345a3c524f00cfa2ac1631b494a6de3143b1a3d081476f2c4f78905  rust-std-1.52.0-x86_64-unknown-linux-musl.tar.xz
 # Locally generated
 sha256  62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a  LICENSE-APACHE
 sha256  23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3  LICENSE-MIT
package/rustc/Config.in.host +92 -12

113 lines not on this page · raw message

Signature · 1 line
2.31.1
#4 lore raw

PATCH 2/2 package/rustc: add support for Tier 1 and Tier 2 platforms

Thomas, All,

On 2021-05-18 22:54 +0200, Thomas Petazzoni spake thusly:

Quoted 24 lines

This commit reworks how BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS is defined to more clearly map with the list of platforms supported by Rust as listed at
https://doc.rust-lang.org/nightly/rustc/platform-support.html. Indeed, the situation is not as simple as a list of architectures, all supported for both glibc and musl.

So instead, we take the approach of directly mapping with what's described at
https://doc.rust-lang.org/nightly/rustc/platform-support.html, which means:

* A list of Tier 1 platforms (in fact just 3 platforms)

* A list of Tier 2 platforms with host tools (i.e where rustc and cargo themselves are available for the target, something that isn't relevant for Buildroot)

* A list of Tier 2 platforms with no host tools support.

For each platform, we add as a comment its Rust tuple name, as listed at https://doc.rust-lang.org/nightly/rustc/platform-support.html, and then the corresponding Buildroot architecture/libc dependency.

Quoted 8 lines

This is obviously more verbose than it was, but it is also a lot easier to maintain.

With this, a total of 16 new platforms are supported, 13 of which are musl-based. The additional non-musl platforms are ARMv5TE, RISC-V 64-bit and Sparc64.

Applied to next, thanks.

Regards,
Yann E. MORIN.

Quoted 226 lines
---
 package/rust-bin/rust-bin.hash |  48 +++++++++++++++
 package/rustc/Config.in.host   | 104 +++++++++++++++++++++++++++++----
 2 files changed, 140 insertions(+), 12 deletions(-)
package/rust-bin/rust-bin.hash +48 -0
index 0800dcca97..f7fb983813 100644
@@ -7,33 +7,72 @@ sha256  d440cb932bbaaf43b600bd47b2dd4a05bc669a74d88addeeb943d694638d8e6e  rust-1
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-aarch64-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-aarch64-unknown-linux-gnu.tar.xz.asc
 sha256  3720d98988302bc1f676cef2ea3b2a641404cbbe2d47d0f28f8954658586aa12  rust-std-1.52.0-aarch64-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-aarch64-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-aarch64-unknown-linux-musl.tar.xz.asc
+sha256 153d4a56264b3c38187c566ebdc3dee2e7573cad87b7c68b7e5c52d0c5ad056a  rust-std-1.52.0-aarch64-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-gnueabi.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-gnueabi.tar.xz.asc
 sha256  593ec073c273028f60cf49d6084ee1809e075682f3e65f9cc86067f84f71d5f7  rust-std-1.52.0-arm-unknown-linux-gnueabi.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-gnueabihf.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-gnueabihf.tar.xz.asc
 sha256  c251bf48962ff8f96e3572cecee12b1b3286477e66cb9c42c1fbe0118d6bdaf5  rust-std-1.52.0-arm-unknown-linux-gnueabihf.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-musleabihf.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-musleabihf.tar.xz.asc
+sha256 236944c4ce5dfdc16471b2bc7dc45dfc04f97528a403851ef210fffa55d36434  rust-std-1.52.0-arm-unknown-linux-musleabihf.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-musleabi.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-arm-unknown-linux-musleabi.tar.xz.asc
+sha256 73d99f322c9a86219205aa6bb871a0f3e52c605c2d16a6821188ff90423073ec  rust-std-1.52.0-arm-unknown-linux-musleabi.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-armv5te-unknown-linux-gnueabi.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv5te-unknown-linux-gnueabi.tar.xz.asc
+sha256 fbe790020b1178aeb0be213ceabff9aa4542448685b3bc7a70f87edae200d1ae  rust-std-1.52.0-armv5te-unknown-linux-gnueabi.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-armv5te-unknown-linux-musleabi.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv5te-unknown-linux-musleabi.tar.xz.asc
+sha256 7c3f989962ab7d0cf841f1d5c597db3cb14d9f09427ab9ff35a26248cd3b3e01  rust-std-1.52.0-armv5te-unknown-linux-musleabi.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz.asc
 sha256  c28c6870b9717c6c2e2015a6a5581ccb130f9d393db8166da4513680fe03d4ea  rust-std-1.52.0-armv7-unknown-linux-gnueabihf.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-musleabihf.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-musleabihf.tar.xz.asc
+sha256 d483aad358c480d1593ebf6d9605bf012125670823fa7d895f528a2b4e0f5092  rust-std-1.52.0-armv7-unknown-linux-musleabihf.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-musleabi.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-armv7-unknown-linux-musleabi.tar.xz.asc
+sha256 0a51992109c837a93d77a57edbbd3d25badca68b354a9fe4a77c354baff1559a  rust-std-1.52.0-armv7-unknown-linux-musleabi.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-i586-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-i586-unknown-linux-gnu.tar.xz.asc
 sha256  f4d094e1cd73372f1565473b072e22278afeb2b728a178e6e9f1c813a9b76c23  rust-std-1.52.0-i586-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-i586-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-i586-unknown-linux-musl.tar.xz.asc
+sha256 f364545baba647ce8b5e50b362303885bf5df47a9a285360d8c10a5948a36617  rust-std-1.52.0-i586-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-i686-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-i686-unknown-linux-gnu.tar.xz.asc
 sha256  54749b579a8426dd46afe67feb3c206b0b129e59873a443dcd93ed51232a37d6  rust-std-1.52.0-i686-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-i686-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-i686-unknown-linux-musl.tar.xz.asc
+sha256 517a5a714b696313dc2713b41482ff17034bf1755df859a8c99943932e903079  rust-std-1.52.0-i686-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-mips-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips-unknown-linux-gnu.tar.xz.asc
 sha256  51492598343e5490c620fd04a16c3f41e2fe9f52232dc67fc1bc937233a2e85d  rust-std-1.52.0-mips-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-mips-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips-unknown-linux-musl.tar.xz.asc
+sha256 bec4d58999205aae3224d01e29b8cf74c7899e034444684620d6e7613916de0d  rust-std-1.52.0-mips-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-mips64-unknown-linux-gnuabi64.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips64-unknown-linux-gnuabi64.tar.xz.asc
 sha256  8db8fac92466389629055d590ca06b7ef1c82621f05cba709413f2ce2c3c5407  rust-std-1.52.0-mips64-unknown-linux-gnuabi64.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-mips64-unknown-linux-muslabi64.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips64-unknown-linux-muslabi64.tar.xz.asc
+sha256 43daa71ac3f7b86f98d8e5a4ee81bf0f4979ad33fc5a8e3f9f8604cacaa0ae14  rust-std-1.52.0-mips64-unknown-linux-muslabi64.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-mips64el-unknown-linux-gnuabi64.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips64el-unknown-linux-gnuabi64.tar.xz.asc
 sha256  824391b79c9b28be7a18feab1adb0eed1a9459667e93572fc8b343985ca965ba  rust-std-1.52.0-mips64el-unknown-linux-gnuabi64.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-mips64el-unknown-linux-muslabi64.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mips64el-unknown-linux-muslabi64.tar.xz.asc
+sha256 84e9948c8d850dc1c76e146de0f577be7a4d2a8e9b42fee43b05d88237e37c82  rust-std-1.52.0-mips64el-unknown-linux-muslabi64.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-mipsel-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mipsel-unknown-linux-gnu.tar.xz.asc
 sha256  a6de773dfcdc8cac832ac6c356e2c0ecfd94fd7f7242aac82f8922f5bd1639e9  rust-std-1.52.0-mipsel-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-mipsel-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-mipsel-unknown-linux-musl.tar.xz.asc
+sha256 724df483aaf0797e30844715c537be9257074355201e92c992d12b2376d1b0ce  rust-std-1.52.0-mipsel-unknown-linux-musl.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-powerpc-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-powerpc-unknown-linux-gnu.tar.xz.asc
 sha256  2ad7e17bcb8f632eb4206294ab977bbe1b7562009a3ca84a8d753ff454b1ee07  rust-std-1.52.0-powerpc-unknown-linux-gnu.tar.xz
@@ -43,9 +82,18 @@ sha256  a792384afe034322b4b430049f57ed5e5fe9efbcf74c13c3edaf04062392727a  rust-s
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz.asc
 sha256  af5256a5f1cb189415b0d6b3e349312bbe8a78331a817c8da79ccfe9a07c0aed  rust-std-1.52.0-powerpc64le-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-riscv64gc-unknown-linux-gnu.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-riscv64gc-unknown-linux-gnu.tar.xz.asc
+sha256 573d8681cfc0ce71e735254ac33bfca7644fd4251699781b16dd18633a8e92ad  rust-std-1.52.0-riscv64gc-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-sparc64-unknown-linux-gnu.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-sparc64-unknown-linux-gnu.tar.xz.asc
+sha256 0320e71a4c010295968b7ba05e68550b97c6b42520e72f1a534b0135c966cc99  rust-std-1.52.0-sparc64-unknown-linux-gnu.tar.xz
 # From https://static.rust-lang.org/dist/rust-std-1.52.0-x86_64-unknown-linux-gnu.tar.xz.sha256
 # Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-x86_64-unknown-linux-gnu.tar.xz.asc
 sha256  dcdc0083facd6484527494ee5b8f72e040a095ab346bb658ce176be573d5c9b4  rust-std-1.52.0-x86_64-unknown-linux-gnu.tar.xz
+# From https://static.rust-lang.org/dist/rust-std-1.52.0-x86_64-unknown-linux-musl.tar.xz.sha256
+# Verified using https://static.rust-lang.org/dist/rust-std-1.52.0-x86_64-unknown-linux-musl.tar.xz.asc
+sha256 d5809f3f1345a3c524f00cfa2ac1631b494a6de3143b1a3d081476f2c4f78905  rust-std-1.52.0-x86_64-unknown-linux-musl.tar.xz
 # Locally generated
 sha256  62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a  LICENSE-APACHE
 sha256  23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3  LICENSE-MIT
package/rustc/Config.in.host +92 -12
index 1df25ae326..c5f64fd3c6 100644
@@ -3,21 +3,101 @@ config BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
 	bool
 	default y if BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 
+# The pre-built Rust standard library is only available for a number
+# of architectures/C libraries combinations, with different levels of
+# support: Tier 1 platforms, Tier 2 platforms with host tools, Tier 2
+# platforms, Tier 3 platforms. Below, we support Tier 1, Tier 2 with
+# host tools and Tier 2 platforms.
+
+# The below entries match Tier 1 platforms as described at
+# https://doc.rust-lang.org/nightly/rustc/platform-support.html.
+config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER1_PLATFORMS
+	bool
+	# aarch64-unknown-linux-gnu
+	default y if BR2_aarch64 && BR2_TOOLCHAIN_USES_GLIBC
+	# i686-unknown-linux-gnu
+	default y if (BR2_i686 || BR2_x86_pentiumpro || BR2_X86_CPU_HAS_MMX) && BR2_TOOLCHAIN_USES_GLIBC
+	# x86_64-unknown-linux-gnu
+	default y if BR2_x86_64 && BR2_TOOLCHAIN_USES_GLIBC
+
+# The below entries match Tier 2 platforms with host tools as
+# described at
+# https://doc.rust-lang.org/nightly/rustc/platform-support.html.
+config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_HOST_TOOLS_PLATFORMS
+	bool
+	# aarch64-unknown-linux-musl
+	default y if BR2_aarch64 && BR2_TOOLCHAIN_USES_MUSL
+	# arm-unknown-linux-gnueabi
+	default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_GLIBC
+	# arm-unknown-linux-gnueabihf
+	default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	# armv7-unknown-linux-gnueabihf
+	default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC
+	# mips-unknown-linux-gnu
+	default y if BR2_mips && BR2_TOOLCHAIN_USES_GLIBC && !BR2_MIPS_CPU_MIPS32R6
+	# mips64-unknown-linux-gnuabi64
+	default y if BR2_mips64 && BR2_TOOLCHAIN_USES_GLIBC && BR2_MIPS_NABI64 && !BR2_MIPS_CPU_MIPS32R6
+	# mipsel-unknown-linux-gnu
+	default y if BR2_mipsel && BR2_TOOLCHAIN_USES_GLIBC && !BR2_MIPS_CPU_MIPS32R6
+	# mips64el-unknown-linux-gnuabi64
+	default y if BR2_mips64el && BR2_TOOLCHAIN_USES_GLIBC && BR2_MIPS_NABI64 && !BR2_MIPS_CPU_MIPS32R6
+	# powerpc-unknown-linux-gnu
+	default y if BR2_powerpc && BR2_TOOLCHAIN_USES_GLIBC
+	# powerpc64-unknown-linux-gnu
+	default y if BR2_powerpc64 && BR2_TOOLCHAIN_USES_GLIBC
+	# powerpc64le-unknown-linux-gnu
+	default y if BR2_powerpc64le && BR2_TOOLCHAIN_USES_GLIBC
+	# riscv64gc-unknown-linux-gnu
+	# "g" stands for imafd, and we also need "c".
+	default y if BR2_riscv && BR2_RISCV_ISA_RVI && BR2_RISCV_ISA_RVM && \
+			BR2_RISCV_ISA_RVA && BR2_RISCV_ISA_RVF && \
+			BR2_RISCV_ISA_RVD && BR2_RISCV_ISA_RVC && \
+			BR2_TOOLCHAIN_USES_GLIBC
+	# x86_64-unknown-linux-musl
+	default y if BR2_x86_64 && BR2_TOOLCHAIN_USES_MUSL
+
+# The below entries match Tier 2 platforms without host tools as
+# described at
+# https://doc.rust-lang.org/nightly/rustc/platform-support.html.
+config BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS
+	bool
+	# arm-unknown-linux-musleabi
+	default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_MUSL
+	# arm-unknown-linux-musleabihf
+	default y if BR2_ARM_CPU_ARMV6 && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
+	# armv5te-unknown-linux-gnueabi
+	default y if BR2_ARM_CPU_ARMV5 && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_GLIBC
+	# armv5te-unknown-linux-musleabi
+	default y if BR2_ARM_CPU_ARMV5 && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_MUSL
+	# armv7-unknown-linux-gnueabi
+	default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_GLIBC
+	# armv7-unknown-linux-musleabi
+	default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI && BR2_TOOLCHAIN_USES_MUSL
+	# armv7-unknown-linux-musleabihf
+	default y if BR2_ARM_CPU_ARMV7A && BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_MUSL
+	# i586-unknown-linux-gnu
+	default y if BR2_i586 && BR2_TOOLCHAIN_USES_GLIBC
+	# i586-unknown-linux-musl
+	default y if BR2_i586 && BR2_TOOLCHAIN_USES_MUSL
+	# i686-unknown-linux-musl
+	default y if (BR2_i686 || BR2_x86_pentiumpro || BR2_X86_CPU_HAS_MMX) && BR2_TOOLCHAIN_USES_MUSL
+	# mips-unknown-linux-musl
+	default y if BR2_mips && BR2_TOOLCHAIN_USES_MUSL && !BR2_MIPS_CPU_MIPS32R6
+	# mips64-unknown-linux-muslabi64
+	default y if BR2_mips64 && BR2_TOOLCHAIN_USES_MUSL && BR2_MIPS_NABI64 && !BR2_MIPS_CPU_MIPS32R6
+	# mips64el-unknown-linux-muslabi64
+	default y if BR2_mips64el && BR2_TOOLCHAIN_USES_MUSL && BR2_MIPS_NABI64 && !BR2_MIPS_CPU_MIPS32R6
+	# mipsel-unknown-linux-musl
+	default y if BR2_mipsel && BR2_TOOLCHAIN_USES_MUSL && !BR2_MIPS_CPU_MIPS32R6
+	# sparc64-unknown-linux-gnu
+	default y if BR2_sparc64 && BR2_TOOLCHAIN_USES_GLIBC
+
 # All target rust packages should depend on this option
 config BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
 	bool
-	# The pre-built Rust standard library is only available for the
-	# following architectures/ABIs, and is built against glibc.
-	default y if BR2_i386
-	default y if BR2_x86_64
-	default y if BR2_aarch64
-	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 \
-	        && !(BR2_ARM_CPU_ARMV7A && BR2_ARM_EABI)
-	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
-	default y if (BR2_mips || BR2_mipsel) && !BR2_MIPS_CPU_MIPS32R6
-	default y if (BR2_mips64 || BR2_mips64el) && !BR2_MIPS_CPU_MIPS64R6 \
-		&& BR2_MIPS_NABI64
-	depends on BR2_TOOLCHAIN_USES_GLIBC
+	default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER1_PLATFORMS
+	default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_HOST_TOOLS_PLATFORMS
+	default y if BR2_PACKAGE_HOST_RUSTC_TARGET_TIER2_PLATFORMS
 	depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
 
 config BR2_PACKAGE_HOST_RUSTC_ARCH
Signature · 6 lines
2.31.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'