public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] configure: Use -Wno-restrict iff compiler supports it
@ 2024-04-17 20:13 Adhemerval Zanella
  0 siblings, 0 replies; 8+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:13 UTC (permalink / raw)
  To: glibc-cvs

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

commit 1edd4ace3765da93cb175b5d83cb846102322148
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:49:52 2023 -0300

    configure: Use -Wno-restrict iff compiler supports it

Diff:
---
 configure      | 24 ++++++++++++++++++++++++
 configure.ac   |  8 ++++++++
 libio/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index d5ce50849a..c01ae25e90 100755
--- a/configure
+++ b/configure
@@ -7218,6 +7218,30 @@ 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 for -Wno-restrict" >&5
+printf %s "checking for -Wno-restrict... " >&6; }
+if test ${libc_cv_wno_restrict+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		if { ac_try='${CC-cc} -Werror -Wno-restrict -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_restrict=-Wno-restrict
+else $as_nop
+  libc_cv_wno_restrict=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_restrict" >&5
+printf "%s\n" "$libc_cv_wno_restrict" >&6; }
+config_vars="$config_vars
+config-cflags-wno-restrict = $libc_cv_wno_restrict"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
 printf %s "checking for -fexcess-precision=standard... " >&6; }
 if test ${libc_cv_fexcess_precision_standard+y}
diff --git a/configure.ac b/configure.ac
index 5f75b25105..826d55de64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1397,6 +1397,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
 LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
 		[$libc_cv_wno_maybe_uninitialized])
 
+AC_CACHE_CHECK([for -Wno-restrict], libc_cv_wno_restrict, [dnl
+		LIBC_TRY_CC_OPTION([-Werror -Wno-restrict],
+				   [libc_cv_wno_restrict=-Wno-restrict],
+				   [libc_cv_wno_restrict=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-restrict],
+		[$libc_cv_wno_restrict])
+
 AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
 		LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
 				   [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
diff --git a/libio/Makefile b/libio/Makefile
index 27623c92a9..385bee9b7d 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -187,8 +187,8 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source)
 CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
 
 # These test cases intentionally use overlapping arguments
-CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source)
-CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source)
+CFLAGS-tst-sprintf-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
+CFLAGS-tst-sprintf-chk-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
 
 LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map

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

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

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

commit b3bb80c17567ef11cab70a9fc24d6656e58ccb79
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:49:52 2023 -0300

    configure: Use -Wno-restrict iff compiler supports it

Diff:
---
 configure      | 24 ++++++++++++++++++++++++
 configure.ac   |  8 ++++++++
 libio/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index d5ce50849a..c01ae25e90 100755
--- a/configure
+++ b/configure
@@ -7218,6 +7218,30 @@ 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 for -Wno-restrict" >&5
+printf %s "checking for -Wno-restrict... " >&6; }
+if test ${libc_cv_wno_restrict+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		if { ac_try='${CC-cc} -Werror -Wno-restrict -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_restrict=-Wno-restrict
+else $as_nop
+  libc_cv_wno_restrict=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_restrict" >&5
+printf "%s\n" "$libc_cv_wno_restrict" >&6; }
+config_vars="$config_vars
+config-cflags-wno-restrict = $libc_cv_wno_restrict"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
 printf %s "checking for -fexcess-precision=standard... " >&6; }
 if test ${libc_cv_fexcess_precision_standard+y}
diff --git a/configure.ac b/configure.ac
index 5f75b25105..826d55de64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1397,6 +1397,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
 LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
 		[$libc_cv_wno_maybe_uninitialized])
 
+AC_CACHE_CHECK([for -Wno-restrict], libc_cv_wno_restrict, [dnl
+		LIBC_TRY_CC_OPTION([-Werror -Wno-restrict],
+				   [libc_cv_wno_restrict=-Wno-restrict],
+				   [libc_cv_wno_restrict=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-restrict],
+		[$libc_cv_wno_restrict])
+
 AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
 		LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
 				   [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
diff --git a/libio/Makefile b/libio/Makefile
index 27623c92a9..385bee9b7d 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -187,8 +187,8 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source)
 CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
 
 # These test cases intentionally use overlapping arguments
-CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source)
-CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source)
+CFLAGS-tst-sprintf-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
+CFLAGS-tst-sprintf-chk-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
 
 LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map

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

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

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

commit 5b96d7fe7f569273a88db5f78e01d41ce088a7f5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:49:52 2023 -0300

    configure: Use -Wno-restrict iff compiler supports it

Diff:
---
 configure      | 24 ++++++++++++++++++++++++
 configure.ac   |  8 ++++++++
 libio/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 9c577b2bbf..7dc395193a 100755
--- a/configure
+++ b/configure
@@ -7215,6 +7215,30 @@ 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 for -Wno-restrict" >&5
+printf %s "checking for -Wno-restrict... " >&6; }
+if test ${libc_cv_wno_restrict+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		if { ac_try='${CC-cc} -Werror -Wno-restrict -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_restrict=-Wno-restrict
+else $as_nop
+  libc_cv_wno_restrict=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_restrict" >&5
+printf "%s\n" "$libc_cv_wno_restrict" >&6; }
+config_vars="$config_vars
+config-cflags-wno-restrict = $libc_cv_wno_restrict"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
 printf %s "checking for -fexcess-precision=standard... " >&6; }
 if test ${libc_cv_fexcess_precision_standard+y}
diff --git a/configure.ac b/configure.ac
index f0ef446df3..fc50642673 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1394,6 +1394,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
 LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
 		[$libc_cv_wno_maybe_uninitialized])
 
+AC_CACHE_CHECK([for -Wno-restrict], libc_cv_wno_restrict, [dnl
+		LIBC_TRY_CC_OPTION([-Werror -Wno-restrict],
+				   [libc_cv_wno_restrict=-Wno-restrict],
+				   [libc_cv_wno_restrict=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-restrict],
+		[$libc_cv_wno_restrict])
+
 AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
 		LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
 				   [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
diff --git a/libio/Makefile b/libio/Makefile
index 27623c92a9..385bee9b7d 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -187,8 +187,8 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source)
 CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
 
 # These test cases intentionally use overlapping arguments
-CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source)
-CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source)
+CFLAGS-tst-sprintf-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
+CFLAGS-tst-sprintf-chk-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
 
 LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map

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

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

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

commit 340ef489def86e08f42a58e96f77be7f335b0005
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:49:52 2023 -0300

    configure: Use -Wno-restrict iff compiler supports it

Diff:
---
 configure      | 24 ++++++++++++++++++++++++
 configure.ac   |  8 ++++++++
 libio/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 9c577b2bbf..7dc395193a 100755
--- a/configure
+++ b/configure
@@ -7215,6 +7215,30 @@ 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 for -Wno-restrict" >&5
+printf %s "checking for -Wno-restrict... " >&6; }
+if test ${libc_cv_wno_restrict+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		if { ac_try='${CC-cc} -Werror -Wno-restrict -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_restrict=-Wno-restrict
+else $as_nop
+  libc_cv_wno_restrict=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_restrict" >&5
+printf "%s\n" "$libc_cv_wno_restrict" >&6; }
+config_vars="$config_vars
+config-cflags-wno-restrict = $libc_cv_wno_restrict"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
 printf %s "checking for -fexcess-precision=standard... " >&6; }
 if test ${libc_cv_fexcess_precision_standard+y}
diff --git a/configure.ac b/configure.ac
index f0ef446df3..fc50642673 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1394,6 +1394,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
 LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
 		[$libc_cv_wno_maybe_uninitialized])
 
+AC_CACHE_CHECK([for -Wno-restrict], libc_cv_wno_restrict, [dnl
+		LIBC_TRY_CC_OPTION([-Werror -Wno-restrict],
+				   [libc_cv_wno_restrict=-Wno-restrict],
+				   [libc_cv_wno_restrict=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-restrict],
+		[$libc_cv_wno_restrict])
+
 AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
 		LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
 				   [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
diff --git a/libio/Makefile b/libio/Makefile
index 27623c92a9..385bee9b7d 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -187,8 +187,8 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source)
 CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
 
 # These test cases intentionally use overlapping arguments
-CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source)
-CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source)
+CFLAGS-tst-sprintf-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
+CFLAGS-tst-sprintf-chk-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
 
 LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map

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

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

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

commit 207e743451a25c1fbce1054cccfd31bc0dcd8b6f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:49:52 2023 -0300

    configure: Use -Wno-restrict iff compiler supports it

Diff:
---
 configure      | 24 ++++++++++++++++++++++++
 configure.ac   |  8 ++++++++
 libio/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 9c577b2bbf..7dc395193a 100755
