Skip to contentSkip to conversation

tcmode-default: eliminate needless rust, cargo defaults

PATCH In review [email protected] 3 participants 6 messages Mar 11, 2025 – Mar 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tcmode-default: eliminate needless rust, cargo defaults

From: Randy MacLeod <[email protected]>

Manually setting preferred version is not required so remove that for rust and cargo.

---
 meta/conf/distro/include/tcmode-default.inc | 13 -------------
 1 file changed, 13 deletions(-)
meta/conf/distro/include/tcmode-default.inc +0 -13
index 702fa4d75f..5cc93405f1 100644
@@ -14,7 +14,6 @@ SDKGCCVERSION ?= "${GCCVERSION}"
 BINUVERSION ?= "2.44%"
 GLIBCVERSION ?= "2.41%"
 LINUXLIBCVERSION ?= "6.12%"
-RUSTVERSION ?= "1.83%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
@@ -44,15 +43,3 @@ PREFERRED_VERSION_glibc-mtrace             ?= "${GLIBCVERSION}"
 PREFERRED_VERSION_glibc-scripts            ?= "${GLIBCVERSION}"
 PREFERRED_VERSION_nativesdk-glibc          ?= "${GLIBCVERSION}"
 PREFERRED_VERSION_cross-localedef-native   ?= "${GLIBCVERSION}"
-
-# Rust toolchain preferred versions:
-
-PREFERRED_VERSION_cargo ?= "${RUSTVERSION}"
-PREFERRED_VERSION_cargo-native ?= "${RUSTVERSION}"
-PREFERRED_VERSION_libstd-rs ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust-llvm ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust-llvm-native ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust-native ?= "${RUSTVERSION}"
-
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 tcmode-default: eliminate needless binutils defaults

From: Randy MacLeod <[email protected]>

Manually setting preferred version/provider is not required so remove that for binutils.

---
 meta/conf/distro/include/tcmode-default.inc | 10 ----------
 1 file changed, 10 deletions(-)
meta/conf/distro/include/tcmode-default.inc +0 -10
index 5cc93405f1..2a3c16e2bd 100644
@@ -2,16 +2,11 @@
 # Default toolchain configuration
 #
 
-PREFERRED_PROVIDER_virtual/cross-binutils = "${MLPREFIX}binutils-cross-${TARGET_ARCH}"
-PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk ?= "binutils-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/nativesdk-cross-binutils ?= "binutils-crosssdk-${SDK_SYS}"
-
 # Default libc config
 PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
 
 GCCVERSION ?= "14.%"
 SDKGCCVERSION ?= "${GCCVERSION}"
-BINUVERSION ?= "2.44%"
 GLIBCVERSION ?= "2.41%"
 LINUXLIBCVERSION ?= "6.12%"
 
@@ -29,11 +24,6 @@ PREFERRED_VERSION_libgfortran ?= "${GCCVERSION}"
 PREFERRED_VERSION_nativesdk-gcc ?= "${SDKGCCVERSION}"
 PREFERRED_VERSION_nativesdk-libgcc ?= "${SDKGCCVERSION}"
 PREFERRED_VERSION_nativesdk-libgcc-initial ?= "${SDKGCCVERSION}"
-PREFERRED_VERSION_binutils ?= "${BINUVERSION}"
-PREFERRED_VERSION_binutils-native ?= "${BINUVERSION}"
-PREFERRED_VERSION_binutils-cross-${TARGET_ARCH} ?= "${BINUVERSION}"
-PREFERRED_VERSION_binutils-crosssdk-${SDK_SYS} ?= "${BINUVERSION}"
-PREFERRED_VERSION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${BINUVERSION}"
 
 PREFERRED_VERSION_linux-libc-headers ?= "${LINUXLIBCVERSION}"
 PREFERRED_VERSION_nativesdk-linux-libc-headers ?= "${LINUXLIBCVERSION}"
Signature · 1 line
2.34.1
#4 lore raw
In reply to [email protected]

I know you want to eliminate this whole file, but I find RUSTVERSION useful in situations where some layer wants to backport different version of rust and related recipes and then the DISTRO can set just the RUSTVERSION variable to choose between the versions available. Now the layer with different rust recipes will probably need to provide some .inc file with this, so that the users of this layer won't need to know which 8 recipes need to have PREFERRED_VERSION set at the same time.

Like it was with
https://github.com/meta-rust/meta-rust/commits/master/conf/distro/include/rust_versions.inc
https://github.com/meta-rust/meta-rust/commit/9c0a1059be62417439615126ddd3044269406a66

otherwise the version from layer with higher priority will win and the DISTRO won't be able to easily avoid that, other than adding all these PREFERRED_VERSIONS or using BBMASK or preventing that layer to be included in BBLAYERS.

Just my 2c

Quoted 51 lines · Randy MacLeod via lists.openembedded.org

From: Randy MacLeod <[email protected]>

Manually setting preferred version is not required so remove that for rust and cargo.

---
 meta/conf/distro/include/tcmode-default.inc | 13 -------------
 1 file changed, 13 deletions(-)
