From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-kbuild@vger.kernel.org
Subject: [PATCH] Makefile: fix config cc version check
Date: Mon, 7 Mar 2022 17:32:41 -0500 [thread overview]
Message-ID: <20220307223231.608498-1-mst@redhat.com> (raw)
.config is of the form:
CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)"
while CC_VERSION_TEXT is of the form: gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-7)
thus when comparing these, CONFIG_CC_VERSION_TEXT should not
be put in "", otherwise we get () outside "" which shell then
tries to evaluate.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index daeb5c88b50b..d5c03c827825 100644
--- a/Makefile
+++ b/Makefile
@@ -1714,9 +1714,9 @@ PHONY += prepare
# now expand this into a simple variable to reduce the cost of shell evaluations
prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
prepare:
- @if [ "$(CC_VERSION_TEXT)" != "$(CONFIG_CC_VERSION_TEXT)" ]; then \
+ @if [ "$(CC_VERSION_TEXT)" != $(CONFIG_CC_VERSION_TEXT) ]; then \
echo >&2 "warning: the compiler differs from the one used to build the kernel"; \
- echo >&2 " The kernel was built by: $(CONFIG_CC_VERSION_TEXT)"; \
+ echo >&2 " The kernel was built by: "$(CONFIG_CC_VERSION_TEXT)";" \
echo >&2 " You are using: $(CC_VERSION_TEXT)"; \
fi
--
MST
next reply other threads:[~2022-03-07 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 22:32 Michael S. Tsirkin [this message]
2022-03-08 2:23 ` [PATCH] Makefile: fix config cc version check Masahiro Yamada
2022-04-03 9:10 ` Akemi Yagi
2022-04-04 11:02 ` Masahiro Yamada
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=20220307223231.608498-1-mst@redhat.com \
--to=mst@redhat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
/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