public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it Date: Thu, 9 Jun 2022 13:16:10 +0000 (GMT) [thread overview] Message-ID: <20220609131610.B53E73834E6E@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9f32a4ea968135bc8790a46a45e012911645e05f commit 9f32a4ea968135bc8790a46a45e012911645e05f Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Thu Mar 10 16:40:29 2022 -0300 configure: Use -Wno-maybe-uninitialized iff compiler supports it Diff: --- configure | 22 ++++++++++++++++++++++ configure.ac | 8 ++++++++ timezone/Makefile | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 779c7b8891..48f24a6f9d 100755 --- a/configure +++ b/configure @@ -6257,6 +6257,28 @@ $as_echo "$libc_cv_mtls_dialect_gnu2" >&6; } config_vars="$config_vars have-mtls-dialect-gnu2 = $libc_cv_mtls_dialect_gnu2" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5 +$as_echo_n "checking for -Wno-maybe-uninitialized... " >&6; } +if ${libc_cv_wno_maybe_uninitialized+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized +else + libc_cv_wno_maybe_uninitialized= +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5 +$as_echo "$libc_cv_wno_maybe_uninitialized" >&6; } +config_vars="$config_vars +config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5 $as_echo_n "checking whether cc puts quotes around section names... " >&6; } if ${libc_cv_have_section_quotes+:} false; then : diff --git a/configure.ac b/configure.ac index d9c8872a5f..bebf3e3bf1 100644 --- a/configure.ac +++ b/configure.ac @@ -1403,6 +1403,14 @@ rm -f conftest*]) AC_SUBST(libc_cv_mtls_dialect_gnu2) LIBC_CONFIG_VAR([have-mtls-dialect-gnu2], [$libc_cv_mtls_dialect_gnu2]) +AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, [dnl + LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized], + [libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized], + [libc_cv_wno_maybe_uninitialized=]) +]) +LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized], + [$libc_cv_wno_maybe_uninitialized]) + AC_CACHE_CHECK(whether cc puts quotes around section names, libc_cv_have_section_quotes, [cat > conftest.c <<EOF diff --git a/timezone/Makefile b/timezone/Makefile index a789c22d26..809c909860 100644 --- a/timezone/Makefile +++ b/timezone/Makefile @@ -61,7 +61,7 @@ tz-cflags = -DTZDIR='"$(zonedir)"' \ -DTZDEFRULES='"$(posixrules-file)"' \ -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone \ -DHAVE_GETTEXT -DUSE_LTZ=0 -D_ISOMAC -DTZ_DOMAIN='"libc"' \ - -include $(common-objpfx)config.h -Wno-maybe-uninitialized + -include $(common-objpfx)config.h $(config-cflags-wno-maybe-uninitialized) # The -Wno-unused-variable flag is used to prevent GCC 6 # from warning about time_t_min and time_t_max which are
next reply other threads:[~2022-06-09 13:16 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-09 13:16 Adhemerval Zanella [this message] -- strict thread matches above, loose matches on Subject: below -- 2024-04-17 20:04 Adhemerval Zanella 2024-04-02 15:50 Adhemerval Zanella 2024-02-09 17:29 Adhemerval Zanella 2024-02-07 14:04 Adhemerval Zanella 2024-01-29 17:54 Adhemerval Zanella 2023-12-21 18:51 Adhemerval Zanella 2023-09-28 17:49 Adhemerval Zanella 2023-08-30 12:36 Adhemerval Zanella 2023-02-09 19:48 Adhemerval Zanella 2022-10-28 17:41 Adhemerval Zanella 2022-10-04 12:59 Adhemerval Zanella 2022-06-09 21:19 Adhemerval Zanella 2022-06-03 14:05 Adhemerval Zanella 2022-05-13 14:19 Adhemerval Zanella 2022-05-12 19:33 Adhemerval Zanella 2022-05-10 18:23 Adhemerval Zanella 2022-04-29 14:03 Adhemerval Zanella 2022-04-04 12:53 Adhemerval Zanella 2022-03-31 19:06 Adhemerval Zanella 2022-03-29 20:29 Adhemerval Zanella 2022-03-16 18:02 Adhemerval Zanella 2022-03-15 18:40 Adhemerval Zanella 2022-03-11 17:24 Adhemerval Zanella
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220609131610.B53E73834E6E@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).