From patchwork Wed Nov 4 14:33:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1394026 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=GWY/44uq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CR8L60MYPz9sTL for ; Thu, 5 Nov 2020 01:34:21 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1B30B823FC; Wed, 4 Nov 2020 15:34:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="GWY/44uq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D7BBE824C5; Wed, 4 Nov 2020 15:34:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D914E823FC for ; Wed, 4 Nov 2020 15:34:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B673820709; Wed, 4 Nov 2020 14:34:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604500450; bh=U7LZ4UGK/vO5jGkyZiGZVY0gVhl130YI8mVNAMIqhyY=; h=From:To:Cc:Subject:Date:From; b=GWY/44uqd1sCblzjbmIoDVFGCfCp+Dqf+6vwURYTRcCia9KvjOO3rRvLBZA7a0ze3 q4+GiqrkbjAtrwrHTwhiqTnxb8721pylJVjmurbW71U8cbmqgdE4dclmIDK9K1whle DOzuWAB9r6N6zPgrBe/Lz6M1YorPRBnoC7u/hRmo= Received: by pali.im (Postfix) id 345A153E; Wed, 4 Nov 2020 15:34:08 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Patrick DELAUNAY , Tom Rini , Simon Glass Cc: u-boot@lists.denx.de Subject: [PATCH] Makefile: Do not call useless command 'true' Date: Wed, 4 Nov 2020 15:33:44 +0100 Message-Id: <20201104143344.2279-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Macro 'cmd_objcopy_uboot' currently does not work with passed empty command expanded from 'cmd_static_rela' and therefore dummy command 'true' is set in 'cmd_static_rela' to workaround this issue. Eliminate it now by fixing 'cmd_objcopy_uboot' macro to work also with empty 'cmd_static_rela' macro and remove useless invocation of command 'true'. Signed-off-by: Pali Rohár Reviewed-by: Simon Glass --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b90fe8b865..aeb2c17a9b 100644 --- a/Makefile +++ b/Makefile @@ -885,7 +885,7 @@ cmd_static_rela = \ tools/relocate-rela $(3) $(4) $$start $$end else quiet_cmd_static_rela = -cmd_static_rela = true +cmd_static_rela = endif # Always append INPUTS so that arch config.mk's can add custom ones @@ -1312,7 +1312,11 @@ endif shell_cmd = { $(call echo-cmd,$(1)) $(cmd_$(1)); } quiet_cmd_objcopy_uboot = OBJCOPY $@ +ifdef cmd_static_rela cmd_objcopy_uboot = $(cmd_objcopy) && $(call shell_cmd,static_rela,$<,$@,$(CONFIG_SYS_TEXT_BASE)) || { rm -f $@; false; } +else +cmd_objcopy_uboot = $(cmd_objcopy) +endif u-boot-nodtb.bin: u-boot FORCE $(call if_changed,objcopy_uboot)