diff mbox series

[meta-lts-mixins,scarthgap/rust,18/37] classes/rust: remove unused variables

Message ID e8706f519b88341119f9b945cf286109b4cec0ed.1789156653.git.scott.murray@konsulko.com
State New
Headers show
Series Update to 1.98.1 | expand

Commit Message

Scott Murray Sept. 11, 2026, 8:13 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

RUSTC_ARCHFLAGS is never passed anywhere, remove it.

RUSTC_BUILD_LDFLAGS is commented out, remove it.

HOST_CFLAGS et al are assigned to the CFLAGS for convenience, but are
not used anywhere and the same values are exported in cargo_common's
oe_cargo_fix_env().

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(adapted from oe-core commit 6a5a31690508483498e09eb286ca7147130e5852)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 classes-recipe/rust.bbclass | 22 ----------------------
 1 file changed, 22 deletions(-)
diff mbox series

Patch

diff --git a/classes-recipe/rust.bbclass b/classes-recipe/rust.bbclass
index e727601..6407c10 100644
--- a/classes-recipe/rust.bbclass
+++ b/classes-recipe/rust.bbclass
@@ -8,8 +8,6 @@  inherit rust-common
 
 RUSTC = "rustc"
 
-RUSTC_ARCHFLAGS += "--target=${RUST_HOST_SYS} ${RUSTFLAGS}"
-
 def rust_base_dep(d):
     # Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to
     # use rust instead of gcc
@@ -23,26 +21,6 @@  def rust_base_dep(d):
 
 DEPENDS:append = " ${@rust_base_dep(d)}"
 
-# BUILD_LDFLAGS
-# 	${STAGING_LIBDIR_NATIVE}
-# 	${STAGING_BASE_LIBDIR_NATIVE}
-# BUILDSDK_LDFLAGS
-# 	${STAGING_LIBDIR}
-# 	#{STAGING_DIR_HOST}
-# TARGET_LDFLAGS ?????
-#RUSTC_BUILD_LDFLAGS = "\
-#	--sysroot ${STAGING_DIR_NATIVE} \
-#	-L${STAGING_LIBDIR_NATIVE}	\
-#	-L${STAGING_BASE_LIBDIR_NATIVE}	\
-#"
-
-# XXX: for some reason bitbake sets BUILD_* & TARGET_* but uses the bare
-# variables for HOST. Alias things to make it easier for us.
-HOST_LDFLAGS  ?= "${LDFLAGS}"
-HOST_CFLAGS   ?= "${CFLAGS}"
-HOST_CXXFLAGS ?= "${CXXFLAGS}"
-HOST_CPPFLAGS ?= "${CPPFLAGS}"
-
 rustlib_suffix = "${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${RUST_HOST_SYS}/lib"
 # Native sysroot standard library path
 rustlib_src = "${prefix}/lib/${rustlib_suffix}"