diff mbox series

rust: Fix cross compilation error for rust-testuite

Message ID 20220904070859.2706350-1-pgowda.cve@gmail.com
State New
Headers show
Series rust: Fix cross compilation error for rust-testuite | expand

Commit Message

pgowda cve Sept. 4, 2022, 7:08 a.m. UTC
From: pgowda <pgowda.cve@gmail.com>

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

Signed-off-by: pgowda <pgowda.cve@gmail.com>
---
 meta/recipes-devtools/rust/rust.inc | 3 +++
 1 file changed, 3 insertions(+)

Comments

Richard Purdie Sept. 4, 2022, 9:41 p.m. UTC | #1
On Sun, 2022-09-04 at 12:38 +0530, pgowda.cve@gmail.com wrote:
> From: pgowda <pgowda.cve@gmail.com>
> 
> Fixes the following error while building the rust-testuite
> error: linker cc not found
> 
> Signed-off-by: pgowda <pgowda.cve@gmail.com>
> ---
>  meta/recipes-devtools/rust/rust.inc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
> index 284347dedc..a3d93eca4a 100644
> --- a/meta/recipes-devtools/rust/rust.inc
> +++ b/meta/recipes-devtools/rust/rust.inc
> @@ -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
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc
index 284347dedc..a3d93eca4a 100644
--- a/meta/recipes-devtools/rust/rust.inc
+++ b/meta/recipes-devtools/rust/rust.inc
@@ -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))