From 8b1ed53e62c0cc124d12acdd55af582cd4f4feb8 Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Tue, 15 Aug 2023 14:45:47 +0200 Subject: [PATCH] UBUNTU: [Packaging] depend on clang/libclang-15 for Rust Make sure to use clang/libclang-15 for Rust, since the default clang/libclang-16 has some build incompatibilities with gcc-13, triggering the following error: BINDGEN rust/bindings/bindings_generated.rs thread 'main' panicked at '"ftrace_branch_data_union_(anonymous_at__/_/include/linux/compiler_types_h_146_2)" is not a valid Ident', +/build/rust-bindgen-0.56-DgAMvF/rust-bindgen-0.56-0.56.0/debian/vendor/proc-macro2-1.0.24/src/fallback.rs:693:9 Signed-off-by: Andrea Righi --- debian.master/control.stub.in | 2 ++ debian/rules.d/0-common-vars.mk | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in index 07c3096377cf..5b98a45e40cf 100644 --- a/debian.master/control.stub.in +++ b/debian.master/control.stub.in @@ -39,6 +39,8 @@ Build-Depends: curl , zstd , pahole [amd64 arm64 armhf ppc64el s390x riscv64] | dwarves (>= 1.21) [amd64 arm64 armhf ppc64el s390x riscv64] , + clang-15 [amd64], + libclang-15 [amd64], rustc-1.68 [amd64], rust-1.68-src [amd64], rustfmt-1.68 [amd64], diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 9da797f0f690..410de315afba 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -239,7 +239,7 @@ kmake = make ARCH=$(build_arch) \ HOSTCC=$(HOSTCC) \ CC=$(CROSS_COMPILE)$(gcc) \ RUSTC=rustc-1.68 HOSTRUSTC=rustc-1.68 BINDGEN=bindgen-0.56 RUSTFMT=/usr/lib/rust-1.68/bin/rustfmt RUST_LIB_SRC=/usr/src/rustc-1.68.2/library \ - CLANG_PATH=clang-14 LIBCLANG_PATH=/usr/lib/llvm-14/lib \ + CLANG_PATH=clang-15 LIBCLANG_PATH=/usr/lib/llvm-15/lib \ KERNELVERSION=$(abi_release)-$(target_flavour) \ CONFIG_DEBUG_SECTION_MISMATCH=y \ KBUILD_BUILD_VERSION="$(uploadnum)" \