All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-Core][PATCH v4 00/11] Add rust runtime tests
@ 2022-12-25 21:59 Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 01/11] rust-llvm: Merge .inc into .bb Alex Kiernan
                   ` (11 more replies)
  0 siblings, 12 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan


This series adds runtime tests for rust and cargo, merges (most of) the
include files into the base recipes and fixes target cargo builds.

Also add SDK_TOOLCHAIN_LANGS for selection of target toolchains as part
of packagegroup-core-sdk.

Changes in v4:
- Fixup `__stack_chk_fail_local` in musl-x86
- Add crossbeam atomics fixes for ppc/mips

Changes in v3:
- Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
  (which defaults to SDK_TOOLCHAIN_LANGS)

Changes in v2:
- Drop rust.inc/rust.bb merge, not actually made use of in the change
  set
- Reorder so cargo test goes after build fixes

Alex Kiernan (11):
  rust-llvm: Merge .inc into .bb
  rust-llvm: Update LLVM_VERSION to match embedded version
  packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
  packagegroup-core-sdk: Add SDK toolchain language selection support
  cargo: Merge .inc into .bb
  cargo: Extend DEBUG_PREFIX_MAP to cover vendor
  rust: Merge .inc into .bb
  rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
  cargo: Override crossbeam-utils with 0.8.14
  packagegroup-rust-sdk-target: Add cargo
  oeqa/runtime/rust: Add cargo test

 meta/lib/oeqa/runtime/cases/rust.py           |  17 ++
 .../packagegroups/packagegroup-core-sdk.bb    |  10 +-
 .../packagegroup-rust-sdk-target.bb           |  14 ++
 meta/recipes-devtools/cargo/cargo.inc         |  69 ------
 meta/recipes-devtools/cargo/cargo_1.66.0.bb   |  80 ++++++-
 meta/recipes-devtools/rust/rust-llvm.inc      |  78 ------
 .../recipes-devtools/rust/rust-llvm_1.66.0.bb |  82 ++++++-
 meta/recipes-devtools/rust/rust-source.inc    |   5 +
 meta/recipes-devtools/rust/rust-target.inc    |  10 -
 meta/recipes-devtools/rust/rust.inc           | 223 ------------------
 meta/recipes-devtools/rust/rust_1.66.0.bb     | 223 +++++++++++++++++-
 11 files changed, 420 insertions(+), 391 deletions(-)
 create mode 100644 meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb
 delete mode 100644 meta/recipes-devtools/cargo/cargo.inc
 delete mode 100644 meta/recipes-devtools/rust/rust-llvm.inc
 delete mode 100644 meta/recipes-devtools/rust/rust-target.inc
 delete mode 100644 meta/recipes-devtools/rust/rust.inc

-- 
2.39.0



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 01/11] rust-llvm: Merge .inc into .bb
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 02/11] rust-llvm: Update LLVM_VERSION to match embedded version Alex Kiernan
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v2)

Changes in v2:
- Drop rust.inc/rust.bb merge, not actually made use of in the change
  set
- Reorder so cargo test goes after build fixes

 meta/recipes-devtools/rust/rust-llvm.inc      | 78 ------------------
 .../recipes-devtools/rust/rust-llvm_1.66.0.bb | 80 ++++++++++++++++++-
 2 files changed, 79 insertions(+), 79 deletions(-)
 delete mode 100644 meta/recipes-devtools/rust/rust-llvm.inc

diff --git a/meta/recipes-devtools/rust/rust-llvm.inc b/meta/recipes-devtools/rust/rust-llvm.inc
deleted file mode 100644
index 625eb5704166..000000000000
--- a/meta/recipes-devtools/rust/rust-llvm.inc
+++ /dev/null
@@ -1,78 +0,0 @@
-SUMMARY = "LLVM compiler framework (packaged with rust)"
-LICENSE ?= "Apache-2.0-with-LLVM-exception"
-HOMEPAGE = "http://www.rust-lang.org"
-
-SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
-            file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
-	    file://0003-llvm-fix-include-benchmarks.patch;striplevel=2"
-
-S = "${RUSTSRC}/src/llvm-project/llvm"
-
-LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
-
-inherit cmake python3native
-
-DEPENDS += "ninja-native rust-llvm-native"
-
-ARM_INSTRUCTION_SET:armv5 = "arm"
-ARM_INSTRUCTION_SET:armv4t = "arm"
-
-# rustc_llvm with debug info is not recognized as a valid crate that's
-# generated by rust-llvm-native.
-CFLAGS:remove = "-g"
-CXXFLAGS:remove = "-g"
-
-LLVM_DIR = "llvm${LLVM_RELEASE}"
-
-EXTRA_OECMAKE = " \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DLLVM_TARGETS_TO_BUILD='ARM;AArch64;Mips;PowerPC;RISCV;X86' \
-    -DLLVM_BUILD_DOCS=OFF \
-    -DLLVM_ENABLE_TERMINFO=OFF \
-    -DLLVM_ENABLE_ZLIB=OFF \
-    -DLLVM_ENABLE_LIBXML2=OFF \
-    -DLLVM_ENABLE_FFI=OFF \
-    -DLLVM_INSTALL_UTILS=ON \
-    -DLLVM_BUILD_EXAMPLES=OFF \
-    -DLLVM_INCLUDE_EXAMPLES=OFF \
-    -DLLVM_BUILD_TESTS=OFF \
-    -DLLVM_INCLUDE_TESTS=OFF \
-    -DLLVM_TARGET_ARCH=${TARGET_ARCH} \
-    -DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \
-"
-EXTRA_OECMAKE:append:class-target = "\
-    -DCMAKE_CROSSCOMPILING:BOOL=ON \
-    -DLLVM_BUILD_TOOLS=OFF \
-    -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
-    -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \
-"
-
-EXTRA_OECMAKE:append:class-nativesdk = "\
-    -DCMAKE_CROSSCOMPILING:BOOL=ON \
-    -DLLVM_BUILD_TOOLS=OFF \
-    -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
-    -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \
-"
-
-# The debug symbols are huge here (>2GB) so suppress them since they
-# provide almost no value. If you really need them then override this
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-
-export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
-
-do_install:append () {
-    # we don't need any of this stuff to build Rust
-    rm -rf "${D}/usr/lib/cmake"
-}
-
-PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"
-
-# Add the extra locations to avoid the complaints about unpackaged files
-FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so"
-FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so"
-FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*"
-FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a"
-FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin"
-FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb b/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb
index 396f741953ed..e1baeb78574f 100644
--- a/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb
+++ b/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb
@@ -1,6 +1,84 @@
+SUMMARY = "LLVM compiler framework (packaged with rust)"
+LICENSE ?= "Apache-2.0-with-LLVM-exception"
+HOMEPAGE = "http://www.rust-lang.org"
+
 # check src/llvm-project/llvm/CMakeLists.txt for llvm version in use
 #
 LLVM_RELEASE = "14.0.5"
+
 require rust-source.inc
-require rust-llvm.inc
 
+SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
+            file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
+	    file://0003-llvm-fix-include-benchmarks.patch;striplevel=2"
+
+S = "${RUSTSRC}/src/llvm-project/llvm"
+
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
+
+inherit cmake python3native
+
+DEPENDS += "ninja-native rust-llvm-native"
+
+ARM_INSTRUCTION_SET:armv5 = "arm"
+ARM_INSTRUCTION_SET:armv4t = "arm"
+
+# rustc_llvm with debug info is not recognized as a valid crate that's
+# generated by rust-llvm-native.
+CFLAGS:remove = "-g"
+CXXFLAGS:remove = "-g"
+
+LLVM_DIR = "llvm${LLVM_RELEASE}"
+
+EXTRA_OECMAKE = " \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DLLVM_TARGETS_TO_BUILD='ARM;AArch64;Mips;PowerPC;RISCV;X86' \
+    -DLLVM_BUILD_DOCS=OFF \
+    -DLLVM_ENABLE_TERMINFO=OFF \
+    -DLLVM_ENABLE_ZLIB=OFF \
+    -DLLVM_ENABLE_LIBXML2=OFF \
+    -DLLVM_ENABLE_FFI=OFF \
+    -DLLVM_INSTALL_UTILS=ON \
+    -DLLVM_BUILD_EXAMPLES=OFF \
+    -DLLVM_INCLUDE_EXAMPLES=OFF \
+    -DLLVM_BUILD_TESTS=OFF \
+    -DLLVM_INCLUDE_TESTS=OFF \
+    -DLLVM_TARGET_ARCH=${TARGET_ARCH} \
+    -DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \
+"
+EXTRA_OECMAKE:append:class-target = "\
+    -DCMAKE_CROSSCOMPILING:BOOL=ON \
+    -DLLVM_BUILD_TOOLS=OFF \
+    -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
+    -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \
+"
+
+EXTRA_OECMAKE:append:class-nativesdk = "\
+    -DCMAKE_CROSSCOMPILING:BOOL=ON \
+    -DLLVM_BUILD_TOOLS=OFF \
+    -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
+    -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \
+"
+
+# The debug symbols are huge here (>2GB) so suppress them since they
+# provide almost no value. If you really need them then override this
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
+
+do_install:append () {
+    # we don't need any of this stuff to build Rust
+    rm -rf "${D}/usr/lib/cmake"
+}
+
+PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"
+
+# Add the extra locations to avoid the complaints about unpackaged files
+FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so"
+FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so"
+FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*"
+FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a"
+FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin"
+FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 02/11] rust-llvm: Update LLVM_VERSION to match embedded version
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 01/11] rust-llvm: Merge .inc into .bb Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 03/11] packagegroup-rust-sdk-target: Add Rust SDK target packagegroup Alex Kiernan
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v1)

 meta/recipes-devtools/rust/rust-llvm_1.66.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb b/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb
index e1baeb78574f..4cf244bb67f5 100644
--- a/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb
+++ b/meta/recipes-devtools/rust/rust-llvm_1.66.0.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.rust-lang.org"
 
 # check src/llvm-project/llvm/CMakeLists.txt for llvm version in use
 #
-LLVM_RELEASE = "14.0.5"
+LLVM_RELEASE = "15.0.2"
 
 require rust-source.inc
 
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 03/11] packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 01/11] rust-llvm: Merge .inc into .bb Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 02/11] rust-llvm: Update LLVM_VERSION to match embedded version Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 04/11] packagegroup-core-sdk: Add SDK toolchain language selection support Alex Kiernan
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v1)

 .../packagegroups/packagegroup-rust-sdk-target.bb   | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb

diff --git a/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb
new file mode 100644
index 000000000000..334b24900b4b
--- /dev/null
+++ b/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb
@@ -0,0 +1,13 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+SUMMARY = "Target packages for the Rust SDK"
+
+inherit packagegroup
+
+RDEPENDS:${PN} = " \
+    rust \
+"
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 04/11] packagegroup-core-sdk: Add SDK toolchain language selection support
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (2 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 03/11] packagegroup-rust-sdk-target: Add Rust SDK target packagegroup Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 05/11] cargo: Merge .inc into .bb Alex Kiernan
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Use SDK_TOOLCHAIN_LANGS to allow different language support to be
selected within SDKs. Initially supported options are rust and go.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v3)

Changes in v3:
- Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
  (which defaults to SDK_TOOLCHAIN_LANGS)

 .../packagegroups/packagegroup-core-sdk.bb             | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index d70aff22c725..104f3549d593 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -11,6 +11,11 @@ inherit packagegroup
 
 #PACKAGEFUNCS =+ 'generate_sdk_pkgs'
 
+TARGET_TOOLCHAIN_LANGS ??= "${SDK_TOOLCHAIN_LANGS}"
+TARGET_TOOLCHAIN_LANGS:remove:sdkmingw32 = "rust"
+# libstd-rs doesn't build for mips n32 with compiler constraint errors
+TARGET_TOOLCHAIN_LANGS:remove:mipsarchn32 = "rust"
+
 RDEPENDS:packagegroup-core-sdk = "\
     packagegroup-core-buildessential \
     coreutils \
@@ -23,7 +28,10 @@ RDEPENDS:packagegroup-core-sdk = "\
     less \
     ldd \
     file \
-    tcl"
+    tcl \
+    ${@bb.utils.contains('TARGET_TOOLCHAIN_LANGS', 'go', 'packagegroup-go-sdk-target', '', d)} \
+    ${@bb.utils.contains('TARGET_TOOLCHAIN_LANGS', 'rust', 'packagegroup-rust-sdk-target', '', d)} \
+"
 
 SANITIZERS = "libasan-dev libubsan-dev"
 SANITIZERS:arc = ""
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 05/11] cargo: Merge .inc into .bb
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (3 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 04/11] packagegroup-core-sdk: Add SDK toolchain language selection support Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 06/11] cargo: Extend DEBUG_PREFIX_MAP to cover vendor Alex Kiernan
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v1)

 meta/recipes-devtools/cargo/cargo.inc       | 69 --------------------
 meta/recipes-devtools/cargo/cargo_1.66.0.bb | 71 ++++++++++++++++++++-
 2 files changed, 69 insertions(+), 71 deletions(-)
 delete mode 100644 meta/recipes-devtools/cargo/cargo.inc

diff --git a/meta/recipes-devtools/cargo/cargo.inc b/meta/recipes-devtools/cargo/cargo.inc
deleted file mode 100644
index 40421df4f76d..000000000000
--- a/meta/recipes-devtools/cargo/cargo.inc
+++ /dev/null
@@ -1,69 +0,0 @@
-SUMMARY ?= "Cargo, a package manager for Rust."
-HOMEPAGE = "https://crates.io"
-LICENSE = "MIT | Apache-2.0"
-SECTION = "devel"
-
-DEPENDS = "openssl zlib curl ca-certificates libssh2"
-
-LIC_FILES_CHKSUM = " \
-    file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d \
-    file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \
-    file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \
-"
-
-
-S = "${RUSTSRC}/src/tools/cargo"
-CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
-EXCLUDE_FROM_WORLD = "1"
-
-inherit cargo pkgconfig
-
-do_cargo_setup_snapshot () {
-	${WORKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig
-	# Need to use uninative's loader if enabled/present since the library paths
-	# are used internally by rust and result in symbol mismatches if we don't
-	if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then
-		patchelf-uninative ${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo --set-interpreter ${UNINATIVE_LOADER}
-	fi
-}
-
-addtask cargo_setup_snapshot after do_unpack before do_configure
-do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}"
-do_cargo_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
-
-
-do_compile:prepend () {
-	export RUSTC_BOOTSTRAP="1"
-}
-
-do_install () {
-	install -d "${D}${bindir}"
-	install -m 755 "${B}/target/${CARGO_TARGET_SUBDIR}/cargo" "${D}${bindir}"
-}
-
-do_install:append:class-nativesdk() {
-	# To quote the cargo docs, "Cargo also sets the dynamic library path when compiling
-	# and running binaries with commands like `cargo run` and `cargo test`". Sadly it
-	# sets to libdir but not base_libdir leading to symbol mismatches depending on the
-	# host OS. Fully set LD_LIBRARY_PATH to contain both to avoid this.
-	create_wrapper ${D}/${bindir}/cargo LD_LIBRARY_PATH=${libdir}:${base_libdir}
-}
-
-# Disabled due to incompatibility with libgit2 0.28.x (https://github.com/rust-lang/git2-rs/issues/458, https://bugs.gentoo.org/707746#c1)
-# as shipped by Yocto Dunfell.
-# According to https://github.com/rust-lang/git2-rs/issues/458#issuecomment-522567539, there are no compatibility guarantees between
-# libgit2-sys and arbitrary system libgit2 versions, so better keep this turned off.
-#export LIBGIT2_SYS_USE_PKG_CONFIG = "1"
-
-# Needed for pkg-config to be used
-export LIBSSH2_SYS_USE_PKG_CONFIG = "1"
-
-# When building cargo-native we don't have cargo-native to use and depend on,
-# so we must use the locally set up snapshot to bootstrap the build.
-BASEDEPENDS:remove:class-native = "cargo-native"
-CARGO:class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo"
-
-DEPENDS:append:class-nativesdk = " nativesdk-rust"
-RUSTLIB:append:class-nativesdk = " -L ${STAGING_DIR_HOST}/${SDKPATHNATIVE}/usr/lib/rustlib/${RUST_HOST_SYS}/lib"
-
-
diff --git a/meta/recipes-devtools/cargo/cargo_1.66.0.bb b/meta/recipes-devtools/cargo/cargo_1.66.0.bb
index 5c8527708cb3..6c167c0c5f0b 100644
--- a/meta/recipes-devtools/cargo/cargo_1.66.0.bb
+++ b/meta/recipes-devtools/cargo/cargo_1.66.0.bb
@@ -1,5 +1,72 @@
+SUMMARY ?= "Cargo, a package manager for Rust."
+HOMEPAGE = "https://crates.io"
+LICENSE = "MIT | Apache-2.0"
+SECTION = "devel"
+
+DEPENDS = "openssl zlib curl ca-certificates libssh2"
+
+LIC_FILES_CHKSUM = " \
+    file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d \
+    file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \
+    file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \
+"
+
 require recipes-devtools/rust/rust-source.inc
 require recipes-devtools/rust/rust-snapshot.inc
-require cargo.inc
+
+S = "${RUSTSRC}/src/tools/cargo"
+CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
+EXCLUDE_FROM_WORLD = "1"
+
+inherit cargo pkgconfig
+
+do_cargo_setup_snapshot () {
+	${WORKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig
+	# Need to use uninative's loader if enabled/present since the library paths
+	# are used internally by rust and result in symbol mismatches if we don't
+	if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then
+		patchelf-uninative ${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo --set-interpreter ${UNINATIVE_LOADER}
+	fi
+}
+
+addtask cargo_setup_snapshot after do_unpack before do_configure
+do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}"
+do_cargo_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
+
+
+do_compile:prepend () {
+	export RUSTC_BOOTSTRAP="1"
+}
+
+do_install () {
+	install -d "${D}${bindir}"
+	install -m 755 "${B}/target/${CARGO_TARGET_SUBDIR}/cargo" "${D}${bindir}"
+}
+
+do_install:append:class-nativesdk() {
+	# To quote the cargo docs, "Cargo also sets the dynamic library path when compiling
+	# and running binaries with commands like `cargo run` and `cargo test`". Sadly it
+	# sets to libdir but not base_libdir leading to symbol mismatches depending on the
+	# host OS. Fully set LD_LIBRARY_PATH to contain both to avoid this.
+	create_wrapper ${D}/${bindir}/cargo LD_LIBRARY_PATH=${libdir}:${base_libdir}
+}
+
+# Disabled due to incompatibility with libgit2 0.28.x (https://github.com/rust-lang/git2-rs/issues/458, https://bugs.gentoo.org/707746#c1)
+# as shipped by Yocto Dunfell.
+# According to https://github.com/rust-lang/git2-rs/issues/458#issuecomment-522567539, there are no compatibility guarantees between
+# libgit2-sys and arbitrary system libgit2 versions, so better keep this turned off.
+#export LIBGIT2_SYS_USE_PKG_CONFIG = "1"
+
+# Needed for pkg-config to be used
+export LIBSSH2_SYS_USE_PKG_CONFIG = "1"
+
+# When building cargo-native we don't have cargo-native to use and depend on,
+# so we must use the locally set up snapshot to bootstrap the build.
+BASEDEPENDS:remove:class-native = "cargo-native"
+CARGO:class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo"
+
+DEPENDS:append:class-nativesdk = " nativesdk-rust"
+RUSTLIB:append:class-nativesdk = " -L ${STAGING_DIR_HOST}/${SDKPATHNATIVE}/usr/lib/rustlib/${RUST_HOST_SYS}/lib"
+RUSTLIB_DEP:class-nativesdk = ""
+
 BBCLASSEXTEND = "native nativesdk"
-RUSTLIB_DEP:class-nativesdk = ""
\ No newline at end of file
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 06/11] cargo: Extend DEBUG_PREFIX_MAP to cover vendor
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (4 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 05/11] cargo: Merge .inc into .bb Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 07/11] rust: Merge .inc into .bb Alex Kiernan
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

The cargo build builds vendored libgit and curl, but these exist outside
${S} which DEBUG_PREFIX_MAP covers.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v1)

 meta/recipes-devtools/cargo/cargo_1.66.0.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/cargo/cargo_1.66.0.bb b/meta/recipes-devtools/cargo/cargo_1.66.0.bb
index 6c167c0c5f0b..fe8049b68c9b 100644
--- a/meta/recipes-devtools/cargo/cargo_1.66.0.bb
+++ b/meta/recipes-devtools/cargo/cargo_1.66.0.bb
@@ -20,6 +20,8 @@ EXCLUDE_FROM_WORLD = "1"
 
 inherit cargo pkgconfig
 
+DEBUG_PREFIX_MAP += "-fdebug-prefix-map=${RUSTSRC}/vendor=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
 do_cargo_setup_snapshot () {
 	${WORKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig
 	# Need to use uninative's loader if enabled/present since the library paths
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 07/11] rust: Merge .inc into .bb
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (5 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 06/11] cargo: Extend DEBUG_PREFIX_MAP to cover vendor Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 08/11] rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source Alex Kiernan
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v1)

 meta/recipes-devtools/rust/rust-target.inc |  10 -
 meta/recipes-devtools/rust/rust.inc        | 223 ---------------------
 meta/recipes-devtools/rust/rust_1.66.0.bb  | 218 +++++++++++++++++++-
 3 files changed, 217 insertions(+), 234 deletions(-)
 delete mode 100644 meta/recipes-devtools/rust/rust-target.inc
 delete mode 100644 meta/recipes-devtools/rust/rust.inc

diff --git a/meta/recipes-devtools/rust/rust-target.inc b/meta/recipes-devtools/rust/rust-target.inc
deleted file mode 100644
index dce2b47517b5..000000000000
--- a/meta/recipes-devtools/rust/rust-target.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-require rust.inc
-
-DEPENDS += "rust-llvm (=${PV})"
-
-# Otherwise we'll depend on what we provide
-INHIBIT_DEFAULT_RUST_DEPS:class-native = "1"
-# We don't need to depend on gcc-native because yocto assumes it exists
-PROVIDES:class-native = "virtual/${TARGET_PREFIX}rust"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
deleted file mode 100644
index f58aa4644446..000000000000
--- a/meta/recipes-devtools/rust/rust.inc
+++ /dev/null
@@ -1,223 +0,0 @@
-SUMMARY = "Rust compiler and runtime libaries"
-HOMEPAGE = "http://www.rust-lang.org"
-SECTION = "devel"
-LICENSE = "(MIT | Apache-2.0) & Unicode-TOU"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=92289ed52a60b63ab715612ad2915603"
-
-inherit rust
-inherit cargo_common
-
-DEPENDS += "file-native python3-native"
-DEPENDS:append:class-native = " rust-llvm-native"
-DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm"
-
-S = "${RUSTSRC}"
-
-# Use at your own risk, accepted values are stable, beta and nightly
-RUST_CHANNEL ?= "stable"
-PV .= "${@bb.utils.contains('RUST_CHANNEL', 'stable', '', '-${RUST_CHANNEL}', d)}"
-
-export FORCE_CRATE_HASH="${BB_TASKHASH}"
-
-RUST_ALTERNATE_EXE_PATH ?= "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
-RUST_ALTERNATE_EXE_PATH_NATIVE = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config"
-
-# We don't want to use bitbakes vendoring because the rust sources do their
-# own vendoring.
-CARGO_DISABLE_BITBAKE_VENDORING = "1"
-
-# We can't use RUST_BUILD_SYS here because that may be "musl" if
-# TCLIBC="musl". Snapshots are always -unknown-linux-gnu
-setup_cargo_environment () {
-    # The first step is to build bootstrap and some early stage tools,
-    # these are build for the same target as the snapshot, e.g.
-    # x86_64-unknown-linux-gnu.
-    # Later stages are build for the native target (i.e. target.x86_64-linux)
-    cargo_common_do_configure
-}
-
-inherit rust-target-config
-
-do_rust_setup_snapshot () {
-    for installer in "${WORKDIR}/rust-snapshot-components/"*"/install.sh"; do
-        "${installer}" --prefix="${WORKDIR}/rust-snapshot" --disable-ldconfig
-    done
-
-    # Some versions of rust (e.g. 1.18.0) tries to find cargo in stage0/bin/cargo
-    # and fail without it there.
-    mkdir -p ${RUSTSRC}/build/${BUILD_SYS}
-    ln -sf ${WORKDIR}/rust-snapshot/ ${RUSTSRC}/build/${BUILD_SYS}/stage0
-
-    # Need to use uninative's loader if enabled/present since the library paths
-    # are used internally by rust and result in symbol mismatches if we don't
-    if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then
-        for bin in cargo rustc rustdoc; do
-            patchelf-uninative ${WORKDIR}/rust-snapshot/bin/$bin --set-interpreter ${UNINATIVE_LOADER}
-        done
-    fi
-}
-addtask rust_setup_snapshot after do_unpack before do_configure
-do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot"
-do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
-
-python do_configure() {
-    import json
-    try:
-        import configparser
-    except ImportError:
-        import ConfigParser as configparser
-
-    # toml is rather similar to standard ini like format except it likes values
-    # that look more JSON like. So for our purposes simply escaping all values
-    # as JSON seem to work fine.
-
-    e = lambda s: json.dumps(s)
-
-    config = configparser.RawConfigParser()
-
-    # [target.ARCH-poky-linux]
-    host_section = "target.{}".format(d.getVar('RUST_HOST_SYS', True))
-    config.add_section(host_section)
-
-    llvm_config_target = d.expand("${RUST_ALTERNATE_EXE_PATH}")
-    llvm_config_build = d.expand("${RUST_ALTERNATE_EXE_PATH_NATIVE}")
-    config.set(host_section, "llvm-config", e(llvm_config_target))
-
-    config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
-    config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
-    config.set(host_section, "linker", e(d.expand("${RUST_TARGET_CCLD}")))
-    if "musl" in host_section:
-        config.set(host_section, "musl-root", e(d.expand("${STAGING_DIR_HOST}${exec_prefix}")))
-
-    # If we don't do this rust-native will compile it's own llvm for BUILD.
-    # [target.${BUILD_ARCH}-unknown-linux-gnu]
-    build_section = "target.{}".format(d.getVar('RUST_BUILD_SYS', True))
-    if build_section != host_section:
-        config.add_section(build_section)
-
-        config.set(build_section, "llvm-config", e(llvm_config_build))
-
-        config.set(build_section, "cxx", e(d.expand("${RUST_BUILD_CXX}")))
-        config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}")))
-        config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}")))
-
-    target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True))
-    if target_section != host_section and target_section != build_section:
-        config.add_section(target_section)
-
-        config.set(target_section, "llvm-config", e(llvm_config_target))
-
-        config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
-        config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
-        config.set(target_section, "linker", e(d.expand("${RUST_TARGET_CCLD}")))
-
-    # [llvm]
-    config.add_section("llvm")
-    config.set("llvm", "static-libstdcpp", e(False))
-    if "llvm" in (d.getVar('TC_CXX_RUNTIME') or ""):
-        config.set("llvm", "use-libcxx", e(True))
-
-    # [rust]
-    config.add_section("rust")
-    config.set("rust", "rpath", e(True))
-    config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}")))
-
-    # Whether or not to optimize the compiler and standard library
-    config.set("rust", "optimize", e(True))
-
-    # Emits extraneous output from tests to ensure that failures of the test
-    # harness are debuggable just from logfiles
-    config.set("rust", "verbose-tests", e(True))
-
-    # [build]
-    config.add_section("build")
-    config.set("build", "submodules", e(False))
-    config.set("build", "docs", e(False))
-
-    rustc = d.expand("${WORKDIR}/rust-snapshot/bin/rustc")
-    config.set("build", "rustc", e(rustc))
-
-    # Support for the profiler runtime to generate e.g. coverage report,
-    # PGO etc.
-    config.set("build", "profiler", e(True))
-
-    cargo = d.expand("${WORKDIR}/rust-snapshot/bin/cargo")
-    config.set("build", "cargo", e(cargo))
-
-    config.set("build", "vendor", e(True))
-
-    if not "targets" in locals():
-        targets = [d.getVar("RUST_TARGET_SYS", True)]
-    config.set("build", "target", e(targets))
-
-    if not "hosts" in locals():
-        hosts = [d.getVar("RUST_HOST_SYS", True)]
-    config.set("build", "host", e(hosts))
-
-    # We can't use BUILD_SYS since that is something the rust snapshot knows
-    # nothing about when trying to build some stage0 tools (like fabricate)
-    config.set("build", "build", e(d.getVar("RUST_BUILD_SYS", True)))
-
-    # [install]
-    config.add_section("install")
-    # ./x.py install doesn't have any notion of "destdir"
-    # but we can prepend ${D} to all the directories instead
-    config.set("install", "prefix",  e(d.getVar("D", True) + d.getVar("prefix", True)))
-    config.set("install", "bindir",  e(d.getVar("D", True) + d.getVar("bindir", True)))
-    config.set("install", "libdir",  e(d.getVar("D", True) + d.getVar("libdir", True)))
-    config.set("install", "datadir", e(d.getVar("D", True) + d.getVar("datadir", True)))
-    config.set("install", "mandir",  e(d.getVar("D", True) + d.getVar("mandir", True)))
-
-    with open("config.toml", "w") as f:
-        f.write('changelog-seen = 2\n\n')
-        config.write(f)
-
-    # set up ${WORKDIR}/cargo_home
-    bb.build.exec_func("setup_cargo_environment", d)
-}
-
-
-rust_runx () {
-    echo "COMPILE ${PN}" "$@"
-
-    # CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
-    # wide range of targets (not just TARGET). Yocto's settings for them will
-    # be inappropriate, avoid using.
-    unset CFLAGS
-    unset LDFLAGS
-    unset CXXFLAGS
-    unset CPPFLAGS
-
-    export RUSTFLAGS="${RUST_DEBUG_REMAP}"
-
-    # Copy the natively built llvm-config into the target so we can run it. Horrible,
-    # but works!
-    if [ ${RUST_ALTERNATE_EXE_PATH_NATIVE} != ${RUST_ALTERNATE_EXE_PATH} ]; then
-        mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}`
-        cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH}
-        chrpath -d ${RUST_ALTERNATE_EXE_PATH}
-    fi
-
-    oe_cargo_fix_env
-
-    python3 src/bootstrap/bootstrap.py ${@oe.utils.parallel_make_argument(d, '-j %d')} "$@" --verbose
-}
-rust_runx[vardepsexclude] += "PARALLEL_MAKE"
-
-do_compile () {
-    rust_runx build
-}
-
-rust_do_install () {
-    mkdir -p ${D}${bindir}
-    cp build/${RUST_HOST_SYS}/stage2/bin/* ${D}${bindir}
-
-    mkdir -p ${D}${libdir}/rustlib
-    cp -pRd build/${RUST_HOST_SYS}/stage2/lib/* ${D}${libdir}
-    # Remove absolute symlink so bitbake doesn't complain
-    rm -f ${D}${libdir}/rustlib/src/rust
-}
-
-do_install () {
-    rust_do_install
-}
diff --git a/meta/recipes-devtools/rust/rust_1.66.0.bb b/meta/recipes-devtools/rust/rust_1.66.0.bb
index b39f772c5fe1..5192ec2ee11a 100644
--- a/meta/recipes-devtools/rust/rust_1.66.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.66.0.bb
@@ -1,4 +1,215 @@
-require rust-target.inc
+SUMMARY = "Rust compiler and runtime libaries"
+HOMEPAGE = "http://www.rust-lang.org"
+SECTION = "devel"
+LICENSE = "(MIT | Apache-2.0) & Unicode-TOU"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=92289ed52a60b63ab715612ad2915603"
+
+inherit rust
+inherit cargo_common
+
+DEPENDS += "file-native python3-native"
+DEPENDS:append:class-native = " rust-llvm-native"
+DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm"
+
+DEPENDS += "rust-llvm (=${PV})"
+
+# Otherwise we'll depend on what we provide
+INHIBIT_DEFAULT_RUST_DEPS:class-native = "1"
+# We don't need to depend on gcc-native because yocto assumes it exists
+PROVIDES:class-native = "virtual/${TARGET_PREFIX}rust"
+
+S = "${RUSTSRC}"
+
+# Use at your own risk, accepted values are stable, beta and nightly
+RUST_CHANNEL ?= "stable"
+PV .= "${@bb.utils.contains('RUST_CHANNEL', 'stable', '', '-${RUST_CHANNEL}', d)}"
+
+export FORCE_CRATE_HASH="${BB_TASKHASH}"
+
+RUST_ALTERNATE_EXE_PATH ?= "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
+RUST_ALTERNATE_EXE_PATH_NATIVE = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config"
+
+# We don't want to use bitbakes vendoring because the rust sources do their
+# own vendoring.
+CARGO_DISABLE_BITBAKE_VENDORING = "1"
+
+# We can't use RUST_BUILD_SYS here because that may be "musl" if
+# TCLIBC="musl". Snapshots are always -unknown-linux-gnu
+setup_cargo_environment () {
+    # The first step is to build bootstrap and some early stage tools,
+    # these are build for the same target as the snapshot, e.g.
+    # x86_64-unknown-linux-gnu.
+    # Later stages are build for the native target (i.e. target.x86_64-linux)
+    cargo_common_do_configure
+}
+
+inherit rust-target-config
+
+do_rust_setup_snapshot () {
+    for installer in "${WORKDIR}/rust-snapshot-components/"*"/install.sh"; do
+        "${installer}" --prefix="${WORKDIR}/rust-snapshot" --disable-ldconfig
+    done
+
+    # Some versions of rust (e.g. 1.18.0) tries to find cargo in stage0/bin/cargo
+    # and fail without it there.
+    mkdir -p ${RUSTSRC}/build/${BUILD_SYS}
+    ln -sf ${WORKDIR}/rust-snapshot/ ${RUSTSRC}/build/${BUILD_SYS}/stage0
+
+    # Need to use uninative's loader if enabled/present since the library paths
+    # are used internally by rust and result in symbol mismatches if we don't
+    if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then
+        for bin in cargo rustc rustdoc; do
+            patchelf-uninative ${WORKDIR}/rust-snapshot/bin/$bin --set-interpreter ${UNINATIVE_LOADER}
+        done
+    fi
+}
+addtask rust_setup_snapshot after do_unpack before do_configure
+do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot"
+do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
+
+python do_configure() {
+    import json
+    try:
+        import configparser
+    except ImportError:
+        import ConfigParser as configparser
+
+    # toml is rather similar to standard ini like format except it likes values
+    # that look more JSON like. So for our purposes simply escaping all values
+    # as JSON seem to work fine.
+
+    e = lambda s: json.dumps(s)
+
+    config = configparser.RawConfigParser()
+
+    # [target.ARCH-poky-linux]
+    host_section = "target.{}".format(d.getVar('RUST_HOST_SYS', True))
+    config.add_section(host_section)
+
+    llvm_config_target = d.expand("${RUST_ALTERNATE_EXE_PATH}")
+    llvm_config_build = d.expand("${RUST_ALTERNATE_EXE_PATH_NATIVE}")
+    config.set(host_section, "llvm-config", e(llvm_config_target))
+
+    config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
+    config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
+    config.set(host_section, "linker", e(d.expand("${RUST_TARGET_CCLD}")))
+    if "musl" in host_section:
+        config.set(host_section, "musl-root", e(d.expand("${STAGING_DIR_HOST}${exec_prefix}")))
+
+    # If we don't do this rust-native will compile it's own llvm for BUILD.
+    # [target.${BUILD_ARCH}-unknown-linux-gnu]
+    build_section = "target.{}".format(d.getVar('RUST_BUILD_SYS', True))
+    if build_section != host_section:
+        config.add_section(build_section)
+
+        config.set(build_section, "llvm-config", e(llvm_config_build))
+
+        config.set(build_section, "cxx", e(d.expand("${RUST_BUILD_CXX}")))
+        config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}")))
+        config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}")))
+
+    target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True))
+    if target_section != host_section and target_section != build_section:
+        config.add_section(target_section)
+
+        config.set(target_section, "llvm-config", e(llvm_config_target))
+
+        config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}")))
+        config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}")))
+        config.set(target_section, "linker", e(d.expand("${RUST_TARGET_CCLD}")))
+
+    # [llvm]
+    config.add_section("llvm")
+    config.set("llvm", "static-libstdcpp", e(False))
+    if "llvm" in (d.getVar('TC_CXX_RUNTIME') or ""):
+        config.set("llvm", "use-libcxx", e(True))
+
+    # [rust]
+    config.add_section("rust")
+    config.set("rust", "rpath", e(True))
+    config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}")))
+
+    # Whether or not to optimize the compiler and standard library
+    config.set("rust", "optimize", e(True))
+
+    # Emits extraneous output from tests to ensure that failures of the test
+    # harness are debuggable just from logfiles
+    config.set("rust", "verbose-tests", e(True))
+
+    # [build]
+    config.add_section("build")
+    config.set("build", "submodules", e(False))
+    config.set("build", "docs", e(False))
+
+    rustc = d.expand("${WORKDIR}/rust-snapshot/bin/rustc")
+    config.set("build", "rustc", e(rustc))
+
+    # Support for the profiler runtime to generate e.g. coverage report,
+    # PGO etc.
+    config.set("build", "profiler", e(True))
+
+    cargo = d.expand("${WORKDIR}/rust-snapshot/bin/cargo")
+    config.set("build", "cargo", e(cargo))
+
+    config.set("build", "vendor", e(True))
+
+    if not "targets" in locals():
+        targets = [d.getVar("RUST_TARGET_SYS", True)]
+    config.set("build", "target", e(targets))
+
+    if not "hosts" in locals():
+        hosts = [d.getVar("RUST_HOST_SYS", True)]
+    config.set("build", "host", e(hosts))
+
+    # We can't use BUILD_SYS since that is something the rust snapshot knows
+    # nothing about when trying to build some stage0 tools (like fabricate)
+    config.set("build", "build", e(d.getVar("RUST_BUILD_SYS", True)))
+
+    # [install]
+    config.add_section("install")
+    # ./x.py install doesn't have any notion of "destdir"
+    # but we can prepend ${D} to all the directories instead
+    config.set("install", "prefix",  e(d.getVar("D", True) + d.getVar("prefix", True)))
+    config.set("install", "bindir",  e(d.getVar("D", True) + d.getVar("bindir", True)))
+    config.set("install", "libdir",  e(d.getVar("D", True) + d.getVar("libdir", True)))
+    config.set("install", "datadir", e(d.getVar("D", True) + d.getVar("datadir", True)))
+    config.set("install", "mandir",  e(d.getVar("D", True) + d.getVar("mandir", True)))
+
+    with open("config.toml", "w") as f:
+        f.write('changelog-seen = 2\n\n')
+        config.write(f)
+
+    # set up ${WORKDIR}/cargo_home
+    bb.build.exec_func("setup_cargo_environment", d)
+}
+
+rust_runx () {
+    echo "COMPILE ${PN}" "$@"
+
+    # CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
+    # wide range of targets (not just TARGET). Yocto's settings for them will
+    # be inappropriate, avoid using.
+    unset CFLAGS
+    unset LDFLAGS
+    unset CXXFLAGS
+    unset CPPFLAGS
+
+    export RUSTFLAGS="${RUST_DEBUG_REMAP}"
+
+    # Copy the natively built llvm-config into the target so we can run it. Horrible,
+    # but works!
+    if [ ${RUST_ALTERNATE_EXE_PATH_NATIVE} != ${RUST_ALTERNATE_EXE_PATH} ]; then
+        mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}`
+        cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH}
+        chrpath -d ${RUST_ALTERNATE_EXE_PATH}
+    fi
+
+    oe_cargo_fix_env
+
+    python3 src/bootstrap/bootstrap.py ${@oe.utils.parallel_make_argument(d, '-j %d')} "$@" --verbose
+}
+rust_runx[vardepsexclude] += "PARALLEL_MAKE"
+
 require rust-source.inc
 require rust-snapshot.inc
 
@@ -35,6 +246,10 @@ RDEPENDS:${PN}-tools-rustfmt = "${PN}"
 SUMMARY:${PN}-tools-clippy = "A collection of lints to catch common mistakes and improve your Rust code"
 SUMMARY:${PN}-tools-rustfmt = "A tool for formatting Rust code according to style guidelines"
 
+do_install () {
+    rust_do_install
+}
+
 rust_do_install() {
     rust_runx install
 }
@@ -87,3 +302,4 @@ RUSTLIB_DEP:class-nativesdk = ""
 # musl builds include libunwind.a
 INSANE_SKIP:${PN} = "staticdev"
 
+BBCLASSEXTEND = "native nativesdk"
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 08/11] rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (6 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 07/11] rust: Merge .inc into .bb Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 09/11] cargo: Override crossbeam-utils with 0.8.14 Alex Kiernan
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Any consumer of rust-source (potentially) needs this, so move to
rust-source.inc

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

Changes in v4:
- Fixup `__stack_chk_fail_local` in musl-x86

 meta/recipes-devtools/rust/rust-source.inc | 5 +++++
 meta/recipes-devtools/rust/rust_1.66.0.bb  | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 91a6c5a942ae..b63e18ac95d2 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -11,3 +11,8 @@ RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src"
 
 UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html"
 UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src"
+
+# see recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+# we need to link with ssp_nonshared on musl to avoid "undefined reference to `__stack_chk_fail_local'"
+# when building MACHINE=qemux86 for musl
+WRAPPER_TARGET_EXTRALD:libc-musl = "-lssp_nonshared"
diff --git a/meta/recipes-devtools/rust/rust_1.66.0.bb b/meta/recipes-devtools/rust/rust_1.66.0.bb
index 5192ec2ee11a..f1ec769aef48 100644
--- a/meta/recipes-devtools/rust/rust_1.66.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.66.0.bb
@@ -292,11 +292,6 @@ rust_do_install:class-target() {
     rm ${D}${libdir}/rustlib/manifest*
 }
 
-# see recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
-# we need to link with ssp_nonshared on musl to avoid "undefined reference to `__stack_chk_fail_local'"
-# when building MACHINE=qemux86 for musl
-WRAPPER_TARGET_EXTRALD:libc-musl = "-lssp_nonshared"
-
 RUSTLIB_DEP:class-nativesdk = ""
 
 # musl builds include libunwind.a
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 09/11] cargo: Override crossbeam-utils with 0.8.14
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (7 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 08/11] rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 10/11] packagegroup-rust-sdk-target: Add cargo Alex Kiernan
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Use cargo patching to replace crossbeam-utils with the semver compatible
0.8.14 rather than trying to patch our local changes. This corrects the
ppc/mips builds.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

Changes in v4:
- Add crossbeam atomics fixes for ppc/mips

 meta/recipes-devtools/cargo/cargo_1.66.0.bb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-devtools/cargo/cargo_1.66.0.bb b/meta/recipes-devtools/cargo/cargo_1.66.0.bb
index fe8049b68c9b..909651b9efdd 100644
--- a/meta/recipes-devtools/cargo/cargo_1.66.0.bb
+++ b/meta/recipes-devtools/cargo/cargo_1.66.0.bb
@@ -14,6 +14,13 @@ LIC_FILES_CHKSUM = " \
 require recipes-devtools/rust/rust-source.inc
 require recipes-devtools/rust/rust-snapshot.inc
 
+# Reuse the path override capability we have to patch in a later version
+# of crossbeam-utils which has the vendor misdetection fixes
+# (https://github.com/crossbeam-rs/crossbeam/pull/922). This should be
+# removed once the upstream source merges the change to include it.
+SRC_URI:append:class-target = " crate://crates.io/crossbeam-utils/0.8.14"
+EXTRA_OECARGO_PATHS:class-target = "${CARGO_HOME}/bitbake/crossbeam-utils-0.8.14"
+
 S = "${RUSTSRC}/src/tools/cargo"
 CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
 EXCLUDE_FROM_WORLD = "1"
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 10/11] packagegroup-rust-sdk-target: Add cargo
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (8 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 09/11] cargo: Override crossbeam-utils with 0.8.14 Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-25 21:59 ` [OE-Core][PATCH v4 11/11] oeqa/runtime/rust: Add cargo test Alex Kiernan
  2022-12-26 18:33 ` [OE-Core][PATCH v4 00/11] Add rust runtime tests Richard Purdie
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v1)

 meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb
index 334b24900b4b..59874c4c2c81 100644
--- a/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb
@@ -10,4 +10,5 @@ inherit packagegroup
 
 RDEPENDS:${PN} = " \
     rust \
+    cargo \
 "
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [OE-Core][PATCH v4 11/11] oeqa/runtime/rust: Add cargo test
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (9 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 10/11] packagegroup-rust-sdk-target: Add cargo Alex Kiernan
@ 2022-12-25 21:59 ` Alex Kiernan
  2022-12-26 18:33 ` [OE-Core][PATCH v4 00/11] Add rust runtime tests Richard Purdie
  11 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-25 21:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

(no changes since v1)

 meta/lib/oeqa/runtime/cases/rust.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/meta/lib/oeqa/runtime/cases/rust.py b/meta/lib/oeqa/runtime/cases/rust.py
index 186bb0d79e15..c9c60e16fd2b 100644
--- a/meta/lib/oeqa/runtime/cases/rust.py
+++ b/meta/lib/oeqa/runtime/cases/rust.py
@@ -20,6 +20,8 @@ class RustCompileTest(OERuntimeTestCase):
     def tearDown(cls):
         files = '/tmp/test.rs /tmp/test'
         cls.tc.target.run('rm %s' % files)
+        dirs = '/tmp/hello'
+        cls.tc.target.run('rm -r %s' % dirs)
 
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OEHasPackage(['rust'])
@@ -32,6 +34,21 @@ class RustCompileTest(OERuntimeTestCase):
         msg = 'running compiled file failed, output: %s' % output
         self.assertEqual(status, 0, msg=msg)
 
+    @OETestDepends(['ssh.SSHTest.test_ssh'])
+    @OEHasPackage(['cargo'])
+    def test_cargo_compile(self):
+        status, output = self.target.run('cargo new /tmp/hello')
+        msg = 'cargo new failed, output: %s' % output
+        self.assertEqual(status, 0, msg=msg)
+
+        status, output = self.target.run('cargo build --manifest-path=/tmp/hello/Cargo.toml')
+        msg = 'cargo build failed, output: %s' % output
+        self.assertEqual(status, 0, msg=msg)
+
+        status, output = self.target.run('cargo run --manifest-path=/tmp/hello/Cargo.toml')
+        msg = 'running compiled file failed, output: %s' % output
+        self.assertEqual(status, 0, msg=msg)
+
 class RustHelloworldTest(OERuntimeTestCase):
     @OETestDepends(['ssh.SSHTest.test_ssh'])
     @OEHasPackage(['rust-hello-world'])
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
  2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
                   ` (10 preceding siblings ...)
  2022-12-25 21:59 ` [OE-Core][PATCH v4 11/11] oeqa/runtime/rust: Add cargo test Alex Kiernan
@ 2022-12-26 18:33 ` Richard Purdie
  2022-12-27 18:09   ` Alex Kiernan
  11 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2022-12-26 18:33 UTC (permalink / raw)
  To: Alex Kiernan, openembedded-core; +Cc: Kokkonda, Sundeep, Randy MacLeod

On Sun, 2022-12-25 at 21:59 +0000, Alex Kiernan wrote:
> This series adds runtime tests for rust and cargo, merges (most of) the
> include files into the base recipes and fixes target cargo builds.
> 
> Also add SDK_TOOLCHAIN_LANGS for selection of target toolchains as part
> of packagegroup-core-sdk.
> 
> Changes in v4:
> - Fixup `__stack_chk_fail_local` in musl-x86
> - Add crossbeam atomics fixes for ppc/mips
> 
> Changes in v3:
> - Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
>   (which defaults to SDK_TOOLCHAIN_LANGS)
> 
> Changes in v2:
> - Drop rust.inc/rust.bb merge, not actually made use of in the change
>   set
> - Reorder so cargo test goes after build fixes
> 
> Alex Kiernan (11):
>   rust-llvm: Merge .inc into .bb
>   rust-llvm: Update LLVM_VERSION to match embedded version
>   packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
>   packagegroup-core-sdk: Add SDK toolchain language selection support
>   cargo: Merge .inc into .bb
>   cargo: Extend DEBUG_PREFIX_MAP to cover vendor
>   rust: Merge .inc into .bb
>   rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
>   cargo: Override crossbeam-utils with 0.8.14
>   packagegroup-rust-sdk-target: Add cargo
>   oeqa/runtime/rust: Add cargo test

Looks much better thanks. There was one remaining issue which showed up
in testing with a reproducibility issue:

https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2119/steps/12/logs/stdio

We did already have an open bug for a rust reproducibility issue and we
excluded it from the tests until we could get to the bottom of it, I
suspect cargo may have the same issue. It frustrates me a bit as it is
the one reproducibility exclusion for core.

Ideally we would fix it but excluding it from the tests and noting it
in the bug may be an option if it is the same issue. It may be simpler
to reproduce and fix the issue with cargo too.

Cc: Sundeep who as been looking at it.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
  2022-12-26 18:33 ` [OE-Core][PATCH v4 00/11] Add rust runtime tests Richard Purdie
@ 2022-12-27 18:09   ` Alex Kiernan
  2022-12-28  0:00     ` Richard Purdie
  0 siblings, 1 reply; 21+ messages in thread
From: Alex Kiernan @ 2022-12-27 18:09 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core, Kokkonda, Sundeep, Randy MacLeod

On Mon, Dec 26, 2022 at 6:33 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Sun, 2022-12-25 at 21:59 +0000, Alex Kiernan wrote:
> > This series adds runtime tests for rust and cargo, merges (most of) the
> > include files into the base recipes and fixes target cargo builds.
> >
> > Also add SDK_TOOLCHAIN_LANGS for selection of target toolchains as part
> > of packagegroup-core-sdk.
> >
> > Changes in v4:
> > - Fixup `__stack_chk_fail_local` in musl-x86
> > - Add crossbeam atomics fixes for ppc/mips
> >
> > Changes in v3:
> > - Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
> >   (which defaults to SDK_TOOLCHAIN_LANGS)
> >
> > Changes in v2:
> > - Drop rust.inc/rust.bb merge, not actually made use of in the change
> >   set
> > - Reorder so cargo test goes after build fixes
> >
> > Alex Kiernan (11):
> >   rust-llvm: Merge .inc into .bb
> >   rust-llvm: Update LLVM_VERSION to match embedded version
> >   packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
> >   packagegroup-core-sdk: Add SDK toolchain language selection support
> >   cargo: Merge .inc into .bb
> >   cargo: Extend DEBUG_PREFIX_MAP to cover vendor
> >   rust: Merge .inc into .bb
> >   rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
> >   cargo: Override crossbeam-utils with 0.8.14
> >   packagegroup-rust-sdk-target: Add cargo
> >   oeqa/runtime/rust: Add cargo test
>
> Looks much better thanks. There was one remaining issue which showed up
> in testing with a reproducibility issue:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2119/steps/12/logs/stdio
>
> We did already have an open bug for a rust reproducibility issue and we
> excluded it from the tests until we could get to the bottom of it, I
> suspect cargo may have the same issue. It frustrates me a bit as it is
> the one reproducibility exclusion for core.
>
> Ideally we would fix it but excluding it from the tests and noting it
> in the bug may be an option if it is the same issue. It may be simpler
> to reproduce and fix the issue with cargo too.
>
> Cc: Sundeep who as been looking at it.
>

Just reading the ticket and the upstream ones... the upstream ticket
is closed as remap path fixes it (which it looks like it does to me),
there are build paths embedded in the build directory which don't get
caught by that, but they're in thing like bootstrap which isn't
packaged (which may or may not be an issue, but I'm suspecting not);
it kinda feels like we're missing something.

Can I get hold of the cargo packages generated here to have a poke at them?

-- 
Alex Kiernan


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
  2022-12-27 18:09   ` Alex Kiernan
@ 2022-12-28  0:00     ` Richard Purdie
  2022-12-28 14:51       ` Alex Kiernan
  0 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2022-12-28  0:00 UTC (permalink / raw)
  To: Alex Kiernan; +Cc: openembedded-core, Kokkonda, Sundeep, Randy MacLeod

On Tue, 2022-12-27 at 18:09 +0000, Alex Kiernan wrote:
> On Mon, Dec 26, 2022 at 6:33 PM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > 
> > On Sun, 2022-12-25 at 21:59 +0000, Alex Kiernan wrote:
> > > This series adds runtime tests for rust and cargo, merges (most of) the
> > > include files into the base recipes and fixes target cargo builds.
> > > 
> > > Also add SDK_TOOLCHAIN_LANGS for selection of target toolchains as part
> > > of packagegroup-core-sdk.
> > > 
> > > Changes in v4:
> > > - Fixup `__stack_chk_fail_local` in musl-x86
> > > - Add crossbeam atomics fixes for ppc/mips
> > > 
> > > Changes in v3:
> > > - Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
> > >   (which defaults to SDK_TOOLCHAIN_LANGS)
> > > 
> > > Changes in v2:
> > > - Drop rust.inc/rust.bb merge, not actually made use of in the change
> > >   set
> > > - Reorder so cargo test goes after build fixes
> > > 
> > > Alex Kiernan (11):
> > >   rust-llvm: Merge .inc into .bb
> > >   rust-llvm: Update LLVM_VERSION to match embedded version
> > >   packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
> > >   packagegroup-core-sdk: Add SDK toolchain language selection support
> > >   cargo: Merge .inc into .bb
> > >   cargo: Extend DEBUG_PREFIX_MAP to cover vendor
> > >   rust: Merge .inc into .bb
> > >   rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
> > >   cargo: Override crossbeam-utils with 0.8.14
> > >   packagegroup-rust-sdk-target: Add cargo
> > >   oeqa/runtime/rust: Add cargo test
> > 
> > Looks much better thanks. There was one remaining issue which showed up
> > in testing with a reproducibility issue:
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2119/steps/12/logs/stdio
> > 
> > We did already have an open bug for a rust reproducibility issue and we
> > excluded it from the tests until we could get to the bottom of it, I
> > suspect cargo may have the same issue. It frustrates me a bit as it is
> > the one reproducibility exclusion for core.
> > 
> > Ideally we would fix it but excluding it from the tests and noting it
> > in the bug may be an option if it is the same issue. It may be simpler
> > to reproduce and fix the issue with cargo too.
> > 
> > Cc: Sundeep who as been looking at it.
> > 
> 
> Just reading the ticket and the upstream ones... the upstream ticket
> is closed as remap path fixes it (which it looks like it does to me),
> there are build paths embedded in the build directory which don't get
> caught by that, but they're in thing like bootstrap which isn't
> packaged (which may or may not be an issue, but I'm suspecting not);
> it kinda feels like we're missing something.
> 
> Can I get hold of the cargo packages generated here to have a poke at them?

Yes. The key line in the log is:

022-12-26 11:56:30,555 - oe-selftest - INFO - Non-reproducible packages will be copied to /srv/autobuilder/autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk

i.e.

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk

where you'll find both the package files and diffoscope output:

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk/packages/diff-html/

which seems to be saying the symbol table changed size which is
unusual. I didn't look very deeply.

Cheers,

Richard






^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
  2022-12-28  0:00     ` Richard Purdie
@ 2022-12-28 14:51       ` Alex Kiernan
  2022-12-29 12:53         ` Richard Purdie
  0 siblings, 1 reply; 21+ messages in thread
From: Alex Kiernan @ 2022-12-28 14:51 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core, Kokkonda, Sundeep, Randy MacLeod

On Wed, Dec 28, 2022 at 12:01 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2022-12-27 at 18:09 +0000, Alex Kiernan wrote:
> > On Mon, Dec 26, 2022 at 6:33 PM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > >
> > > On Sun, 2022-12-25 at 21:59 +0000, Alex Kiernan wrote:
> > > > This series adds runtime tests for rust and cargo, merges (most of) the
> > > > include files into the base recipes and fixes target cargo builds.
> > > >
> > > > Also add SDK_TOOLCHAIN_LANGS for selection of target toolchains as part
> > > > of packagegroup-core-sdk.
> > > >
> > > > Changes in v4:
> > > > - Fixup `__stack_chk_fail_local` in musl-x86
> > > > - Add crossbeam atomics fixes for ppc/mips
> > > >
> > > > Changes in v3:
> > > > - Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
> > > >   (which defaults to SDK_TOOLCHAIN_LANGS)
> > > >
> > > > Changes in v2:
> > > > - Drop rust.inc/rust.bb merge, not actually made use of in the change
> > > >   set
> > > > - Reorder so cargo test goes after build fixes
> > > >
> > > > Alex Kiernan (11):
> > > >   rust-llvm: Merge .inc into .bb
> > > >   rust-llvm: Update LLVM_VERSION to match embedded version
> > > >   packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
> > > >   packagegroup-core-sdk: Add SDK toolchain language selection support
> > > >   cargo: Merge .inc into .bb
> > > >   cargo: Extend DEBUG_PREFIX_MAP to cover vendor
> > > >   rust: Merge .inc into .bb
> > > >   rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
> > > >   cargo: Override crossbeam-utils with 0.8.14
> > > >   packagegroup-rust-sdk-target: Add cargo
> > > >   oeqa/runtime/rust: Add cargo test
> > >
> > > Looks much better thanks. There was one remaining issue which showed up
> > > in testing with a reproducibility issue:
> > >
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2119/steps/12/logs/stdio
> > >
> > > We did already have an open bug for a rust reproducibility issue and we
> > > excluded it from the tests until we could get to the bottom of it, I
> > > suspect cargo may have the same issue. It frustrates me a bit as it is
> > > the one reproducibility exclusion for core.
> > >
> > > Ideally we would fix it but excluding it from the tests and noting it
> > > in the bug may be an option if it is the same issue. It may be simpler
> > > to reproduce and fix the issue with cargo too.
> > >
> > > Cc: Sundeep who as been looking at it.
> > >
> >
> > Just reading the ticket and the upstream ones... the upstream ticket
> > is closed as remap path fixes it (which it looks like it does to me),
> > there are build paths embedded in the build directory which don't get
> > caught by that, but they're in thing like bootstrap which isn't
> > packaged (which may or may not be an issue, but I'm suspecting not);
> > it kinda feels like we're missing something.
> >
> > Can I get hold of the cargo packages generated here to have a poke at them?
>
> Yes. The key line in the log is:
>
> 022-12-26 11:56:30,555 - oe-selftest - INFO - Non-reproducible packages will be copied to /srv/autobuilder/autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk
>
> i.e.
>
> https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk
>
> where you'll find both the package files and diffoscope output:
>
> https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk/packages/diff-html/
>
> which seems to be saying the symbol table changed size which is
> unusual. I didn't look very deeply.
>

Upstream has this ticket which, given how I did the patching for
cargo, feels like the right kind of thing (rust has something similar
out of the box):

https://github.com/rust-lang/rust/issues/98185

I've switched it around so that it uses local patching rather than
cargo patching, which if it is this, seems like it might resolve it.

--
Alex Kiernan


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
  2022-12-28 14:51       ` Alex Kiernan
@ 2022-12-29 12:53         ` Richard Purdie
  2022-12-29 19:25           ` Alex Kiernan
  0 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2022-12-29 12:53 UTC (permalink / raw)
  To: Alex Kiernan; +Cc: openembedded-core, Kokkonda, Sundeep, Randy MacLeod

On Wed, 2022-12-28 at 14:51 +0000, Alex Kiernan wrote:
> On Wed, Dec 28, 2022 at 12:01 AM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > 
> > On Tue, 2022-12-27 at 18:09 +0000, Alex Kiernan wrote:
> > > On Mon, Dec 26, 2022 at 6:33 PM Richard Purdie
> > > <richard.purdie@linuxfoundation.org> wrote:
> > > > 
> > > > On Sun, 2022-12-25 at 21:59 +0000, Alex Kiernan wrote:
> > > > > This series adds runtime tests for rust and cargo, merges (most of) the
> > > > > include files into the base recipes and fixes target cargo builds.
> > > > > 
> > > > > Also add SDK_TOOLCHAIN_LANGS for selection of target toolchains as part
> > > > > of packagegroup-core-sdk.
> > > > > 
> > > > > Changes in v4:
> > > > > - Fixup `__stack_chk_fail_local` in musl-x86
> > > > > - Add crossbeam atomics fixes for ppc/mips
> > > > > 
> > > > > Changes in v3:
> > > > > - Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
> > > > >   (which defaults to SDK_TOOLCHAIN_LANGS)
> > > > > 
> > > > > Changes in v2:
> > > > > - Drop rust.inc/rust.bb merge, not actually made use of in the change
> > > > >   set
> > > > > - Reorder so cargo test goes after build fixes
> > > > > 
> > > > > Alex Kiernan (11):
> > > > >   rust-llvm: Merge .inc into .bb
> > > > >   rust-llvm: Update LLVM_VERSION to match embedded version
> > > > >   packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
> > > > >   packagegroup-core-sdk: Add SDK toolchain language selection support
> > > > >   cargo: Merge .inc into .bb
> > > > >   cargo: Extend DEBUG_PREFIX_MAP to cover vendor
> > > > >   rust: Merge .inc into .bb
> > > > >   rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
> > > > >   cargo: Override crossbeam-utils with 0.8.14
> > > > >   packagegroup-rust-sdk-target: Add cargo
> > > > >   oeqa/runtime/rust: Add cargo test
> > > > 
> > > > Looks much better thanks. There was one remaining issue which showed up
> > > > in testing with a reproducibility issue:
> > > > 
> > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2119/steps/12/logs/stdio
> > > > 
> > > > We did already have an open bug for a rust reproducibility issue and we
> > > > excluded it from the tests until we could get to the bottom of it, I
> > > > suspect cargo may have the same issue. It frustrates me a bit as it is
> > > > the one reproducibility exclusion for core.
> > > > 
> > > > Ideally we would fix it but excluding it from the tests and noting it
> > > > in the bug may be an option if it is the same issue. It may be simpler
> > > > to reproduce and fix the issue with cargo too.
> > > > 
> > > > Cc: Sundeep who as been looking at it.
> > > > 
> > > 
> > > Just reading the ticket and the upstream ones... the upstream ticket
> > > is closed as remap path fixes it (which it looks like it does to me),
> > > there are build paths embedded in the build directory which don't get
> > > caught by that, but they're in thing like bootstrap which isn't
> > > packaged (which may or may not be an issue, but I'm suspecting not);
> > > it kinda feels like we're missing something.
> > > 
> > > Can I get hold of the cargo packages generated here to have a poke at them?
> > 
> > Yes. The key line in the log is:
> > 
> > 022-12-26 11:56:30,555 - oe-selftest - INFO - Non-reproducible packages will be copied to /srv/autobuilder/autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk
> > 
> > i.e.
> > 
> > https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk
> > 
> > where you'll find both the package files and diffoscope output:
> > 
> > https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk/packages/diff-html/
> > 
> > which seems to be saying the symbol table changed size which is
> > unusual. I didn't look very deeply.
> > 
> 
> Upstream has this ticket which, given how I did the patching for
> cargo, feels like the right kind of thing (rust has something similar
> out of the box):
> 
> https://github.com/rust-lang/rust/issues/98185
> 
> I've switched it around so that it uses local patching rather than
> cargo patching, which if it is this, seems like it might resolve it.

It was a different issue, thanks for tracking that down and fixing it!

The tests all passed so I merged the v5 series. Thanks for working
through things, I think this makes our rust situation much more robust
and should help future proof it :)

Cheers,

Richard


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
  2022-12-29 12:53         ` Richard Purdie
@ 2022-12-29 19:25           ` Alex Kiernan
  0 siblings, 0 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-29 19:25 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core, Kokkonda, Sundeep, Randy MacLeod

On Thu, Dec 29, 2022 at 12:53 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2022-12-28 at 14:51 +0000, Alex Kiernan wrote:
> > On Wed, Dec 28, 2022 at 12:01 AM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > >
> > > On Tue, 2022-12-27 at 18:09 +0000, Alex Kiernan wrote:
> > > > On Mon, Dec 26, 2022 at 6:33 PM Richard Purdie
> > > > <richard.purdie@linuxfoundation.org> wrote:
> > > > >
> > > > > On Sun, 2022-12-25 at 21:59 +0000, Alex Kiernan wrote:
> > > > > > This series adds runtime tests for rust and cargo, merges (most of) the
> > > > > > include files into the base recipes and fixes target cargo builds.
> > > > > >
> > > > > > Also add SDK_TOOLCHAIN_LANGS for selection of target toolchains as part
> > > > > > of packagegroup-core-sdk.
> > > > > >
> > > > > > Changes in v4:
> > > > > > - Fixup `__stack_chk_fail_local` in musl-x86
> > > > > > - Add crossbeam atomics fixes for ppc/mips
> > > > > >
> > > > > > Changes in v3:
> > > > > > - Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
> > > > > >   (which defaults to SDK_TOOLCHAIN_LANGS)
> > > > > >
> > > > > > Changes in v2:
> > > > > > - Drop rust.inc/rust.bb merge, not actually made use of in the change
> > > > > >   set
> > > > > > - Reorder so cargo test goes after build fixes
> > > > > >
> > > > > > Alex Kiernan (11):
> > > > > >   rust-llvm: Merge .inc into .bb
> > > > > >   rust-llvm: Update LLVM_VERSION to match embedded version
> > > > > >   packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
> > > > > >   packagegroup-core-sdk: Add SDK toolchain language selection support
> > > > > >   cargo: Merge .inc into .bb
> > > > > >   cargo: Extend DEBUG_PREFIX_MAP to cover vendor
> > > > > >   rust: Merge .inc into .bb
> > > > > >   rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
> > > > > >   cargo: Override crossbeam-utils with 0.8.14
> > > > > >   packagegroup-rust-sdk-target: Add cargo
> > > > > >   oeqa/runtime/rust: Add cargo test
> > > > >
> > > > > Looks much better thanks. There was one remaining issue which showed up
> > > > > in testing with a reproducibility issue:
> > > > >
> > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/2119/steps/12/logs/stdio
> > > > >
> > > > > We did already have an open bug for a rust reproducibility issue and we
> > > > > excluded it from the tests until we could get to the bottom of it, I
> > > > > suspect cargo may have the same issue. It frustrates me a bit as it is
> > > > > the one reproducibility exclusion for core.
> > > > >
> > > > > Ideally we would fix it but excluding it from the tests and noting it
> > > > > in the bug may be an option if it is the same issue. It may be simpler
> > > > > to reproduce and fix the issue with cargo too.
> > > > >
> > > > > Cc: Sundeep who as been looking at it.
> > > > >
> > > >
> > > > Just reading the ticket and the upstream ones... the upstream ticket
> > > > is closed as remap path fixes it (which it looks like it does to me),
> > > > there are build paths embedded in the build directory which don't get
> > > > caught by that, but they're in thing like bootstrap which isn't
> > > > packaged (which may or may not be an issue, but I'm suspecting not);
> > > > it kinda feels like we're missing something.
> > > >
> > > > Can I get hold of the cargo packages generated here to have a poke at them?
> > >
> > > Yes. The key line in the log is:
> > >
> > > 022-12-26 11:56:30,555 - oe-selftest - INFO - Non-reproducible packages will be copied to /srv/autobuilder/autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk
> > >
> > > i.e.
> > >
> > > https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk
> > >
> > > where you'll find both the package files and diffoscope output:
> > >
> > > https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20221226-0vk5efsk/packages/diff-html/
> > >
> > > which seems to be saying the symbol table changed size which is
> > > unusual. I didn't look very deeply.
> > >
> >
> > Upstream has this ticket which, given how I did the patching for
> > cargo, feels like the right kind of thing (rust has something similar
> > out of the box):
> >
> > https://github.com/rust-lang/rust/issues/98185
> >
> > I've switched it around so that it uses local patching rather than
> > cargo patching, which if it is this, seems like it might resolve it.
>
> It was a different issue, thanks for tracking that down and fixing it!
>

I'm not so sure - there's a .cargo/config.toml in the vendored rustc
tarball which explicitly patches one of the vendored sources (it feels
odd, but hey...), so I think we'll trip over this issue (assuming
that's what the problem is).

> The tests all passed so I merged the v5 series. Thanks for working
> through things, I think this makes our rust situation much more robust
> and should help future proof it :)
>

:)

-- 
Alex Kiernan


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
       [not found]   ` <17345100F004118F.27785@lists.openembedded.org>
@ 2022-12-26 11:15     ` Richard Purdie
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Purdie @ 2022-12-26 11:15 UTC (permalink / raw)
  To: Alex Kiernan, Patches and discussions about the oe-core layer

On Mon, 2022-12-26 at 10:27 +0000, Richard Purdie via
lists.openembedded.org wrote:
> On Mon, 2022-12-26 at 09:41 +0000, Alex Kiernan wrote:
> > There's something odd happened here. Three of the patches in the
> > previous version I posted look to have been merged in poky, but not
> > oe-core? I thought the flow was from oe-core into poky.
> 
> I'd attempted to take three of them into master-next to try and move
> things along a little with testing. It looks like I've messed something
> up. I'll try and reconcile things, thanks for pointing it out. Not sure
> how I managed this!

I can only think I ran some commands in the wrong terminal window. The
simplest thing for me to do was to bring the branches into sync which
I've done, which means some of the series did merge. I don't think that
should be a problem and we can build incrementally on it.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
  2022-12-26  9:41 ` Alex Kiernan
@ 2022-12-26 10:27   ` Richard Purdie
       [not found]   ` <17345100F004118F.27785@lists.openembedded.org>
  1 sibling, 0 replies; 21+ messages in thread
From: Richard Purdie @ 2022-12-26 10:27 UTC (permalink / raw)
  To: Alex Kiernan, Patches and discussions about the oe-core layer

On Mon, 2022-12-26 at 09:41 +0000, Alex Kiernan wrote:
> There's something odd happened here. Three of the patches in the
> previous version I posted look to have been merged in poky, but not
> oe-core? I thought the flow was from oe-core into poky.

I'd attempted to take three of them into master-next to try and move
things along a little with testing. It looks like I've messed something
up. I'll try and reconcile things, thanks for pointing it out. Not sure
how I managed this!

Cheers,

Richard


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [OE-Core][PATCH v4 00/11] Add rust runtime tests
       [not found] <17342835AC830076.27785@lists.openembedded.org>
@ 2022-12-26  9:41 ` Alex Kiernan
  2022-12-26 10:27   ` Richard Purdie
       [not found]   ` <17345100F004118F.27785@lists.openembedded.org>
  0 siblings, 2 replies; 21+ messages in thread
From: Alex Kiernan @ 2022-12-26  9:41 UTC (permalink / raw)
  To: Richard Purdie, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3069 bytes --]

There's something odd happened here. Three of the patches in the previous
version I posted look to have been merged in poky, but not oe-core? I
thought the flow was from oe-core into poky.

On Sun, 25 Dec 2022, 21:59 Alex Kiernan via lists.openembedded.org,
<alex.kiernan=gmail.com@lists.openembedded.org> wrote:

>
> This series adds runtime tests for rust and cargo, merges (most of) the
> include files into the base recipes and fixes target cargo builds.
>
> Also add SDK_TOOLCHAIN_LANGS for selection of target toolchains as part
> of packagegroup-core-sdk.
>
> Changes in v4:
> - Fixup `__stack_chk_fail_local` in musl-x86
> - Add crossbeam atomics fixes for ppc/mips
>
> Changes in v3:
> - Switch to packagegroup-core-sdk driven from TARGET_TOOLCHAIN_LANGS
>   (which defaults to SDK_TOOLCHAIN_LANGS)
>
> Changes in v2:
> - Drop rust.inc/rust.bb merge, not actually made use of in the change
>   set
> - Reorder so cargo test goes after build fixes
>
> Alex Kiernan (11):
>   rust-llvm: Merge .inc into .bb
>   rust-llvm: Update LLVM_VERSION to match embedded version
>   packagegroup-rust-sdk-target: Add Rust SDK target packagegroup
>   packagegroup-core-sdk: Add SDK toolchain language selection support
>   cargo: Merge .inc into .bb
>   cargo: Extend DEBUG_PREFIX_MAP to cover vendor
>   rust: Merge .inc into .bb
>   rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source
>   cargo: Override crossbeam-utils with 0.8.14
>   packagegroup-rust-sdk-target: Add cargo
>   oeqa/runtime/rust: Add cargo test
>
>  meta/lib/oeqa/runtime/cases/rust.py           |  17 ++
>  .../packagegroups/packagegroup-core-sdk.bb    |  10 +-
>  .../packagegroup-rust-sdk-target.bb           |  14 ++
>  meta/recipes-devtools/cargo/cargo.inc         |  69 ------
>  meta/recipes-devtools/cargo/cargo_1.66.0.bb   |  80 ++++++-
>  meta/recipes-devtools/rust/rust-llvm.inc      |  78 ------
>  .../recipes-devtools/rust/rust-llvm_1.66.0.bb |  82 ++++++-
>  meta/recipes-devtools/rust/rust-source.inc    |   5 +
>  meta/recipes-devtools/rust/rust-target.inc    |  10 -
>  meta/recipes-devtools/rust/rust.inc           | 223 ------------------
>  meta/recipes-devtools/rust/rust_1.66.0.bb     | 223 +++++++++++++++++-
>  11 files changed, 420 insertions(+), 391 deletions(-)
>  create mode 100644 meta/recipes-core/packagegroups/
> packagegroup-rust-sdk-target.bb
>  delete mode 100644 meta/recipes-devtools/cargo/cargo.inc
>  delete mode 100644 meta/recipes-devtools/rust/rust-llvm.inc
>  delete mode 100644 meta/recipes-devtools/rust/rust-target.inc
>  delete mode 100644 meta/recipes-devtools/rust/rust.inc
>
> --
> 2.39.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#174995):
> https://lists.openembedded.org/g/openembedded-core/message/174995
> Mute This Topic: https://lists.openembedded.org/mt/95880347/3618097
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kiernan@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 5005 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-12-29 19:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-25 21:59 [OE-Core][PATCH v4 00/11] Add rust runtime tests Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 01/11] rust-llvm: Merge .inc into .bb Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 02/11] rust-llvm: Update LLVM_VERSION to match embedded version Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 03/11] packagegroup-rust-sdk-target: Add Rust SDK target packagegroup Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 04/11] packagegroup-core-sdk: Add SDK toolchain language selection support Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 05/11] cargo: Merge .inc into .bb Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 06/11] cargo: Extend DEBUG_PREFIX_MAP to cover vendor Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 07/11] rust: Merge .inc into .bb Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 08/11] rust: Move musl-x86 fix for `__stack_chk_fail_local` to rust-source Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 09/11] cargo: Override crossbeam-utils with 0.8.14 Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 10/11] packagegroup-rust-sdk-target: Add cargo Alex Kiernan
2022-12-25 21:59 ` [OE-Core][PATCH v4 11/11] oeqa/runtime/rust: Add cargo test Alex Kiernan
2022-12-26 18:33 ` [OE-Core][PATCH v4 00/11] Add rust runtime tests Richard Purdie
2022-12-27 18:09   ` Alex Kiernan
2022-12-28  0:00     ` Richard Purdie
2022-12-28 14:51       ` Alex Kiernan
2022-12-29 12:53         ` Richard Purdie
2022-12-29 19:25           ` Alex Kiernan
     [not found] <17342835AC830076.27785@lists.openembedded.org>
2022-12-26  9:41 ` Alex Kiernan
2022-12-26 10:27   ` Richard Purdie
     [not found]   ` <17345100F004118F.27785@lists.openembedded.org>
2022-12-26 11:15     ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.