gprofng: Don't hardcode -Wno-format-truncation/-Wno-switch
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 15 Mar 2022 15:56:39 +0000 (08:56 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 16 Mar 2022 13:43:24 +0000 (06:43 -0700)
commit61a1f2e71118206dd700fc1ddf244b2178bf6610
tree7618b0051db2116a8b36a8824c09c10c620fd623
parenta8b34706ef017a2032a78892a8595d36029f85a3
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.
gprofng/Makefile.in
gprofng/configure
gprofng/configure.ac
gprofng/src/Makefile.am
gprofng/src/Makefile.in