--- a/configure
+++ b/configure
@@ -7215,6 +7215,30 @@ 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 for -Wno-restrict" >&5
+printf %s "checking for -Wno-restrict... " >&6; }
+if test ${libc_cv_wno_restrict+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		if { ac_try='${CC-cc} -Werror -Wno-restrict -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_restrict=-Wno-restrict
+else $as_nop
+  libc_cv_wno_restrict=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_restrict" >&5
+printf "%s\n" "$libc_cv_wno_restrict" >&6; }
+config_vars="$config_vars
+config-cflags-wno-restrict = $libc_cv_wno_restrict"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
 printf %s "checking for -fexcess-precision=standard... " >&6; }
 if test ${libc_cv_fexcess_precision_standard+y}
diff --git a/configure.ac b/configure.ac
index f0ef446df3..fc50642673 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1394,6 +1394,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
 LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
 		[$libc_cv_wno_maybe_uninitialized])
 
+AC_CACHE_CHECK([for -Wno-restrict], libc_cv_wno_restrict, [dnl
+		LIBC_TRY_CC_OPTION([-Werror -Wno-restrict],
+				   [libc_cv_wno_restrict=-Wno-restrict],
+				   [libc_cv_wno_restrict=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-restrict],
+		[$libc_cv_wno_restrict])
+
 AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
 		LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
 				   [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
diff --git a/libio/Makefile b/libio/Makefile
index 27623c92a9..385bee9b7d 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -187,8 +187,8 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source)
 CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
 
 # These test cases intentionally use overlapping arguments
-CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source)
-CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source)
+CFLAGS-tst-sprintf-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
+CFLAGS-tst-sprintf-chk-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
 
 LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map

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

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

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

commit b42d0f75b071481e8a4844b0887d229a21ee0c0e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:49:52 2023 -0300

    configure: Use -Wno-restrict iff compiler supports it

Diff:
---
 configure      | 24 ++++++++++++++++++++++++
 configure.ac   |  8 ++++++++
 libio/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 04cefde3d3..07f5ddedc0 100755
--- a/configure
+++ b/configure
@@ -7214,6 +7214,30 @@ 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 for -Wno-restrict" >&5
+printf %s "checking for -Wno-restrict... " >&6; }
+if test ${libc_cv_wno_restrict+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		if { ac_try='${CC-cc} -Werror -Wno-restrict -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_restrict=-Wno-restrict
+else $as_nop
+  libc_cv_wno_restrict=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_restrict" >&5
+printf "%s\n" "$libc_cv_wno_restrict" >&6; }
+config_vars="$config_vars
+config-cflags-wno-restrict = $libc_cv_wno_restrict"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
 printf %s "checking for -fexcess-precision=standard... " >&6; }
 if test ${libc_cv_fexcess_precision_standard+y}
diff --git a/configure.ac b/configure.ac
index f0ef446df3..fc50642673 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1394,6 +1394,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
 LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
 		[$libc_cv_wno_maybe_uninitialized])
 
+AC_CACHE_CHECK([for -Wno-restrict], libc_cv_wno_restrict, [dnl
+		LIBC_TRY_CC_OPTION([-Werror -Wno-restrict],
+				   [libc_cv_wno_restrict=-Wno-restrict],
+				   [libc_cv_wno_restrict=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-restrict],
+		[$libc_cv_wno_restrict])
+
 AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
 		LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
 				   [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
diff --git a/libio/Makefile b/libio/Makefile
index 287ec11338..549912a06c 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -187,8 +187,8 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source)
 CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
 
 # These test cases intentionally use overlapping arguments
-CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source)
-CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source)
+CFLAGS-tst-sprintf-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
+CFLAGS-tst-sprintf-chk-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
 
 LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map

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

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

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

commit f19deb6c3bd039159c63fd21f1b6219973175854
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:49:52 2023 -0300

    configure: Use -Wno-restrict iff compiler supports it

Diff:
---
 configure      | 24 ++++++++++++++++++++++++
 configure.ac   |  8 ++++++++
 libio/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index bdfae97469..19053863f7 100755
