common/
[deliverable/binutils-gdb.git] / bfd / warning.m4
index b366cadeb29365e92156d87b3c800560c9d9730b..b4a2f48f8ba21fc337fca7c99d4233a0a2d50b91 100644 (file)
@@ -1,7 +1,7 @@
 dnl Common configure.in fragment
 
 AC_DEFUN([AM_BINUTILS_WARNINGS],[
-GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow"
 
 AC_ARG_ENABLE(werror,
   [  --enable-werror         treat compile warnings as errors],
@@ -11,6 +11,16 @@ AC_ARG_ENABLE(werror,
      *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
    esac])
 
+# Enable -Wno-format by default when using gcc on mingw
+case "${host}" in
+  *-*-mingw32*)
+    if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+      GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format"
+    fi
+    ;;
+  *) ;;
+esac
+
 # Enable -Werror by default when using gcc
 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
     ERROR_ON_WARNING=yes
This page took 0.024162 seconds and 4 git commands to generate.