From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1BD9C4338F for ; Mon, 2 Aug 2021 13:20:51 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3415960F70 for ; Mon, 2 Aug 2021 13:20:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3415960F70 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 03C92833B1; Mon, 2 Aug 2021 15:20:29 +0200 (CEST) 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 (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="IO6CDxQl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E73C0833B1; Mon, 2 Aug 2021 15:20:05 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ABF57833B6 for ; Mon, 2 Aug 2021 15:19:51 +0200 (CEST) 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: by mail.kernel.org (Postfix) with ESMTPSA id E6A9F60FC4; Mon, 2 Aug 2021 13:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627910390; bh=PoTEB5hrd5lyjRxC7acAZWtvnF3zHdVaq/iWPv41cic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IO6CDxQltNaNFELPVP/GiJjmxROk+1v3YJwuulfWpYUKtfvEfaE+5AmyYbdQ/NhkW 2GiI8+uMsTqGQgfhYC32mXmkrgWmHnlKQ6cvcPEuKsRNXokr7gBI/ViEBjnW3ch83s nU73th0vNL8rgaYZA54rFsHGhcpER/BK9cPai+xmJWc4sgCBymO8XR7xHR26rHxb33 HoTiw7DKCk8zXkaoz1hX3n90l+Cwet+M5RDkRyQKE5lB8vBhuk59VwsofKoRLpx3gX 9fCDfUN0RvAc1zjquNQ3cTbJLLV/K29E26mFC7/6jbO+pFFYAzMqx+E+z40oAvynaB k61vuhTyNpQYQ== Received: by pali.im (Postfix) id A55FBB98; Mon, 2 Aug 2021 15:19:49 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Simon Glass , Heinrich Schuchardt , Alexander Graf , Huan Wang , Angelo Dureghello , Wolfgang Denk , Priyanka Jain , Christophe Leroy , Bin Meng , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Tom Rini Cc: u-boot@lists.denx.de Subject: [PATCH 04/11] version: Move version_string[] from version.h to version_string.h Date: Mon, 2 Aug 2021 15:18:31 +0200 Message-Id: <20210802131838.21097-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210802131838.21097-1-pali@kernel.org> References: <20210802131838.21097-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean More C files do not use compile time timestamp macros and do not have to be recompiled every time when SOURCE_DATE_EPOCH changes. This patch moves version_string[] from version.h to version_string.h and updates other C files which only needs version_string[] string to include version_string.h instead of version.h. After applying this patch these files are not recompiled every time when SOURCE_DATE_EPOCH changes. Signed-off-by: Pali Rohár --- board/ge/b1x5v2/b1x5v2.c | 2 +- board/ge/bx50v3/bx50v3.c | 2 +- board/ge/mx53ppd/mx53ppd.c | 2 +- cmd/version.c | 1 + common/main.c | 2 +- drivers/video/cfb_console.c | 3 +-- include/version.h | 3 --- include/version_string.h | 8 ++++++++ lib/display_options.c | 2 +- lib/efi_loader/efi_tcg2.c | 2 +- test/print_ut.c | 2 +- 11 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 include/version_string.h diff --git a/board/ge/b1x5v2/b1x5v2.c b/board/ge/b1x5v2/b1x5v2.c index de4cb0d5afaa..a2cbd1512e92 100644 --- a/board/ge/b1x5v2/b1x5v2.c +++ b/board/ge/b1x5v2/b1x5v2.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include "../common/vpd_reader.h" diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index 7fcebba02600..ed700f4e1da5 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include "../common/ge_rtc.h" diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c index 6174125e728a..f540fe1f3668 100644 --- a/board/ge/mx53ppd/mx53ppd.c +++ b/board/ge/mx53ppd/mx53ppd.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include "ppd_gpio.h" #include diff --git a/cmd/version.c b/cmd/version.c index 685b458ce262..965ac2e2144d 100644 --- a/cmd/version.c +++ b/cmd/version.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #ifdef CONFIG_SYS_COREBOOT #include diff --git a/common/main.c b/common/main.c index ae5bcdb32f8b..3f5214fd44b8 100644 --- a/common/main.c +++ b/common/main.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include static void run_preboot_environment_command(void) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 1f491a48d6a7..a19c96755681 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -71,7 +71,7 @@ #include #include #include -#include +#include #include #include #include @@ -108,7 +108,6 @@ * Console device */ -#include #include #include #include diff --git a/include/version.h b/include/version.h index 2d24451569d5..0a3b29adb89a 100644 --- a/include/version.h +++ b/include/version.h @@ -16,7 +16,4 @@ #define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING -#ifndef __ASSEMBLY__ -extern const char version_string[]; -#endif /* __ASSEMBLY__ */ #endif /* __VERSION_H__ */ diff --git a/include/version_string.h b/include/version_string.h new file mode 100644 index 000000000000..a89a6e43705e --- /dev/null +++ b/include/version_string.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __VERSION_STRING_H__ +#define __VERSION_STRING_H__ + +extern const char version_string[]; + +#endif /* __VERSION_STRING_H__ */ diff --git a/lib/display_options.c b/lib/display_options.c index c08a87e31629..e096ef8f4e45 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index 14353ae71c9b..b845e5531280 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/print_ut.c b/test/print_ut.c index e2bcfbef0078..11d8580e55c5 100644 --- a/test/print_ut.c +++ b/test/print_ut.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include -- 2.20.1