public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-06-09 21:19 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:19 UTC (permalink / raw)
  To: glibc-cvs

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2024-04-02 15:50 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:50 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=be21496c2fb8e9a5168eb3485aa22d076695d15d

commit be21496c2fb8e9a5168eb3485aa22d076695d15d
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
    
    clang does not support the flag.

Diff:
---
 configure         | 24 ++++++++++++++++++++++++
 configure.ac      |  8 ++++++++
 timezone/Makefile |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 432e40a592..c18fb48ba5 100755
--- a/configure
+++ b/configure
@@ -7072,6 +7072,30 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		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=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+  libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
 printf %s "checking whether cc puts quotes around section names... " >&6; }
 if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index bdc385d03c..55e131f9dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1332,6 +1332,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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 d7acb387ba..5f49e2717c 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2024-02-09 17:29 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:29 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8e7620423a74eb84385872313f3e1a361812e1aa

commit 8e7620423a74eb84385872313f3e1a361812e1aa
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
    
    clang does not support the flag.

Diff:
---
 configure         | 24 ++++++++++++++++++++++++
 configure.ac      |  8 ++++++++
 timezone/Makefile |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 59ff1e415d..688d9ae6e0 100755
--- a/configure
+++ b/configure
@@ -7069,6 +7069,30 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		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=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+  libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
 printf %s "checking whether cc puts quotes around section names... " >&6; }
 if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 65799e5685..c7f946c774 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1329,6 +1329,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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 d7acb387ba..5f49e2717c 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2024-02-07 14:04 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:04 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9902cd3731adfb95ed578716f0b7317525883de6

commit 9902cd3731adfb95ed578716f0b7317525883de6
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
    
    clang does not support the flag.

Diff:
---
 configure         | 24 ++++++++++++++++++++++++
 configure.ac      |  8 ++++++++
 timezone/Makefile |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 59ff1e415d..688d9ae6e0 100755
--- a/configure
+++ b/configure
@@ -7069,6 +7069,30 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		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=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+  libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
 printf %s "checking whether cc puts quotes around section names... " >&6; }
 if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 65799e5685..c7f946c774 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1329,6 +1329,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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 d7acb387ba..5f49e2717c 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2024-01-29 17:54 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:54 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=185d3d58447bc3bd5a9ae4753830c1296c3ea677

commit 185d3d58447bc3bd5a9ae4753830c1296c3ea677
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
    
    clang does not support the flag.

Diff:
---
 configure         | 24 ++++++++++++++++++++++++
 configure.ac      |  8 ++++++++
 timezone/Makefile |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 59ff1e415d..688d9ae6e0 100755
--- a/configure
+++ b/configure
@@ -7069,6 +7069,30 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		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=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+  libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
 printf %s "checking whether cc puts quotes around section names... " >&6; }
 if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 65799e5685..c7f946c774 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1329,6 +1329,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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 d7acb387ba..5f49e2717c 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2023-12-21 18:51 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:51 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b43b1e2e5001e262ae97d964fbe4417e4e02505e

commit b43b1e2e5001e262ae97d964fbe4417e4e02505e
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
    
    clang does not support the flag.

Diff:
---
 configure         | 24 ++++++++++++++++++++++++
 configure.ac      |  8 ++++++++
 timezone/Makefile |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 996840cb40..d7f4489e0d 100755
--- a/configure
+++ b/configure
@@ -7068,6 +7068,30 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		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=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+  libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
 printf %s "checking whether cc puts quotes around section names... " >&6; }
 if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 65799e5685..c7f946c774 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1329,6 +1329,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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 0306c0bca9..ef38911280 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2023-09-28 17:49 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:49 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ed5dc493c8d6817b642e2337a4488985cf046886

commit ed5dc493c8d6817b642e2337a4488985cf046886
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
    
    clang does not support the flag.

Diff:
---
 configure         | 24 ++++++++++++++++++++++++
 configure.ac      |  8 ++++++++
 timezone/Makefile |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index eeb3ef49b8..45ee893d49 100755
--- a/configure
+++ b/configure
@@ -7194,6 +7194,30 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		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=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+  libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
 printf %s "checking whether cc puts quotes around section names... " >&6; }
 if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 6601331a06..7a7fe4a28a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1394,6 +1394,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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 0306c0bca9..ef38911280 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2023-08-30 12:36 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=330bfa67594ef2dc4100bac8ab1d7a407011c489

commit 330bfa67594ef2dc4100bac8ab1d7a407011c489
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         | 24 ++++++++++++++++++++++++
 configure.ac      |  8 ++++++++
 timezone/Makefile |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 3b1371b189..e6402558a4 100755
--- a/configure
+++ b/configure
@@ -7224,6 +7224,30 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		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=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+  libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
 printf %s "checking whether cc puts quotes around section names... " >&6; }
 if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 1f31d967ab..546e29443f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1416,6 +1416,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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 0306c0bca9..ef38911280 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2023-02-09 19:48 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:48 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=008f361bff56191ee5c1b2d57339f8e9f058b55e

commit 008f361bff56191ee5c1b2d57339f8e9f058b55e
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 073d474fcc..950af62b2c 100755
--- a/configure
+++ b/configure
@@ -6021,6 +6021,28 @@ $as_echo "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ $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 c2a90c070d..088cb3b860 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1432,6 +1432,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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 0306c0bca9..ef38911280 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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-10-28 17:41 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:41 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8d84f2ca397b25cf6e2cd0e3c1d21faf2ab64642

commit 8d84f2ca397b25cf6e2cd0e3c1d21faf2ab64642
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 fa6d97078e..d506cc43f1 100755
--- a/configure
+++ b/configure
@@ -6315,6 +6315,28 @@ $as_echo "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ $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 9dc967001a..dd824d90ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1447,6 +1447,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-10-04 12:59 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 12:59 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f2326cf7314ecba5a520bed3a5970563e2e1e5ac

commit f2326cf7314ecba5a520bed3a5970563e2e1e5ac
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 316c86dccb..42ad611106 100755
--- a/configure
+++ b/configure
@@ -6315,6 +6315,28 @@ $as_echo "$libc_cv_wno_ignored_attributes" >&6; }
 config_vars="$config_vars
 config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
 
+{ $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 e9b2c06be5..3cd9c8882b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1447,6 +1447,14 @@ rm -f conftest*])
 LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
 		[$libc_cv_wno_ignored_attributes])
 
+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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-06-09 13:16 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:16 UTC (permalink / raw)
  To: glibc-cvs

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-06-03 14:05 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:05 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cc486cea4ba8d8a2313f4dc6cd70d342317bae94

commit cc486cea4ba8d8a2313f4dc6cd70d342317bae94
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-05-13 14:19 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:19 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91b772e4422d56dfa2f8b9c47fe93e1779ff928c

commit 91b772e4422d56dfa2f8b9c47fe93e1779ff928c
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-05-12 19:33 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:33 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=45b719dec2d0a25ba21e32cfca62b6d62aca4b60

commit 45b719dec2d0a25ba21e32cfca62b6d62aca4b60
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-05-10 18:23 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:23 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bef25b8907df3190f87639c10fdc0c19d3bb75ec

commit bef25b8907df3190f87639c10fdc0c19d3bb75ec
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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-04-29 14:03 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:03 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f8c62e5cec6cde38b0e586c27078ffe9140048e7

commit f8c62e5cec6cde38b0e586c27078ffe9140048e7
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 40ff9bcdf5..60819646fd 100755
--- a/configure
+++ b/configure
@@ -6285,6 +6285,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 38e592d893..712464126a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1419,6 +1419,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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-04-04 12:53 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:53 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5a1321abad9466db37e8b3e84e0dbdceb07c2cb8

commit 5a1321abad9466db37e8b3e84e0dbdceb07c2cb8
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 8e471e6d31..ce99af633a 100755
--- a/configure
+++ b/configure
@@ -6412,6 +6412,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 127345f0cd..f7d556db88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-03-31 19:06 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:06 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=004a548a398d11e454f3135ca44f43aff9a5d26e

commit 004a548a398d11e454f3135ca44f43aff9a5d26e
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 8e471e6d31..ce99af633a 100755
--- a/configure
+++ b/configure
@@ -6412,6 +6412,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 127345f0cd..f7d556db88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-03-29 20:29 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:29 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=aca49b044e6608f8caf3b19595a9d6779d5e654a

commit aca49b044e6608f8caf3b19595a9d6779d5e654a
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 8e471e6d31..ce99af633a 100755
--- a/configure
+++ b/configure
@@ -6412,6 +6412,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 127345f0cd..f7d556db88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-03-16 18:02 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 18:02 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c7b1cd8055357c2c62a6271c499a2dd11dcc7d5

commit 9c7b1cd8055357c2c62a6271c499a2dd11dcc7d5
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 02cfdf9e47..e0589dbebe 100755
--- a/configure
+++ b/configure
@@ -6413,6 +6413,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 224e02464a..d5b5b5e88c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-03-15 18:40 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-15 18:40 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c7b1cd8055357c2c62a6271c499a2dd11dcc7d5

commit 9c7b1cd8055357c2c62a6271c499a2dd11dcc7d5
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 02cfdf9e47..e0589dbebe 100755
--- a/configure
+++ b/configure
@@ -6413,6 +6413,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 224e02464a..d5b5b5e88c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it
@ 2022-03-11 17:24 Adhemerval Zanella
  0 siblings, 0 replies; 23+ messages in thread
From: Adhemerval Zanella @ 2022-03-11 17:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=412faa205668e4288f5fcea0e5dd0675058f6ae8

commit 412faa205668e4288f5fcea0e5dd0675058f6ae8
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 02cfdf9e47..e0589dbebe 100755
--- a/configure
+++ b/configure
@@ -6413,6 +6413,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 224e02464a..d5b5b5e88c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2024-04-02 15:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 21:19 [glibc/azanella/clang] configure: Use -Wno-maybe-uninitialized iff compiler supports it Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
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 13:16 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

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).