Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/base/
Date: Tue, 28 Feb 2023 19:11:12
Message-Id: 1677611436.830c46baf116bf8fca5b981723122ece4bfcbcd9.sam@gentoo
1 commit: 830c46baf116bf8fca5b981723122ece4bfcbcd9
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 18:31:14 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 28 19:10:36 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=830c46ba
7
8 profiles/base: add cache vars for -Wimplicit-function-declaration silencing
9
10 Autoconf has a builtin check to try figure out how to make the compiler
11 error out on implicit function declarations. This check necessarily emits
12 such a warning/error. We know that -Werror=implicit-function-declaration
13 will work on any compiler we care about, so just force that to avoid noise.
14
15 This means we don't have to try whitelist 'strchr'.
16
17 Bug: https://bugs.gentoo.org/870412
18 Signed-off-by: Sam James <sam <AT> gentoo.org>
19
20 profiles/base/make.defaults | 6 ++++++
21 1 file changed, 6 insertions(+)
22
23 diff --git a/profiles/base/make.defaults b/profiles/base/make.defaults
24 index ab69dbfae58e..68ff36a90cc8 100644
25 --- a/profiles/base/make.defaults
26 +++ b/profiles/base/make.defaults
27 @@ -181,3 +181,9 @@ ADA_TARGET="gnat_2021"
28 # Default targets for lua{,-single}.eclass
29 LUA_SINGLE_TARGET="lua5-1"
30 LUA_TARGETS="lua5-1"
31 +
32 +# Sam James <sam@g.o> (2023-02-28)
33 +# Reduce -Wimplicit-function-declaration noise from autoconf. Any compilers
34 +# we care about should match these anyway. See https://wiki.gentoo.org/wiki/Modern_C_porting.
35 +ac_cv_c_undeclared_builtin_options="none needed"
36 +gl_cv_compiler_check_decl_option="-Werror=implicit-function-declaration"