Skip to contentSkip to conversation

rust: Fix cross compilation error for rust-testuite

PATCH In review [email protected] 2 participants 2 messages Sep 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: Fix cross compilation error for rust-testuite

From: pgowda <[email protected]>

Fixes the following error while building the rust-testuite
error: linker cc not found

---
 meta/recipes-devtools/rust/rust.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/rust/rust.inc +3 -0
index 284347dedc..a3d93eca4a 100644
@@ -116,6 +116,9 @@ python do_configure() {
     # Whether or not to optimize the compiler and standard library
     config.set("rust", "optimize", e(True))
 
+    # Override default linker cc.
+    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
+
     # [build]
     config.add_section("build")
     config.set("build", "submodules", e(False))
Signature · 1 line
2.25.1
#1 lore raw
Quoted 15 lines · On Sun, 2022-09-04 at 12:38 +0530, [email protected] wrote:

From: pgowda <[email protected]>

Fixes the following error while building the rust-testuite
error: linker cc not found

---
 meta/recipes-devtools/rust/rust.inc | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/rust/rust.inc +0 -0
index 284347dedc..a3d93eca4a 100644

meta/recipes-devtools/rust/rust.inc python do_configure() { · line 124

Quoted 9 lines
meta/recipes-devtools/rust/rust.inc +3 -0
@@ -116,6 +116,9 @@ python do_configure() {
     # Whether or not to optimize the compiler and standard library
     config.set("rust", "optimize", e(True))
 
+    # Override default linker cc.
+    config.set("rust", "default-linker", e(d.expand("${RUST_BUILD_CCLD}")))
+
     # [build]
     config.add_section("build")
     config.set("build", "submodules", e(False))

I suspect this is resulting in:

WARNING: rust-1.63.0-r0 do_package_qa: QA Issue: File /usr/lib/librustc_driver-f2e4e0d5a644441f.so in package rust contains reference to TMPDIR [buildpaths]

https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/5731
https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/5809

and more. Certainly one of the patches is causing this :(

Cheers,

Richard