meta/conf/distro/include/tcmode-default.inc +0 -14
index 702fa4d75f..5cc93405f1 100644
@@ -14,7 +14,6 @@ SDKGCCVERSION ?= "${GCCVERSION}"
 BINUVERSION ?= "2.44%"
 GLIBCVERSION ?= "2.41%"
 LINUXLIBCVERSION ?= "6.12%"
-RUSTVERSION ?= "1.83%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
@@ -44,15 +43,3 @@ PREFERRED_VERSION_glibc-mtrace             ?= "${GLIBCVERSION}"
 PREFERRED_VERSION_glibc-scripts            ?= "${GLIBCVERSION}"
 PREFERRED_VERSION_nativesdk-glibc          ?= "${GLIBCVERSION}"
 PREFERRED_VERSION_cross-localedef-native   ?= "${GLIBCVERSION}"
-
-# Rust toolchain preferred versions:
-
-PREFERRED_VERSION_cargo ?= "${RUSTVERSION}"
-PREFERRED_VERSION_cargo-native ?= "${RUSTVERSION}"
-PREFERRED_VERSION_libstd-rs ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust-llvm ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust-llvm-native ?= "${RUSTVERSION}"
-PREFERRED_VERSION_rust-native ?= "${RUSTVERSION}"
-
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#212574): https://lists.openembedded.org/g/openembedded-core/message/212574
Mute This Topic: https://lists.openembedded.org/mt/111643200/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw
Quoted 13 lines · Martin Jansa via lists.openembedded.org

I know you want to eliminate this whole file, but I find RUSTVERSION useful in situations where some layer wants to backport different version of rust and related recipes and then the DISTRO can set just the RUSTVERSION variable to choose between the versions available. Now the layer with different rust recipes will probably need to provide some .inc file with this, so that the users of this layer won't need to know which 8 recipes need to have PREFERRED_VERSION set at the same time.

Like it was with
https://github.com/meta-rust/meta-rust/commits/master/conf/distro/include/rust_versions.inc
https://github.com/meta-rust/meta-rust/commit/9c0a1059be62417439615126ddd3044269406a66

Quoted 6 lines

otherwise the version from layer with higher priority will win and the DISTRO won't be able to easily avoid that, other than adding all these PREFERRED_VERSIONS or using BBMASK or preventing that layer to be included in BBLAYERS.

Just my 2c

In some ways these patches are to check who is actually using some of these things. They need maintaining and I've not been convinced some of them are used.

If you are saying you find the rust version useful, that is probably a reason to keep this, annoying as it can be to maintain...

Cheers,

Richard

#2 lore raw

Re: [OE-core] [PATCH 2/2] tcmode-default: eliminate needless binutils defaults

In reply to [email protected]
Quoted 22 lines · Randy MacLeod via lists.openembedded.org

From: Randy MacLeod <[email protected]>

Manually setting preferred version/provider is not required so remove that for binutils.

---
 meta/conf/distro/include/tcmode-default.inc | 10 ----------

 1 file changed, 10 deletions(-)
meta/conf/distro/include/tcmode-default.inc +0 -0
index 5cc93405f1..2a3c16e2bd 100644
@@ -2,16 +2,11 @@
  # Default toolchain configuration
  #

meta/conf/distro/include/tcmode-default.inc +0 -4
-PREFERRED_PROVIDER_virtual/cross-binutils = "${MLPREFIX}binutils-cross-${TARGET_ARCH}"
-PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk ?= "binutils-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/nativesdk-cross-binutils ?= "binutils-crosssdk-${SDK_SYS}"
-
Quoted 1 line

 #

I suspect we need to keep this bit since these are not direct mappings. It was the version preference which I think we may be able to drop as there is only one version.

Cheers,

Richard

#3 lore raw

Re: [OE-core] [PATCH 2/2] tcmode-default: eliminate needless binutils defaults

Quoted 19 lines · Richard Purdie
Quoted 18 lines · Randy MacLeod via lists.openembedded.org

From: Randy MacLeod<[email protected]>

Manually setting preferred version/provider is not required so remove that for binutils.

---
  meta/conf/distro/include/tcmode-default.inc | 10 ----------
  1 file changed, 10 deletions(-)
meta/conf/distro/include/tcmode-default.inc +0 -0
index 5cc93405f1..2a3c16e2bd 100644
@@ -2,16 +2,11 @@
  # Default toolchain configuration
  #
 
Quoted 8 lines

meta/conf/distro/include/tcmode-default.inc

Quoted 5 lines
meta/conf/distro/include/tcmode-default.inc +0 -4
-PREFERRED_PROVIDER_virtual/cross-binutils = "${MLPREFIX}binutils-cross-${TARGET_ARCH}"
-PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk ?= "binutils-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/nativesdk-cross-binutils ?= "binutils-crosssdk-${SDK_SYS}"
-
  #

I suspect we need to keep this bit since these are not direct mappings. It was the version preference which I think we may be able to drop as there is only one version.

Okay. Will do.

v2 without rust and the bit above coming up...

../Randy

Quoted 5 lines

Cheers,

Richard

Signature · 2 lines
# Randy MacLeod
# Wind River Linux