Patchwork powerpc: Only build prom_init.o when CONFIG_PPC_OF_BOOT_TRAMPOLINE=y

login
register
mail settings
Submitter Michael Ellerman
Date June 11, 2009, 12:12 p.m.
Message ID <6631719f88ad0e9231d95656e9d34306637a93fc.1244722339.git.michael@ellerman.id.au>
Download mbox | patch
Permalink /patch/28563/
State Accepted, archived
Commit 7719ed7ce814aa89c6af082f6773dddc93c6f237
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Michael Ellerman - June 11, 2009, 12:12 p.m.
Commit 28794d34 ("powerpc/kconfig: Kill PPC_MULTIPLATFORM"), added
CONFIG_PPC_OF_BOOT_TRAMPOLINE to control the buliding of prom_init.o

However the Makefile still unconditionally builds prom_init_check,
the script that checks prom_init.o for symbol usage, and so in turn
prom_init.o is still always being built. (it's not linked though)

So surround all the prom_init_check logic with an ifeq block testing
if CONFIG_PPC_OF_BOOT_TRAMPOLINE is set.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 110ec6d..655b724 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -124,6 +124,7 @@  PHONY += systbl_chk
 systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i
 	$(call cmd,systbl_chk)
 
+ifeq ($(CONFIG_PPC_OF_BOOT_TRAMPOLINE),y)
 $(obj)/built-in.o:		prom_init_check
 
 quiet_cmd_prom_init_check = CALL    $<
@@ -132,5 +133,6 @@  quiet_cmd_prom_init_check = CALL    $<
 PHONY += prom_init_check
 prom_init_check: $(src)/prom_init_check.sh $(obj)/prom_init.o
 	$(call cmd,prom_init_check)
+endif
 
 clean-files := vmlinux.lds