From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Nathan Chancellor <natechancellor@gmail.com>,
Will Deacon <will@kernel.org>
Subject: [PATCH] kbuild: partial revert of "remove cc-option test of -Werror=date-time"
Date: Sun, 10 Jan 2021 14:08:07 -0500 [thread overview]
Message-ID: <20210110190807.134996-1-paul.gortmaker@windriver.com> (raw)
In commit 87de84c9140e1ccb221c68bb7e4939e880b3f2bb ("kbuild: remove
cc-option test of -Werror=date-time") the check for support of the
date-time option was removed.
However, by removing it from the top level Makefile, it breaks all
the normal compiler version checks, because GCC fails at the command
line parsing, and never gets to the CPP #error check in the headers.
So for gcc-4.8 (now unsupported) you get the confusing:
cc1: error: -Werror=date-time: no option -Wdate-time
instead of the previous and expected error message of:
# error Sorry, your version of GCC is too old - please use 4.9 or newer.
Restore the check in the top level Makefile so the longstanding GCC
arch independent version check works again for v4.8 and older.
Fixes: 87de84c9140e ("kbuild: remove cc-option test of -Werror=date-time")
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index e30cf02da8b8..e2f9e6582a10 100644
--- a/Makefile
+++ b/Makefile
@@ -937,7 +937,7 @@ KBUILD_CFLAGS += -fno-stack-check
KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
# Prohibit date/time macros, which would make the build non-deterministic
-KBUILD_CFLAGS += -Werror=date-time
+KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
# enforce correct pointer usage
KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
--
2.17.1
reply other threads:[~2021-01-10 19:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210110190807.134996-1-paul.gortmaker@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=natechancellor@gmail.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox