* [gentoo-dev] [PATCH v2] profiles/base: add cache vars for -Wimplicit-function-declaration silencing
@ 2023-02-28 19:03 Sam James
2023-02-28 19:07 ` Michał Górny
0 siblings, 1 reply; 2+ messages in thread
From: Sam James @ 2023-02-28 19:03 UTC (permalink / raw
To: gentoo-dev; +Cc: toolchain, Sam James
Autoconf has a builtin check to try figure out how to make the compiler
error out on implicit function declarations. This check necessarily emits
such a warning/error. We know that -Werror=implicit-function-declaration
will work on any compiler we care about, so just force that to avoid noise.
This means we don't have to try whitelist 'strchr'.
v2: drop 'export' as PMS doesn't allow it in make.defaults.
Signed-off-by: Sam James <sam@gentoo.org>
---
profiles/base/make.defaults | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/profiles/base/make.defaults b/profiles/base/make.defaults
index ab69dbfae58ee..68ff36a90cc8d 100644
--- a/profiles/base/make.defaults
+++ b/profiles/base/make.defaults
@@ -181,3 +181,9 @@ ADA_TARGET="gnat_2021"
# Default targets for lua{,-single}.eclass
LUA_SINGLE_TARGET="lua5-1"
LUA_TARGETS="lua5-1"
+
+# Sam James <sam@gentoo.org> (2023-02-28)
+# Reduce -Wimplicit-function-declaration noise from autoconf. Any compilers
+# we care about should match these anyway. See https://wiki.gentoo.org/wiki/Modern_C_porting.
+ac_cv_c_undeclared_builtin_options="none needed"
+gl_cv_compiler_check_decl_option="-Werror=implicit-function-declaration"
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] [PATCH v2] profiles/base: add cache vars for -Wimplicit-function-declaration silencing
2023-02-28 19:03 [gentoo-dev] [PATCH v2] profiles/base: add cache vars for -Wimplicit-function-declaration silencing Sam James
@ 2023-02-28 19:07 ` Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2023-02-28 19:07 UTC (permalink / raw
To: gentoo-dev
On Tue, 2023-02-28 at 19:03 +0000, Sam James wrote:
> Autoconf has a builtin check to try figure out how to make the compiler
> error out on implicit function declarations. This check necessarily emits
> such a warning/error. We know that -Werror=implicit-function-declaration
> will work on any compiler we care about, so just force that to avoid noise.
>
> This means we don't have to try whitelist 'strchr'.
>
> v2: drop 'export' as PMS doesn't allow it in make.defaults.
>
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
> profiles/base/make.defaults | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/profiles/base/make.defaults b/profiles/base/make.defaults
> index ab69dbfae58ee..68ff36a90cc8d 100644
> --- a/profiles/base/make.defaults
> +++ b/profiles/base/make.defaults
> @@ -181,3 +181,9 @@ ADA_TARGET="gnat_2021"
> # Default targets for lua{,-single}.eclass
> LUA_SINGLE_TARGET="lua5-1"
> LUA_TARGETS="lua5-1"
> +
> +# Sam James <sam@gentoo.org> (2023-02-28)
> +# Reduce -Wimplicit-function-declaration noise from autoconf. Any compilers
> +# we care about should match these anyway. See https://wiki.gentoo.org/wiki/Modern_C_porting.
> +ac_cv_c_undeclared_builtin_options="none needed"
> +gl_cv_compiler_check_decl_option="-Werror=implicit-function-declaration"
LGTM. Thanks!
--
Best regards,
Michał Górny
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-28 19:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28 19:03 [gentoo-dev] [PATCH v2] profiles/base: add cache vars for -Wimplicit-function-declaration silencing Sam James
2023-02-28 19:07 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox