diff mbox series

[2/2] rust-source: Fix remove_gcc_directory

Message ID 20250329152143.1609731-2-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 1aee0bc109c1457159440c279ddc1fe5a8d89586
Headers show
Series [1/2] lttng-tools: Update patch status | expand

Commit Message

Richard Purdie March 29, 2025, 3:21 p.m. UTC
The patch works for rust-native but not other recipes which change ${S}.
Set it to use the correct path so it works for llvm-rust, cargo and others,
maximising the space saving.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/rust/rust-source.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 92bb5e4779f..820cdc16e2a 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -17,7 +17,7 @@  RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src"
 #After updating to Rust 1.85 we can revert this removal of "src/gcc"
 remove_gcc_directory() {
     # Ensure the gcc directory exists
-    gcc_dir="${S}/src/gcc"
+    gcc_dir="${RUSTSRC}/src/gcc"
     if [ -d "$gcc_dir" ]; then
         rm -rf "$gcc_dir"
     fi