Commit ad0fed46b97d3b46e9a5be2a45ff77536544926b

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent 982a1199c9

kbuild: use shorten log for linking u-boot

Move sandbox-specific link rule to arch/sandbox/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Showing 2 changed files with 18 additions and 19 deletions Side-by-side Diff

... ... @@ -738,7 +738,7 @@
738 738 endif
739 739 endif
740 740  
741   -LDFLAGS_u-boot += -T u-boot.lds $(LDFLAGS_FINAL)
  741 +LDFLAGS_u-boot += $(LDFLAGS_FINAL)
742 742 ifneq ($(CONFIG_SYS_TEXT_BASE),)
743 743 LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
744 744 endif
745 745  
746 746  
... ... @@ -913,27 +913,22 @@
913 913 --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \
914 914 -Ttext=$(CONFIG_SYS_TEXT_BASE)
915 915  
916   -ifeq ($(CONFIG_SANDBOX),y)
917   -GEN_UBOOT = \
918   - $(CC) $(SYMS) -T u-boot.lds \
919   - -Wl,--start-group $(u-boot-main) -Wl,--end-group \
920   - $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot
921   -else
922   -GEN_UBOOT = \
923   - $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
924   - $(u-boot-init) \
925   - --start-group $(u-boot-main) --end-group $(PLATFORM_LIBS) \
926   - -Map u-boot.map -o u-boot
927   -endif
  916 +# Rule to link u-boot
  917 +# May be overridden by arch/$(ARCH)/config.mk
  918 +quiet_cmd_u-boot__ ?= LD $@
  919 + cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \
  920 + -T u-boot.lds $(u-boot-init) \
  921 + --start-group $(u-boot-main) --end-group \
  922 + $(PLATFORM_LIBS) -Map u-boot.map
928 923  
929 924 u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds
930   - $(GEN_UBOOT)
  925 + $(call if_changed,u-boot__)
931 926 ifeq ($(CONFIG_KALLSYMS),y)
932   - smap=`$(call SYSTEM_MAP,u-boot) | \
933   - awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
934   - $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
935   - -c $(srctree)/common/system_map.c -o common/system_map.o
936   - $(GEN_UBOOT) common/system_map.o
  927 + smap=`$(call SYSTEM_MAP,u-boot) | \
  928 + awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
  929 + $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
  930 + -c $(srctree)/common/system_map.c -o common/system_map.o
  931 + $(call cmd,u-boot__) common/system_map.o
937 932 endif
938 933  
939 934 # The actual objects are generated when descending,
arch/sandbox/config.mk
... ... @@ -7,4 +7,8 @@
7 7  
8 8 # Support generic board on sandbox
9 9 __HAVE_ARCH_GENERIC_BOARD := y
  10 +
  11 +cmd_u-boot__ = $(CC) -o $@ -T u-boot.lds \
  12 + -Wl,--start-group $(u-boot-main) -Wl,--end-group \
  13 + $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map