From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 12 May 2014 21:52:35 -0400 Subject: [U-Boot] [U-Boot, v2, 5/5] kbuild: build with -Werror=date-time if the compiler supports it In-Reply-To: <1397815791-21950-6-git-send-email-yamada.m@jp.panasonic.com> References: <1397815791-21950-6-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <20140513015235.GS22182@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Apr 18, 2014 at 07:09:51PM +0900, Masahiro Yamada wrote: > Using __DATE__, __TIME__ would make the build non-deterministic. > > If the code needs to refer to build date/time, use U_BOOT_DATE and > U_BOOT_TIME in include/generated/timestamp_autogenerated.h instead. > > This commit has been imported from Linux Kernel, > which should be applied to U-Boot too: > > 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: Josh Triplett > Signed-off-by: Michal Marek > Signed-off-by: Masahiro Yamada Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: