From c5b349e1c593031c200abc4b6f6e759af34e5b02 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 29 May 2021 18:02:02 -0400 Subject: [PATCH] sim: ppc: enable -Wno-format for mingw targets 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(+) diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 501b9f8db9..fcd74c64e4 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,8 @@ +2021-05-29 Mike Frysinger + + * configure.ac (WERROR_CFLAGS): Add -Wno-format for mingw32 hosts. + * configure: Regenerate. + 2021-05-29 Mike Frysinger * emul_generic.c (emul_write_status): Rename errno to err. diff --git a/sim/ppc/configure b/sim/ppc/configure index 235595b7b2..1c2cfda37e 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 21913a9132..9bd0ab734e 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, -- 2.34.1