linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: fix config cc version check
@ 2022-03-07 22:32 Michael S. Tsirkin
  2022-03-08  2:23 ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2022-03-07 22:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masahiro Yamada, Michal Marek, Nick Desaulniers, linux-kbuild

.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: fix config cc version check
  2022-03-07 22:32 [PATCH] Makefile: fix config cc version check Michael S. Tsirkin
@ 2022-03-08  2:23 ` Masahiro Yamada
  2022-04-03  9:10   ` Akemi Yagi
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2022-03-08  2:23 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Linux Kernel Mailing List, Michal Marek, Nick Desaulniers,
	Linux Kbuild mailing list

On Tue, Mar 8, 2022 at 7:32 AM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> .config is of the form:
> CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)"


No. This was changed.

See this:

$ git show 129ab0d2d9f -- Makefile



> 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
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: fix config cc version check
  2022-03-08  2:23 ` Masahiro Yamada
@ 2022-04-03  9:10   ` Akemi Yagi
  2022-04-04 11:02     ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Akemi Yagi @ 2022-04-03  9:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-kbuild

On Tue, 08 Mar 2022 11:23:31 +0900, Masahiro Yamada wrote:

> On Tue, Mar 8, 2022 at 7:32 AM Michael S. Tsirkin <mst@redhat.com>
> wrote:
>>
>> .config is of the form:
>> CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)"
> 
> 
> No. This was changed.
> 
> See this:
> 
> $ git show 129ab0d2d9f -- Makefile
> 
> 
> 
>> 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

I believe the patch proposed by Michael indeed fixes an issue 
introduced by 129ab0d2d9f (Makefile).

Please see the following bug reports:

https://elrepo.org/bugs/view.php?id=1215
https://elrepo.org/bugs/view.php?id=1214

and this forum post:

https://www.phoronix.com/forums/forum/software/general-linux-open-source/
1303986-linux-5-17-rc1-released-a-little-bit-early-but-with-shiny-new-
features#post1304036

Akemi


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: fix config cc version check
  2022-04-03  9:10   ` Akemi Yagi
@ 2022-04-04 11:02     ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2022-04-04 11:02 UTC (permalink / raw)
  To: Akemi Yagi; +Cc: Linux Kernel Mailing List, Linux Kbuild mailing list

On Sun, Apr 3, 2022 at 6:11 PM Akemi Yagi <toracat@elrepo.org> wrote:
>
> On Tue, 08 Mar 2022 11:23:31 +0900, Masahiro Yamada wrote:
>
> > On Tue, Mar 8, 2022 at 7:32 AM Michael S. Tsirkin <mst@redhat.com>
> > wrote:
> >>
> >> .config is of the form:
> >> CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)"
> >
> >
> > No. This was changed.
> >
> > See this:
> >
> > $ git show 129ab0d2d9f -- Makefile
> >
> >
> >
> >> 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
>
> I believe the patch proposed by Michael indeed fixes an issue
> introduced by 129ab0d2d9f (Makefile).
>
> Please see the following bug reports:
>
> https://elrepo.org/bugs/view.php?id=1215
> https://elrepo.org/bugs/view.php?id=1214
>
> and this forum post:
>
> https://www.phoronix.com/forums/forum/software/general-linux-open-source/
> 1303986-linux-5-17-rc1-released-a-little-bit-early-but-with-shiny-new-
> features#post1304036
>
> Akemi
>

I left a comment:
https://elrepo.org/bugs/view.php?id=1215


This is a bug in ELRepo.

The upstream kernel is good.

Please do not come back to this over again.




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-04 11:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07 22:32 [PATCH] Makefile: fix config cc version check Michael S. Tsirkin
2022-03-08  2:23 ` Masahiro Yamada
2022-04-03  9:10   ` Akemi Yagi
2022-04-04 11:02     ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).