[PATCH/committed] sim: ppc: enable -Wno-format for mingw targets

Message ID 20210529220949.6856-1-vapier@gentoo.org
State New
Headers show
Series
  • [PATCH/committed] sim: ppc: enable -Wno-format for mingw targets
Related show

Commit Message

Luis Machado via Gdb-patches May 29, 2021, 10:09 p.m.
This mirrors what we do for other builds already.
---
 sim/ppc/ChangeLog    | 5 +++++
 sim/ppc/configure    | 3 +++
 sim/ppc/configure.ac | 5 +++++
 3 files changed, 13 insertions(+)

-- 
2.31.1

Patch

diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 501b9f8db9ad..fcd74c64e4c1 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 235595b7b2c4..1c2cfda37ed8 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 21913a913294..9bd0ab734eb0 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,