[U-Boot-Users] [PATCH] Fix 8xx build to conditionally compile fdt.o

Change to COBJS-y method so that the fdt.o library can be properly conditionally compiled. Without this change, the mpc8xx boards that don't use CONFIG_OF_LIBFDT still build the fdt.o, causing code bloat and compile warnings.
Signed-off-by: Gerald Van Baren vanbaren@cideas.com ---
Hi Wolfgang,
Commit a6f5f317cd074bbbfa2aab4fca05904c811c19fb added fdt.o unconditionally. 8xx : Add OF support to Adder875 board port - resubmit
I don't have any 8xx boards (especially no Adder boards) so I cannot verify the patch doesn't break the boards, but it does compile cleanly both with and w/o CONFIG_OF_LIBFDT.
Best regards, gvb
cpu/mpc8xx/Makefile | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/cpu/mpc8xx/Makefile b/cpu/mpc8xx/Makefile index dbdc2e0..a800210 100644 --- a/cpu/mpc8xx/Makefile +++ b/cpu/mpc8xx/Makefile @@ -28,14 +28,28 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).a
START = start.o kgdb.o -COBJS = bedbug_860.o commproc.o cpu.o cpu_init.o \ - fec.o fdt.o i2c.o interrupts.o lcd.o scc.o \ - serial.o speed.o spi.o \ - traps.o upatch.o video.o + +COBJS-y += bedbug_860.o +COBJS-y += commproc.o +COBJS-y += cpu.o +COBJS-y += cpu_init.o +COBJS-y += fec.o +COBJS-y += i2c.o +COBJS-y += lcd.o +COBJS-y += interrupts.o +COBJS-y += scc.o +COBJS-y += serial.o +COBJS-y += speed.o +COBJS-y += spi.o +COBJS-y += traps.o +COBJS-y += upatch.o +COBJS-y += video.o +COBJS-$(CONFIG_OF_LIBFDT) += fdt.o + SOBJS = plprcr_write.o
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) START := $(addprefix $(obj),$(START))
all: $(obj).depend $(START) $(LIB)

In message 20080330020631.GA3868@cideas.com you wrote:
Change to COBJS-y method so that the fdt.o library can be properly conditionally compiled. Without this change, the mpc8xx boards that don't use CONFIG_OF_LIBFDT still build the fdt.o, causing code bloat and compile warnings.
Signed-off-by: Gerald Van Baren vanbaren@cideas.com
Unfortunately this doesn't apply any more. Could you please rebase and resubmit? Thanks in advance.
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
In message 20080330020631.GA3868@cideas.com you wrote:
Change to COBJS-y method so that the fdt.o library can be properly conditionally compiled. Without this change, the mpc8xx boards that don't use CONFIG_OF_LIBFDT still build the fdt.o, causing code bloat and compile warnings.
Signed-off-by: Gerald Van Baren vanbaren@cideas.com
Unfortunately this doesn't apply any more. Could you please rebase and resubmit? Thanks in advance.
Best regards,
Wolfgang Denk
Hi Wolfgang,
I abandoned this patch, Jean-Christoph wrote a better version that I picked up and *has been already applied* to u-boot master repo by way of the u-boot-fdt repo.
Reference: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/39324
Thanks, gvb
participants (2)
-
Jerry Van Baren
-
Wolfgang Denk