--- a/configure
+++ b/configure
@@ -7340,6 +7340,30 @@ 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 for -Wno-restrict" >&5
+printf %s "checking for -Wno-restrict... " >&6; }
+if test ${libc_cv_wno_restrict+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		if { ac_try='${CC-cc} -Werror -Wno-restrict -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_restrict=-Wno-restrict
+else $as_nop
+  libc_cv_wno_restrict=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_restrict" >&5
+printf "%s\n" "$libc_cv_wno_restrict" >&6; }
+config_vars="$config_vars
+config-cflags-wno-restrict = $libc_cv_wno_restrict"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
 printf %s "checking for -fexcess-precision=standard... " >&6; }
 if test ${libc_cv_fexcess_precision_standard+y}
diff --git a/configure.ac b/configure.ac
index b1d8461368..ed7ec0ca74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1459,6 +1459,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
 LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
 		[$libc_cv_wno_maybe_uninitialized])
 
+AC_CACHE_CHECK([for -Wno-restrict], libc_cv_wno_restrict, [dnl
+		LIBC_TRY_CC_OPTION([-Werror -Wno-restrict],
+				   [libc_cv_wno_restrict=-Wno-restrict],
+				   [libc_cv_wno_restrict=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-restrict],
+		[$libc_cv_wno_restrict])
+
 AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
 		LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
 				   [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
diff --git a/libio/Makefile b/libio/Makefile
index 287ec11338..549912a06c 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -187,8 +187,8 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source)
 CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
 
 # These test cases intentionally use overlapping arguments
-CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source)
-CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source)
+CFLAGS-tst-sprintf-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
+CFLAGS-tst-sprintf-chk-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
 
 LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map

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

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

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

commit c9d7a5f98e0f83eca593a554d619598080aeedf9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Jul 27 15:49:52 2023 -0300

    configure: Use -Wno-restrict iff compiler supports it

Diff:
---
 configure      | 24 ++++++++++++++++++++++++
 configure.ac   |  8 ++++++++
 libio/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index f593aeb9fe..52c049c0ba 100755
--- a/configure
+++ b/configure
@@ -7316,6 +7316,30 @@ 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 for -Wno-restrict" >&5
+printf %s "checking for -Wno-restrict... " >&6; }
+if test ${libc_cv_wno_restrict+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  		if { ac_try='${CC-cc} -Werror -Wno-restrict -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_restrict=-Wno-restrict
+else $as_nop
+  libc_cv_wno_restrict=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_restrict" >&5
+printf "%s\n" "$libc_cv_wno_restrict" >&6; }
+config_vars="$config_vars
+config-cflags-wno-restrict = $libc_cv_wno_restrict"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
 printf %s "checking for -fexcess-precision=standard... " >&6; }
 if test ${libc_cv_fexcess_precision_standard+y}
diff --git a/configure.ac b/configure.ac
index 8782cf8729..e8735c3b0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1451,6 +1451,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
 LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
 		[$libc_cv_wno_maybe_uninitialized])
 
+AC_CACHE_CHECK([for -Wno-restrict], libc_cv_wno_restrict, [dnl
+		LIBC_TRY_CC_OPTION([-Werror -Wno-restrict],
+				   [libc_cv_wno_restrict=-Wno-restrict],
+				   [libc_cv_wno_restrict=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-restrict],
+		[$libc_cv_wno_restrict])
+
 AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
 		LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
 				   [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
diff --git a/libio/Makefile b/libio/Makefile
index 287ec11338..549912a06c 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -187,8 +187,8 @@ CFLAGS-tst-bz24153.c += $(no-fortify-source)
 CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
 
 # These test cases intentionally use overlapping arguments
-CFLAGS-tst-sprintf-ub.c += -Wno-restrict $(no-fortify-source)
-CFLAGS-tst-sprintf-chk-ub.c += -Wno-restrict $(no-fortify-source)
+CFLAGS-tst-sprintf-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
+CFLAGS-tst-sprintf-chk-ub.c += $(config-cflags-wno-restrict) $(no-fortify-source)
 
 LDFLAGS-tst-bz24228 = -Wl,--version-script=tst-bz24228.map

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

end of thread, other threads:[~2024-04-17 20:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 20:13 [glibc/azanella/clang] configure: Use -Wno-restrict iff compiler supports it Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:59 Adhemerval Zanella
2024-02-09 17:38 Adhemerval Zanella
2024-02-07 14:13 Adhemerval Zanella
2024-01-29 18:03 Adhemerval Zanella
2023-12-21 19:00 Adhemerval Zanella
2023-09-28 17:58 Adhemerval Zanella
2023-08-30 12:42 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).