public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Deepesh.Varatharajan@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: Randy.MacLeod@windriver.com, Sundeep.Kokkonda@windriver.com,
	Deepesh.Varatharajan@windriver.com
Subject: [RFC 4/4] rust: Fix rust build failure
Date: Tue,  3 Feb 2026 06:03:28 -0800	[thread overview]
Message-ID: <20260203140337.1971735-5-Deepesh.Varatharajan@windriver.com> (raw)
In-Reply-To: <20260203140337.1971735-1-Deepesh.Varatharajan@windriver.com>

From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>

Target LLVM tools are installed in the sysroot for llvm-lit, which causes
Rust to pick up a target llvm-config that cannot run on the host. Overwrite
it with the native llvm-config so Rust can execute it correctly.

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
---
 meta/recipes-devtools/rust/rust_1.92.0.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/rust/rust_1.92.0.bb b/meta/recipes-devtools/rust/rust_1.92.0.bb
index a25f65f674..b1d8597056 100644
--- a/meta/recipes-devtools/rust/rust_1.92.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.92.0.bb
@@ -234,9 +234,10 @@ rust_runx () {
 
     # 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} -a ! -f ${RUST_ALTERNATE_EXE_PATH} ]; then
+    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}
+        rm -f ${RUST_ALTERNATE_EXE_PATH}
+        cp -f ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH}
         patchelf --remove-rpath ${RUST_ALTERNATE_EXE_PATH}
     fi
 
-- 
2.49.0



  parent reply	other threads:[~2026-02-03 14:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 14:03 [RFC 0/4] Oe-selftest for Clang, LLVM, LLD Deepesh.Varatharajan
2026-02-03 14:03 ` [RFC 1/4] clang-tools-extra: disable tests Deepesh.Varatharajan
2026-02-03 14:03 ` [RFC 2/4] clang: Enable tests for llvm, clang, lld Deepesh.Varatharajan
2026-02-03 16:08   ` [OE-core] " Peter Kjellerstedt
2026-02-04  5:34     ` Deepesh Varatharajan
2026-02-03 14:03 ` [RFC 3/4] oeqa/selftest/clang: Add selftest for Clang/LLVM/LLD Deepesh.Varatharajan
2026-02-03 14:03 ` Deepesh.Varatharajan [this message]
2026-02-12 16:34 ` [RFC 0/4] Oe-selftest for Clang, LLVM, LLD Deepesh Varatharajan
2026-02-12 18:01   ` [OE-core] " Alexander Kanavin
2026-02-15  8:54 ` Mathieu Dubois-Briand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260203140337.1971735-5-Deepesh.Varatharajan@windriver.com \
    --to=deepesh.varatharajan@windriver.com \
    --cc=Randy.MacLeod@windriver.com \
    --cc=Sundeep.Kokkonda@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox