diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst index f7b30ae9cac2..74f2c42da6d1 100644 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst @@ -96,13 +96,6 @@ HOSTRUSTFLAGS ------------- Additional flags to be passed to $(HOSTRUSTC) when building host programs. -PROCMACROLDFLAGS -------------- -Additional flags to be passed when linking Rust proc macros. Since proc macros -are loaded by rustc at build time, they must be linked in a way that is -compatible with the rustc toolchain being used. If unset, it defaults to -$(HOSTLDFLAGS). - HOSTLDFLAGS ----------- Additional flags to be passed when linking host programs. diff --git a/Makefile b/Makefile index 3aab3eede1cc..2c33fbafd59e 100644 --- a/Makefile +++ b/Makefile @@ -483,7 +483,6 @@ KBUILD_HOSTCXXFLAGS := -Wall -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS) \ -I $(srctree)/scripts/include KBUILD_HOSTRUSTFLAGS := $(rust_common_flags) -O -Cstrip=debuginfo \ -Zallow-features= $(HOSTRUSTFLAGS) -KBUILD_PROCMACROLDFLAGS := $(or $(PROCMACROLDFLAGS),$(HOSTLDFLAGS)) KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS) KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS) diff --git a/rust/Makefile b/rust/Makefile index 3cd4dba4e1b6..b5e0a73b78f3 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -336,7 +336,7 @@ quiet_cmd_rustc_procmacro = $(RUSTC_OR_CLIPPY_QUIET) P $@ cmd_rustc_procmacro = \ $(RUSTC_OR_CLIPPY) $(rust_common_flags) \ -Clinker-flavor=gcc -Clinker=$(HOSTCC) \ - -Clink-args='$(call escsq,$(KBUILD_PROCMACROLDFLAGS))' \ + -Clink-args='$(call escsq,$(KBUILD_HOSTLDFLAGS))' \ --emit=dep-info=$(depfile) --emit=link=$@ --extern proc_macro \ --crate-type proc-macro \ --crate-name $(patsubst lib%.so,%,$(notdir $@)) $<