Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Robert Marko <robimarko@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] kconfig/lxdialog: fix check() with GCC14
Date: Mon, 8 Apr 2024 23:38:07 +0200	[thread overview]
Message-ID: <20240408213807.GA44146@pevik> (raw)
In-Reply-To: <20240408223621.39b37892@windsurf>

Hi Robert, Thomas,

> Hello Robert,

> On Wed,  3 Apr 2024 14:18:07 +0200
> Robert Marko <robimarko@gmail.com> wrote:

> > GCC14 now treats implicit int types as error so when check() from
> > check-lxdialog.sh is called to check whether we can link against ncurses
> > it will fail silently and the help text indicating to install ncurses is
> > printed.

> > However, this is not due to missing ncurses but once the stderr redirect
> > to /dev/null is removed we can see the root cause:
> > <stdin>:2:1: error: return type defaults to ‘int’ [-Wimplicit-int]

> > So, in order for menuconfig to work with GCC14 lets just specify the
> > return type of main() as int.

> > Signed-off-by: Robert Marko <robimarko@gmail.com>

> Thanks a lot for the patch. However, making changes in support/kconfig/
> in Buildroot requires a bit more care. Indeed, this code is taken from
> the Linux kernel code, and we try to keep a well-defined list of
> changes on top of the original code from the kernel.

> As explained in support/kconfig/README.buildroot, the current code in
> support/kconfig/ is taken from Linux 4.17-rc2, on top of which the
> patches in support/kconfig/patches/ have been applied.

I'm sorry for a wrong review, I completely forget Buildroot uses patches
also for kconfig.

> So from this, you have two options:

> (1) Add a new patch in support/kconfig/patches/ which implements the
>     change you need for GCC14 compatibility

> (2) Update the code in support/kconfig/ to the latest code available in
>     the Linux kernel scripts/kconfig directory, rebase our patches, and
>     verify it all works.

> Obviously, (1) is the easiest path. (2) is nicer long term, as we
> benefit from all new features/fixes added by the Linux kernel
> developers. Turns out that in the upstream kernel, the
> check-lxdialog.sh script has been removed and replaced by something
> different, which no longer has this main() function definition.

FYI I gave up kconfig update after big rewrites in the Linux kernel
made by Masahiro Yamada (the new kbuild and kconfig maintainer), because the
code changes were quite big but kconfig in Buildroot is IMHO not missing any
significant usability function. But I can be wrong, Thomas let me know if you
miss something significant which would justify the update. Obviously we would
get some fixes, but also major rewrite, which would likely require changes in
other parts of Buildroot.

check-lxdialog.sh was removed in 1c5af5cf9308 ("kconfig: refactor ncurses
package checks for building mconf and nconf") in v4.18, but major rewrite come
in 4.19 and 5.0 + kbuild updates in 5.1, changes continue in 5.10, 5.13, later
fixes in 6.x kernels...

Some of these changes moved storing toolchain capabilities in .config (while
Buildroot uses does something similar, I'm not sure whether kernel functionality
could be used without big changes in Buildroot).

Kind regards,
Petr

> Could you have a look at implementing either (1) or (2) ?

> Thanks a lot!

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

  parent reply	other threads:[~2024-04-08 21:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 12:18 [Buildroot] [PATCH 1/1] kconfig/lxdialog: fix check() with GCC14 Robert Marko
2024-04-03 16:28 ` Petr Vorel
2024-04-08 20:36 ` Thomas Petazzoni via buildroot
2024-04-08 21:15   ` Robert Marko
2024-04-08 21:38   ` Petr Vorel [this message]
2024-04-09 19:46     ` Thomas Petazzoni via buildroot
2024-04-09 20:50       ` Yann E. MORIN
2024-04-11  0:15         ` Petr Vorel
2024-04-11  5:02           ` Yann E. MORIN

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=20240408213807.GA44146@pevik \
    --to=petr.vorel@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=robimarko@gmail.com \
    --cc=thomas.petazzoni@bootlin.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