]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libbacktrace: fix testsuite for clang
authorIan Lance Taylor <iant@golang.org>
Thu, 11 Jul 2024 23:07:06 +0000 (16:07 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 11 Jul 2024 23:12:47 +0000 (16:12 -0700)
* btest.c (test1, test3): Add optnone attribute.
* edtest.c (test1): Likewise.
* mtest.c (test1, test3): Likewise.
* configure.ac: Use -Wno-attributes and -Wno-unknown-attributes.
* configure: Regenerate.

libbacktrace/btest.c
libbacktrace/configure
libbacktrace/configure.ac
libbacktrace/edtest.c
libbacktrace/mtest.c

index d9fc372d33d966caf20a384a9a0eb46c0dcbeee0..c4b2db2cce2f5e78e4091961ceea4cec8f897324 100644 (file)
@@ -49,7 +49,7 @@ POSSIBILITY OF SUCH DAMAGE.  */
 
 /* Test the backtrace function with non-inlined functions.  */
 
-static int test1 (void) __attribute__ ((noinline, noclone, unused));
+static int test1 (void) __attribute__ ((noinline, noclone, optnone, unused));
 static int f2 (int) __attribute__ ((noinline, noclone));
 static int f3 (int, int) __attribute__ ((noinline, noclone));
 
@@ -163,7 +163,7 @@ f13 (int f1line, int f2line)
 
 /* Test the backtrace_simple function with non-inlined functions.  */
 
-static int test3 (void) __attribute__ ((noinline, noclone, unused));
+static int test3 (void) __attribute__ ((noinline, noclone, optnone, unused));
 static int f22 (int) __attribute__ ((noinline, noclone));
 static int f23 (int, int) __attribute__ ((noinline, noclone));
 
index ab94a85f45c1525a90bac2396a1a9885acb31f15..fe0bb2083eb169a7a632151dff1af80eb54f55d4 100755 (executable)
@@ -12384,7 +12384,8 @@ WARN_FLAGS=
 save_CFLAGS="$CFLAGS"
 for real_option in -W -Wall -Wwrite-strings -Wstrict-prototypes \
                          -Wmissing-prototypes -Wold-style-definition \
-                         -Wmissing-format-attribute -Wcast-qual; do
+                         -Wmissing-format-attribute -Wcast-qual \
+                         -Wno-attributes -Wno-unknown-attributes; do
   # Do the check with the no- prefix removed since gcc silently
   # accepts any -Wno-* option on purpose
   case $real_option in
index 59e9c415db8f74d848e6c331667b25bea23f191d..bfd7f35d2d2b4c58a259210be8e56945e006ead2 100644 (file)
@@ -144,7 +144,8 @@ AC_SUBST(EXTRA_FLAGS)
 
 ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
                          -Wmissing-prototypes -Wold-style-definition \
-                         -Wmissing-format-attribute -Wcast-qual],
+                         -Wmissing-format-attribute -Wcast-qual \
+                         -Wno-attributes -Wno-unknown-attributes],
                          [WARN_FLAGS])
 
 AC_ARG_ENABLE([werror],
index d99b8a602950fb7605801e257ed50a283ff3034b..b644d93788cbed6310f7c7fc408d969ca8c2fc2a 100644 (file)
@@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE.  */
 
 #include "testlib.h"
 
-static int test1 (void) __attribute__ ((noinline, noclone, unused));
+static int test1 (void) __attribute__ ((noinline, noclone, optnone, unused));
 extern int f2 (int);
 extern int f3 (int, int);
 
index 9afe708951483de99a5e08aefe4601960116b8f0..f793391653dc26d086d74ddaf682516a55eebc09 100644 (file)
@@ -47,7 +47,7 @@ POSSIBILITY OF SUCH DAMAGE.  */
 
 #include "testlib.h"
 
-static int test1 (void) __attribute__ ((noinline, noclone, unused));
+static int test1 (void) __attribute__ ((noinline, noclone, optnone, unused));
 static int f2 (int) __attribute__ ((noinline, noclone));
 static int f3 (int, int) __attribute__ ((noinline, noclone));
 
@@ -211,7 +211,7 @@ f3 (int f1line __attribute__ ((unused)), int f2line __attribute__ ((unused)))
 
 /* Test the backtrace_simple function with non-inlined functions.  */
 
-static int test3 (void) __attribute__ ((noinline, noclone, unused));
+static int test3 (void) __attribute__ ((noinline, noclone, optnone, unused));
 static int f22 (int) __attribute__ ((noinline, noclone));
 static int f23 (int, int) __attribute__ ((noinline, noclone));