Gentoo Archives: gentoo-dev

From: "Arsen Arsenović" <arsen@g.o>
To: Sam James <sam@g.o>
Cc: gentoo-dev@l.g.o, toolchain@g.o
Subject: [gentoo-dev] Re: [PATCH] profiles/base: add cache vars for -Wimplicit-function-declaration silencing
Date: Tue, 28 Feb 2023 18:43:56
Message-Id: 874jr53a1q.fsf@gentoo.org
In Reply to: [gentoo-dev] [PATCH] profiles/base: add cache vars for -Wimplicit-function-declaration silencing by Sam James
1 Sam James <sam@g.o> writes:
2
3 > Autoconf has a builtin check to try figure out how to make the compiler
4 > error out on implicit function declarations. This check necessarily emits
5 > such a warning/error. We know that -Werror=implicit-function-declaration
6 > will work on any compiler we care about, so just force that to avoid noise.
7 >
8 > This means we don't have to try whitelist 'strchr'.
9 >
10 > Signed-off-by: Sam James <sam@g.o>
11 > ---
12 > profiles/base/make.defaults | 6 ++++++
13 > 1 file changed, 6 insertions(+)
14 >
15 > diff --git a/profiles/base/make.defaults b/profiles/base/make.defaults
16 > index ab69dbfae58ee..bdffd57047bbc 100644
17 > --- a/profiles/base/make.defaults
18 > +++ b/profiles/base/make.defaults
19 > @@ -181,3 +181,9 @@ ADA_TARGET="gnat_2021"
20 > # Default targets for lua{,-single}.eclass
21 > LUA_SINGLE_TARGET="lua5-1"
22 > LUA_TARGETS="lua5-1"
23 > +
24 > +# Sam James <sam@g.o> (2023-02-28)
25 > +# Reduce -Wimplicit-function-declaration noise from autoconf. Any compilers
26 > +# we care about should match these anyway. See https://wiki.gentoo.org/wiki/Modern_C_porting.
27 > +export ac_cv_c_undeclared_builtin_options="none needed"
28 > +export gl_cv_compiler_check_decl_option="-Werror=implicit-function-declaration"
29
30 LGTM.
31
32 --
33 Arsen Arsenović

Attachments

File name MIME type
signature.asc application/pgp-signature