summaryrefslogtreecommitdiff
path: root/gprofng/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2022-03-15 08:56:39 -0700
committerH.J. Lu <hjl.tools@gmail.com>2022-03-16 06:43:24 -0700
commit61a1f2e71118206dd700fc1ddf244b2178bf6610 (patch)
tree7618b0051db2116a8b36a8824c09c10c620fd623 /gprofng/configure.ac
parenta8b34706ef017a2032a78892a8595d36029f85a3 (diff)
downloadbinutils-gdb-61a1f2e71118206dd700fc1ddf244b2178bf6610.tar.gz
gprofng: Don't hardcode -Wno-format-truncation/-Wno-switch
Use -Wno-format-truncation and -Wno-switch only if they are supported. PR gprof/28969 * configure.ac (GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS): New AC_SUBST for -Wno-format-truncation. (GPROFNG_NO_SWITCH_CFLAGS): New AC_SUBST for -Wno-switch. * Makefile.in: Regenerate. * configure: Likewise. * src/Makefile.am (AM_CFLAGS): Replace -Wno-format-truncation and -Wno-switch with GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS and GPROFNG_NO_SWITCH_CFLAGS. * src/Makefile.in: Regenerate.
Diffstat (limited to 'gprofng/configure.ac')
-rw-r--r--gprofng/configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/gprofng/configure.ac b/gprofng/configure.ac
index fa924dcee62..23fee8705ac 100644
--- a/gprofng/configure.ac
+++ b/gprofng/configure.ac
@@ -42,6 +42,8 @@ AC_SUBST(GPROFNG_LIBADD)
ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
ACX_PROG_CC_WARNING_OPTS([-Wall], [gprofng_cflags])
+ACX_PROG_CC_WARNING_OPTS([-Wno-format-truncation], [GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS])
+ACX_PROG_CC_WARNING_OPTS([-Wno-switch], [GPROFNG_NO_SWITCH_CFLAGS])
gprofng_cppflags="-U_ASM"
build_collector=
build_src=
@@ -174,6 +176,8 @@ AM_CONDITIONAL([BUILD_MAN], [test x$build_man = xtrue])
AC_SUBST(LD_NO_AS_NEEDED, [${no_as_needed}])
AC_SUBST(GPROFNG_CFLAGS, [${gprofng_cflags}])
+AC_SUBST(GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS)
+AC_SUBST(GPROFNG_NO_SWITCH_CFLAGS)
AC_SUBST(GPROFNG_CPPFLAGS, [${gprofng_cppflags}])
AC_SUBST(GPROFNG_LIBDIR, [${libdir}])