From: Petr Vorel <petr.vorel@gmail.com>
To: Robert Marko <robimarko@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] kconfig/lxdialog: fix check() with GCC14
Date: Wed, 3 Apr 2024 18:28:27 +0200 [thread overview]
Message-ID: <20240403162827.GA462745@pevik> (raw)
In-Reply-To: <20240403121807.2087547-1-robimarko@gmail.com>
Hi Robert,
> 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.
Good catch. Not only gcc-14, but also clang-16 fails due -Wimplicit-int.
(clang-14 was ok).
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Tested-by: Petr Vorel <petr.vorel@gmail.com>
Kind regards,
Petr
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
> support/kconfig/lxdialog/check-lxdialog.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/support/kconfig/lxdialog/check-lxdialog.sh b/support/kconfig/lxdialog/check-lxdialog.sh
> index 16cd9a3186..27d6c30a57 100755
> --- a/support/kconfig/lxdialog/check-lxdialog.sh
> +++ b/support/kconfig/lxdialog/check-lxdialog.sh
> @@ -48,7 +48,7 @@ trap "rm -f $tmp" 0 1 2 3 15
> check() {
> $cc -x c - -o $tmp 2>/dev/null <<'EOF'
> #include CURSES_LOC
> -main() {}
> +int main() {}
> EOF
> if [ $? != 0 ]; then
> echo " *** Unable to find the ncurses libraries or the" 1>&2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-04-03 16:28 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 [this message]
2024-04-08 20:36 ` Thomas Petazzoni via buildroot
2024-04-08 21:15 ` Robert Marko
2024-04-08 21:38 ` Petr Vorel
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=20240403162827.GA462745@pevik \
--to=petr.vorel@gmail.com \
--cc=buildroot@buildroot.org \
--cc=robimarko@gmail.com \
--cc=yann.morin.1998@free.fr \
/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