Move flags for preprocessing linker scripts to rule
PATCH 1/1 Move flags for preprocessing linker scripts to rule
Move CPPFLAGS_vmlinux.lds settings into the .lds.S -> .lds rule. Any of the remaining CPPFLAGS definitions for .lds.S preprocessing sets this options.
Add -undef to avoid definition of any system-specific macros. This makes the explicit undefines unnecessary.
Signed-off-by Bastian Blank <[email protected]>
---
Makefile | 5 ----- scripts/Makefile.build | 2 +- 2 files changed, 1 insertions(+), 6 deletions(-)
Makefile +0 -5
@@ -827,11 +827,6 @@ prepare0: archprepare FORCE # All the preparing.. prepare prepare-all: prepare0 -# Leave this as default for preprocessing vmlinux.lds.S, which is now -# done in arch/$(ARCH)/kernel/Makefile - -export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) - # Single targets # ---------------------------------------------------------------------------
scripts/Makefile.build +1 -1
@@ -234,7 +234,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $( # Linker scripts preprocessor (.lds.S -> .lds) # --------------------------------------------------------------------------- quiet_cmd_cpp_lds_S = LDS $@ - cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $< + cmd_cpp_lds_S = $(CPP) -P -C -undef $(cpp_flags) -D__ASSEMBLY__ -o $@ $< %.lds: %.lds.S FORCE $(call if_changed_dep,cpp_lds_S)
Signature · 2 lines
You! What PLANET is this! -- McCoy, "The City on the Edge of Forever", stardate 3134.0
Hi Bastian.
Quoted 3 lines
Move
CPPFLAGS_vmlinux.ldssettings into the.lds.S-> .lds rule. Any of the remaining CPPFLAGS definitions for.lds.Spreprocessing sets this options.
I fail to see how arch specific settings are picked up. See for example um that set CPPFLAGS_vmlinux in arch/um/Makefile. There is no way this value is visible when buiding arch/um/kernel/Makefile.
Sam