diff options
author | Josh Triplett <josh@joshtriplett.org> | 2013-12-23 22:56:06 +0100 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2014-01-27 23:14:13 +0100 |
commit | fe7c36c7bde12190341722af69358e42171162f3 (patch) | |
tree | dc6d1f645aeee8a5b1e8799242262f2fdc935ab5 /Makefile | |
parent | x86: math-emu: Drop already-disabled print of build date (diff) | |
download | linux-fe7c36c7bde12190341722af69358e42171162f3.tar.xz linux-fe7c36c7bde12190341722af69358e42171162f3.zip |
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 <josh@joshtriplett.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -682,6 +682,9 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int) # require functions to have arguments in prototypes, not empty 'int foo()' KBUILD_CFLAGS += $(call cc-option,-Werror=strict-prototypes) +# Prohibit date/time macros, which would make the build non-deterministic +KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) + # use the deterministic mode of AR if available KBUILD_ARFLAGS := $(call ar-option,D) |