From: Peter Korsgaard <peter@korsgaard.com>
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: Thu, 29 Aug 2024 08:07:03 +0200 [thread overview]
Message-ID: <877cbz7th4.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20240720142629.747083-1-fontaine.fabrice@gmail.com> (Fabrice Fontaine's message of "Sat, 20 Jul 2024 16:26:29 +0200")
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> 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>
Committed to 2024.05.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2024-08-29 6:07 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
2024-08-29 6:07 ` Peter Korsgaard [this message]
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=877cbz7th4.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.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