NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/58969: use of alloca is warning, not error, with -std=c11
The following reply was made to PR toolchain/58969; it has been noted by GNATS.
From: Taylor R Campbell <campbell%mumble.net@localhost>
To: =?UTF-8?Q?J=C3=B6rg_Sonnenberger?= <joerg%bec.de@localhost>
Cc: gnats-bugs%netbsd.org@localhost, toolchain-manager%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: toolchain/58969: use of alloca is warning, not error, with
-std=c11
Date: Tue, 7 Jan 2025 11:45:08 +0000
> Date: Tue, 7 Jan 2025 11:17:21 +0100
> From: J=F6rg Sonnenberger <joerg%bec.de@localhost>
>=20
> On 1/7/25 7:10 AM, campbell+netbsd%mumble.net@localhost wrote:
> > While experimenting with switching the build to -std=3Dc11 (https://mai=
l-index.netbsd.org/tech-kern/2025/01/05/msg029919.html), I saw warnings fly=
by like this:
> >=20
> > /home/riastradh/netbsd/current/obj.riscv/tooldir/bin/../lib/gcc/riscv64=
--netbsd/12.4.0/../../../../riscv64--netbsd/bin/ld: /home/riastradh/netbsd/=
current/src/../obj.riscv/destdir.riscv/lib/libc.so: warning: Warning: refer=
ence to the libc supplied alloca(3); this most likely will not work. Please=
use the compiler provided version of alloca(3), by supplying the appropria=
te compiler flags (e.g. -std=3Dgnu99).
>=20
> AFAICT there are bugs around per-symbol linker warnings in GNU ld where=20
> the warning is shown for dynamic libraries without anything in the=20
> current object files ever using them.
In this case, the warning is legitimate, because the files in libc
that _do_ use alloca -- execl.c, execle.c, execlp.c, and execvp.c --
need to be built with -std=3Dgnu* in order to expose the real alloca,
not -std=3Dc* which gives the broken stub reference, so compiling them
with -std=3Dc11 broke them.
We need to make this mistake a build-breaking error, not a scroll-by
warning.
Home |
Main Index |
Thread Index |
Old Index