@@ -87,6 +87,9 @@ CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)-
# $(DEBIAN)/rules.d/hooks.mk and $(DEBIAN)/rules.d/$(arch).mk files
#
export gcc?=gcc-14
+export rustc?=rustc
+export rustfmt?=rustfmt
+export bindgen?=bindgen
GCC_BUILD_DEPENDS=\ $(gcc), $(gcc)-aarch64-linux-gnu [arm64] <cross>, $(gcc)-arm-linux-gnueabihf [armhf] <cross>, $(gcc)-powerpc64le-linux-gnu [ppc64el] <cross>, $(gcc)-riscv64-linux-gnu [riscv64] <cross>, $(gcc)-s390x-linux-gnu [s390x] <cross>, $(gcc)-x86-64-linux-gnu [amd64] <cross>,
abidir := $(CURDIR)/$(DEBIAN)/__abi.current/$(arch)
@@ -197,6 +200,10 @@ kmake = make ARCH=$(build_arch) \
CROSS_COMPILE=$(CROSS_COMPILE) \
HOSTCC=$(HOSTCC) \
CC=$(CROSS_COMPILE)$(gcc) \
+ RUSTC=$(rustc) \
+ HOSTRUSTC=$(rustc) \
+ RUSTFMT=$(rustfmt) \
+ BINDGEN=$(bindgen) \
KERNELRELEASE=$(abi_release)-$(target_flavour) \
CONFIG_DEBUG_SECTION_MISMATCH=y \
KBUILD_BUILD_VERSION="$(uploadnum)" \
BugLink: https://bugs.launchpad.net/bugs/2084693 The rustc compiler and friends should be matching certain versions when compiling a backported kernel. Backports of the tools do not use the same namespace as the native versions in order to co-exist. For that reason we need a method to pass in the exact name of the rustc, rustfmt, and bindgen to use. This change should be picked up by oracular and later in the main source to allow this to be done in any derivative and backport. Signed-off-by: Stefan Bader <stefan.bader@canonical.com> --- debian/rules.d/0-common-vars.mk | 7 +++++++ 1 file changed, 7 insertions(+)