X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Fblackfin%2Fcpu%2FMakefile;h=cfbcd3124fd482a65058861e61d72249f91c2a5e;hb=4564faeafbf11feb839e2e3f927be2f1a919ba96;hp=9bf544d8006aed80c6702e60d537da3c03820073;hpb=36fde45c8bd23c187e4b9377ea80e0aebdcfe69f;p=oweals%2Fu-boot.git diff --git a/arch/blackfin/cpu/Makefile b/arch/blackfin/cpu/Makefile index 9bf544d800..cfbcd3124f 100644 --- a/arch/blackfin/cpu/Makefile +++ b/arch/blackfin/cpu/Makefile @@ -14,7 +14,7 @@ extra-y += initcode.o extra-y += start.o obj-y := interrupt.o cache.o obj-y += cpu.o -obj-$(CONFIG_ADI_GPIO1) += gpio.o +obj-y += gpio.o obj-y += interrupts.o obj-$(CONFIG_JTAG_CONSOLE) += jtag-console.o obj-y += os_log.o @@ -22,22 +22,13 @@ obj-y += reset.o obj-y += traps.o extra-y += check_initcode - -extra-y += bootrom-asm-offsets.h -$(obj)bootrom-asm-offsets.c: bootrom-asm-offsets.c.in bootrom-asm-offsets.awk - echo '#include ' | $(CPP) $(CPPFLAGS) - | gawk -f ./bootrom-asm-offsets.awk > $@.tmp - mv $@.tmp $@ -$(obj)bootrom-asm-offsets.s: $(obj)bootrom-asm-offsets.c - $(CC) $(CFLAGS) -S $^ -o $@.tmp - mv $@.tmp $@ -$(obj)bootrom-asm-offsets.h: $(obj)bootrom-asm-offsets.s - sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" $^ > $@ +clean-files := init.lds # make sure our initcode (which goes into LDR) does not # have relocs or external references -$(obj)initcode.o: CFLAGS += -fno-function-sections -fno-data-sections +CFLAGS_REMOVE_initcode.o := -ffunction-sections -fdata-sections READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $< -$(obj)check_initcode: $(obj)initcode.o +$(obj)/check_initcode: $(obj)/initcode.o ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) @if $(READINIT) | grep '\.*\' ; then \ echo "$< contains external references!" 1>&2 ; \ @@ -45,7 +36,10 @@ ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) fi endif -$(obj)init.lds: init.lds.S - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@ -$(obj)init.elf: $(obj)init.lds $(obj)init.o $(obj)initcode.o - $(LD) $(LDFLAGS) -T $^ -o $@ +CPPFLAGS_init.lds := -ansi + +quiet_cmd_link_init = LD $@ + cmd_link_init = $(LD) $(LDFLAGS) -T $^ -o $@ +$(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o + $(call if_changed,link_init) +targets += init.lds init.o