All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/1] linux: limit YYLTYPE kernel modification
@ 2022-03-05  0:00 Markus Mayer via buildroot
  2022-03-05  0:22 ` [Buildroot] [PATCH 1/1] " Markus Mayer via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Mayer via buildroot @ 2022-03-05  0:00 UTC (permalink / raw)
  To: Buildroot Mailing List; +Cc: Yann E . MORIN, Markus Mayer

Hi,

It took me a while to find out why our kernel builds were suddenly
failing with the 2022.02-rcX sources. Oddly, building DTC for the host
would error out like so:

dtc-parser.y: In function `print_error':
dtc-parser.y:478:17: error: `yylloc' undeclared (first use in this function);
    did you mean `yyalloc'?
dtc-parser.y:478:17: note: each undeclared identifier is reported only once
    for each function it appears in
dtc-lexer.lex.c: In function `yylex':
dtc-lexer.l:46:18: error: `yylloc' undeclared (first use in this function);
    did you mean `yyalloc'?
dtc-lexer.lex.c:845:2: note: in expansion of macro `YY_USER_ACTION'
dtc-lexer.lex.c:939:1: note: in expansion of macro `YY_RULE_SETUP'
dtc-lexer.l:46:18: note: each undeclared identifier is reported only once
    for each function it appears in
dtc-lexer.lex.c:845:2: note: in expansion of macro `YY_USER_ACTION'
dtc-lexer.lex.c:939:1: note: in expansion of macro `YY_RULE_SETUP'

The kernel build that's failing is Linux 4.1 with GCC 6.3. Yes, I know.
Old kernel, old toolchain. Still, this used to work, and now it doesn't.
(We have newer toolchains and newer kernels, too. They seem fine.)

Eventually, I tracked it down to this change:

https://git.buildroot.net/buildroot/commit/?id=9b41b54be077

I think there are two issues with it. It claims to be for GCC 10+, but
it is applied at all times. I believe it should be conditional upon
BR2_TOOLCHAIN_GCC_AT_LEAST_10 if the intention is to fix up the sources
for GCC 10 and newer.

Secondly, this code works its magic completely silently and quietly.
There is no indication that anything is being done to the kernel
sources. That makes it really, *REALLY* challenging to figure out what's
going on when things go sideways.

I think an informational message to the user is absolutely crucial. At
least that way it'll show up in the build logs if one searches for
"YYLTYPE". That'll give the users a hint where the sources are being
touched. Modifying source code like this should not happen quietly.

Regards,
-Markus

Markus Mayer (1):
  linux: limit YYLTYPE kernel modification

 linux/linux.mk | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-03-08  0:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-05  0:00 [Buildroot] [PATCH 0/1] linux: limit YYLTYPE kernel modification Markus Mayer via buildroot
2022-03-05  0:22 ` [Buildroot] [PATCH 1/1] " Markus Mayer via buildroot
2022-03-05  9:18   ` Yann E. MORIN
2022-03-08  0:58     ` Markus Mayer via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.