From patchwork Mon Feb 24 02:12:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 323419 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 556A82C00BA for ; Mon, 24 Feb 2014 13:12:57 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1E51B4B613; Mon, 24 Feb 2014 03:12:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 40hNHcBl6OJp; Mon, 24 Feb 2014 03:12:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DF60F4B5EC; Mon, 24 Feb 2014 03:12:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 00EC74B604 for ; Mon, 24 Feb 2014 03:12:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l1rXcC1ZgF6k for ; Mon, 24 Feb 2014 03:12:37 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 21DE44B5EC for ; Mon, 24 Feb 2014 03:12:32 +0100 (CET) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile13) with ESMTP id s1O2CRDm021058; Mon, 24 Feb 2014 11:12:27 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili16) with ESMTP id s1O2CRM24913; Mon, 24 Feb 2014 11:12:27 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi15) id s1O2CRPQ023254; Mon, 24 Feb 2014 11:12:27 +0900 Received: from poodle by lomi15.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s1O2CQgN023132; Mon, 24 Feb 2014 11:12:26 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 94F442743A5E; Mon, 24 Feb 2014 11:12:26 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 24 Feb 2014 11:12:18 +0900 Message-Id: <1393207943-3725-11-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1393207943-3725-1-git-send-email-yamada.m@jp.panasonic.com> References: <1393207943-3725-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [PATCH v2 10/15] kbuild: use shorten log for linking u-boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Move sandbox-specific link rule to arch/sandbox/config.mk. Signed-off-by: Masahiro Yamada --- Changes in v2: None Makefile | 33 ++++++++++++++------------------- arch/sandbox/config.mk | 4 ++++ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 091902c..adb40e4 100644 --- a/Makefile +++ b/Makefile @@ -738,7 +738,7 @@ endif endif endif -LDFLAGS_u-boot += -T u-boot.lds $(LDFLAGS_FINAL) +LDFLAGS_u-boot += $(LDFLAGS_FINAL) ifneq ($(CONFIG_SYS_TEXT_BASE),) LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) endif @@ -913,27 +913,22 @@ u-boot.elf: u-boot.bin --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \ -Ttext=$(CONFIG_SYS_TEXT_BASE) -ifeq ($(CONFIG_SANDBOX),y) -GEN_UBOOT = \ - $(CC) $(SYMS) -T u-boot.lds \ - -Wl,--start-group $(u-boot-main) -Wl,--end-group \ - $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot -else -GEN_UBOOT = \ - $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ - $(u-boot-init) \ - --start-group $(u-boot-main) --end-group $(PLATFORM_LIBS) \ - -Map u-boot.map -o u-boot -endif +# Rule to link u-boot +# May be overridden by arch/$(ARCH)/config.mk +quiet_cmd_u-boot__ ?= LD $@ + cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \ + -T u-boot.lds $(u-boot-init) \ + --start-group $(u-boot-main) --end-group \ + $(PLATFORM_LIBS) -Map u-boot.map u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds - $(GEN_UBOOT) + $(call if_changed,u-boot__) ifeq ($(CONFIG_KALLSYMS),y) - smap=`$(call SYSTEM_MAP,u-boot) | \ - awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ - $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \ - -c $(srctree)/common/system_map.c -o common/system_map.o - $(GEN_UBOOT) common/system_map.o + smap=`$(call SYSTEM_MAP,u-boot) | \ + awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ + $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \ + -c $(srctree)/common/system_map.c -o common/system_map.o + $(call cmd,u-boot__) common/system_map.o endif # The actual objects are generated when descending, diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 6142dd4..23b057e 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -7,3 +7,7 @@ PLATFORM_LIBS += -lrt # Support generic board on sandbox __HAVE_ARCH_GENERIC_BOARD := y + +cmd_u-boot__ = $(CC) -o $@ -T u-boot.lds \ + -Wl,--start-group $(u-boot-main) -Wl,--end-group \ + $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map