@@ -450,6 +450,7 @@ STRIP = $(CROSS_COMPILE)strip
450
450
endif
451
451
RUSTC = rustc
452
452
CARGO = cargo
453
+ BINDGEN = bindgen
453
454
PAHOLE = pahole
454
455
RESOLVE_BTFIDS = $(objtree ) /tools/bpf/resolve_btfids/resolve_btfids
455
456
LEX = flex
@@ -513,8 +514,9 @@ KBUILD_RUSTCFLAGS :=
513
514
# TODO: another option is using explicit target specs, e.g.
514
515
# `--target=$(srctree)/arch/$(SRCARCH)/rust-target-spec.json`
515
516
KBUILD_CARGOFLAGS := $(CARGO_VERBOSE ) --locked \
516
- -Z build-std=core,alloc -Z unstable-options \
517
- --out-dir=out --target=x86_64-linux-kernel
517
+ -Z build-std=core,alloc \
518
+ -Z unstable-options \
519
+ --target=x86_64-linux-kernel
518
520
KBUILD_AFLAGS_KERNEL :=
519
521
KBUILD_CFLAGS_KERNEL :=
520
522
KBUILD_RUSTCFLAGS_KERNEL :=
@@ -528,7 +530,7 @@ export KBUILD_LDS_MODULE := $(srctree)/scripts/module-common.lds
528
530
KBUILD_LDFLAGS :=
529
531
CLANG_FLAGS :=
530
532
531
- export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC RUSTC CARGO
533
+ export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC RUSTC CARGO BINDGEN
532
534
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
533
535
export PERL PYTHON PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
534
536
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
@@ -728,7 +730,7 @@ $(KCONFIG_CONFIG):
728
730
# This exploits the 'multi-target pattern rule' trick.
729
731
# The syncconfig should be executed only once to make all the targets.
730
732
# (Note: use the grouped target '&:' when we bump to GNU Make 4.3)
731
- % /config/auto.conf % /config/auto.conf.cmd % /generated/autoconf.h : $(KCONFIG_CONFIG )
733
+ % /config/auto.conf % /config/auto.conf.cmd % /generated/autoconf.h % /generated/rust_cfg : $(KCONFIG_CONFIG )
732
734
$(Q )$(MAKE ) -f $(srctree ) /Makefile syncconfig
733
735
else # !may-sync-config
734
736
# External modules and some install targets need include/generated/autoconf.h
0 commit comments