[binutils-gdb] sim: ppc: enable -Wno-format for mingw targets
Michael Frysinger
vapier@sourceware.org
Sat May 29 22:09:49 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c5b349e1c593031c200abc4b6f6e759af34e5b02
commit c5b349e1c593031c200abc4b6f6e759af34e5b02
Author: Mike Frysinger <vapier@gentoo.org>
Date: Sat May 29 18:02:02 2021 -0400
sim: ppc: enable -Wno-format for mingw targets
This mirrors what we do for other builds already.
Diff:
---
sim/ppc/ChangeLog | 5 +++++
sim/ppc/configure | 3 +++
sim/ppc/configure.ac | 5 +++++
3 files changed, 13 insertions(+)
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 501b9f8db9a..fcd74c64e4c 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,8 @@
+2021-05-29 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (WERROR_CFLAGS): Add -Wno-format for mingw32 hosts.
+ * configure: Regenerate.
+
2021-05-29 Mike Frysinger <vapier@gentoo.org>
* emul_generic.c (emul_write_status): Rename errno to err.
diff --git a/sim/ppc/configure b/sim/ppc/configure
index 235595b7b2c..1c2cfda37ed 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -4778,6 +4778,9 @@ WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
+case "${host}" in
+ *-*-mingw32*) WERROR_CFLAGS="$WERROR_CFLAGS -Wno-format" ;;
+esac
# Check whether --enable-sim-warnings was given.
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index 21913a91329..9bd0ab734eb 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -602,6 +602,11 @@ WERROR_CFLAGS=""
if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
+dnl Enable -Wno-format by default when using gcc on mingw since many
+dnl GCC versions complain about %I64.
+case "${host}" in
+ *-*-mingw32*) WERROR_CFLAGS="$WERROR_CFLAGS -Wno-format" ;;
+esac
AC_SUBST(WERROR_CFLAGS)
AC_ARG_ENABLE(sim-warnings,
More information about the Gdb-cvs
mailing list