From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masahiro Yamada Date: Thu, 17 Apr 2014 17:00:32 +0900 Subject: [U-Boot] [PATCH 5/5] kbuild: build with -Werror=date-time if the compiler supports it In-Reply-To: <1397721632-18797-1-git-send-email-yamada.m@jp.panasonic.com> References: <1397721632-18797-1-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <1397721632-18797-6-git-send-email-yamada.m@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This commit has been imported from Linux Kernel: commit fe7c36c7bde12190341722af69358e42171162f3 Author: Josh Triplett Date: Mon Dec 23 13:56:06 2013 -0800 Makefile: Build with -Werror=date-time if the compiler supports it GCC 4.9 and newer have a new warning -Wdate-time, which warns on any use of __DATE__, __TIME__, or __TIMESTAMP__, which would make the build non-deterministic. Now that the kernel does not use any of those macros, turn on -Werror=date-time if available, to keep it that way. The kernel already (optionally) records this information at build time in a single place; other kernel code should not duplicate that. Signed-off-by: Masahiro Yamada --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 0191869..09a370f 100644 --- a/Makefile +++ b/Makefile @@ -578,6 +578,9 @@ KBUILD_AFLAGS += -Wa,-gstabs,-S endif endif +# Prohibit date/time macros, which would make the build non-deterministic +KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) + ifneq ($(CONFIG_SYS_TEXT_BASE),) KBUILD_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) endif -- 1.8.3.2