Skip to contentSkip to conversation

rust-common: override RUST_LIBC for crosssdk

PATCH New Christian Eggers 1 participant 4 messages Mar 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 rust-common: override RUST_LIBC for crosssdk

For nativesdk/crosssdk, always glibc is used. Fixes build of rust-crosssdk if TCLIBC is set to musl.

---
 meta/classes/rust-common.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/rust-common.bbclass +1 -0
index 65ad677499cb..02a538258af6 100644
@@ -16,6 +16,7 @@ RUST_PANIC_STRATEGY ?= "unwind"
 # Native builds are not effected by TCLIBC. Without this, rust-native
 # thinks it's "target" (i.e. x86_64-linux) is a musl target.
 RUST_LIBC = "${TCLIBC}"
+RUST_LIBC:class-crosssdk = "glibc"
 RUST_LIBC:class-native = "glibc"
 
 def determine_libc(d, thing):
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/4 machine-sdk: clear ABIEXTENSION for class-crosssdk

For nativesdk/crosssdk, we have no ABIEXTENSION. Fixes build of rust-crosssdk if ABIEXTENSION is set toe something like "eabi".

---
 meta/conf/machine-sdk/x86_64.conf | 1 +
 1 file changed, 1 insertion(+)
meta/conf/machine-sdk/x86_64.conf +1 -0
index 8d494b261e0c..2ab607e65c22 100644
@@ -1,2 +1,3 @@
 SDK_ARCH = "x86_64"
+ABIEXTENSION:class-crosssdk = ""
 ABIEXTENSION:class-nativesdk = ""
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/4 rust-crosssdk: use ${RUST_LIBC} in ${PN}

In reply to Christian Eggers

TCLIBC is only valid for TARGET, not for HOST or NATIVESDK. Fixes build of rust-crosssdk if TCLIBC is set to musl.

---
 meta/recipes-devtools/rust/rust-crosssdk_1.59.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/rust/rust-crosssdk_1.59.0.bb +1 -1
index 5929978591fb..6ea8cb09b21b 100644
@@ -5,4 +5,4 @@ require rust-source.inc
 
 DEPENDS += "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/nativesdk-${TARGET_PREFIX}compilerlibs virtual/nativesdk-libc"
 PROVIDES = "virtual/nativesdk-${TARGET_PREFIX}rust"
-PN = "rust-crosssdk-${TUNE_PKGARCH}-${TCLIBC}"
+PN = "rust-crosssdk-${TUNE_PKGARCH}-${RUST_LIBC}"
Signature · 1 line
2.34.1
#3 lore raw

PATCH 4/4 librsvg: reenable nativesdk

In reply to Christian Eggers

Rust is now available for nativesdk. So the nativesdk build for librsvg can be enabled again.

---
 meta/recipes-gnome/librsvg/librsvg_2.52.7.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/librsvg/librsvg_2.52.7.bb +1 -1
index eb420e732cc8..78eb93c6351e 100644
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
 
 SECTION = "x11/utils"
 DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
 inherit gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection rust vala
 
Signature · 1 line
2.34.1