[PATCH] Don't use -Wfree-labels/-Wmissing-parameter-name if unsupported
H.J. Lu
hjl.tools@gmail.com
Fri Aug 22 22:56:27 GMT 2025
Don't use -Wfree-labels/-Wmissing-parameter-name for "make check" if
they are unsupported by TEST_CC.
This fixes BZ #33310.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
Makefile.in | 2 ++
configure | 8 ++++----
configure.ac | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 809aa6443f..5b872a72a3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -26,6 +26,8 @@ check xcheck test:
config-cflags-mprefer-vector-width="$(test-config-cflags-mprefer-vector-width)" \
config-cflags-signaling-nans="$(test-config-cflags-signaling-nans)" \
config-cflags-wno-ignored-attributes="$(test-config-cflags-wno-ignored-attributes)" \
+ cc-option-wfree-labels="$(test-cc-option-wfree-labels)" \
+ cc-option-wmissing-parameter-name="$(test-cc-option-wmissing-parameter-name)" \
enable-cet="$(test-enable-cet)" \
have-mamx-tile="$(test-have-mamx-tile)" \
have-static-pie="$(test-have-static-pie)" \
diff --git a/configure b/configure
index 180e49d95b..c06f68a827 100755
--- a/configure
+++ b/configure
@@ -649,8 +649,6 @@ have_selinux
have_libcap
have_libaudit
LIBGD
-libc_cv_test_cc_wmissing_parameter_name
-libc_cv_test_cc_wfree_labels
libc_cv_test_cc_wimplicit_fallthrough
libc_cv_cc_loop_to_function
libc_cv_test_cc_signaling_nans
@@ -8083,7 +8081,8 @@ fi
config_vars="$config_vars
cc-option-wfree-labels = $libc_cv_cc_wfree_labels"
-
+config_vars="$config_vars
+test-cc-option-wfree-labels = $libc_cv_test_cc_wfree_labels"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wmissing-parameter-name" >&5
@@ -8143,7 +8142,8 @@ fi
config_vars="$config_vars
cc-option-wmissing-parameter-name = $libc_cv_cc_wmissing_parameter_name"
-
+config_vars="$config_vars
+test-cc-option-wmissing-parameter-name = $libc_cv_test_cc_wmissing_parameter_name"
conftest_code="
void bar (void (*callback) (void));
diff --git a/configure.ac b/configure.ac
index 4480ae83bb..ccaaf70e1d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1603,7 +1603,7 @@ LIBC_TRY_CC_AND_TEST_CC_OPTION([for -Wfree-labels],
[libc_cv_test_cc_wfree_labels=-Wfree-labels],
[libc_cv_test_cc_wfree_labels=])
LIBC_CONFIG_VAR([cc-option-wfree-labels], [$libc_cv_cc_wfree_labels])
-AC_SUBST(libc_cv_test_cc_wfree_labels)
+LIBC_CONFIG_VAR([test-cc-option-wfree-labels], [$libc_cv_test_cc_wfree_labels])
LIBC_TRY_CC_AND_TEST_CC_OPTION([for -Wmissing-parameter-name],
[-Werror -Wmissing-parameter-name],
@@ -1615,7 +1615,8 @@ LIBC_TRY_CC_AND_TEST_CC_OPTION([for -Wmissing-parameter-name],
[libc_cv_test_cc_wmissing_parameter_name=])
LIBC_CONFIG_VAR([cc-option-wmissing-parameter-name],
[$libc_cv_cc_wmissing_parameter_name])
-AC_SUBST(libc_cv_test_cc_wmissing_parameter_name)
+LIBC_CONFIG_VAR([test-cc-option-wmissing-parameter-name],
+ [$libc_cv_test_cc_wmissing_parameter_name])
conftest_code="
void bar (void (*callback) (void));
--
2.50.1
More information about the Libc-alpha
mailing list