From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/autossh: fix build with gcc >= 14
Date: Sat, 20 Jul 2024 23:00:19 +0200 [thread overview]
Message-ID: <20240720230019.72b43f74@windsurf> (raw)
In-Reply-To: <20240720142629.747083-1-fontaine.fabrice@gmail.com>
On Sat, 20 Jul 2024 16:26:29 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Include stdio.h to avoid that __progname check wrongly returned that
> the function is unavailable with gcc >= 14 which enables
> -Werror=implicit-function-declaration
> (https://gcc.gnu.org/gcc-14/porting_to.html):
>
> configure:5231: checking if libc defines __progname
> configure:5249: /home/autobuild/autobuild/instance-7/output-1/host/bin/sh4-buildroot-linux-musl-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c >&5
> conftest.c: In function 'main':
> conftest.c:73:27: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
> 73 | extern char *__progname; printf("%s", __progname);
> | ^~~~~~
> conftest.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
> 1 | /* confdefs.h */
> conftest.c:73:27: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
> 73 | extern char *__progname; printf("%s", __progname);
> | ^~~~~~
> conftest.c:73:27: note: include '<stdio.h>' or provide a declaration of 'printf'
>
> resulting in the following static build failure:
>
> /home/autobuild/autobuild/instance-7/output-1/host/lib/gcc/sh4-buildroot-linux-musl/14.1.0/../../../../sh4-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-7/output-1/host/sh4-buildroot-linux-musl/sysroot/lib/libc.a(libc.o):(.bss.__progname+0x0): multiple definition of `__progname'; autossh.o:(.bss+0x120): first defined here
>
> Fixes:
> - http://autobuild.buildroot.org/results/5d80a8096d0f5529cbd86903a74f3bab3d230f4a
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ....ac-fix-__progname-check-with-gcc-14.patch | 52 +++++++++++++++++++
> package/autossh/autossh.mk | 1 +
> 2 files changed, 53 insertions(+)
> create mode 100644 package/autossh/0001-configure.ac-fix-__progname-check-with-gcc-14.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-07-20 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 14:26 [Buildroot] [PATCH 1/1] package/autossh: fix build with gcc >= 14 Fabrice Fontaine
2024-07-20 21:00 ` Thomas Petazzoni via buildroot [this message]
2024-08-29 6:07 ` Peter Korsgaard
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=20240720230019.72b43f74@windsurf \
--to=buildroot@buildroot.org \
--cc=fontaine.fabrice@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