daily update
[deliverable/binutils-gdb.git] / bfd / warning.m4
index 2e2dd424c0f76432446e9d22e063e110a554b7c9..0b0bf2f7f8bf28a8bb66f4416c47e97db1e9d3d3 100644 (file)
@@ -4,13 +4,23 @@ AC_DEFUN([AM_BINUTILS_WARNINGS],[
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 
 AC_ARG_ENABLE(werror,
-  [  --enable-werror    treat compile warnings as errors],
+  [  --enable-werror         treat compile warnings as errors],
   [case "${enableval}" in
      yes | y) ERROR_ON_WARNING="yes" ;;
      no | n)  ERROR_ON_WARNING="no" ;;
      *) 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
@@ -27,7 +37,7 @@ if test "${GCC}" = yes ; then
 fi
 
 AC_ARG_ENABLE(build-warnings,
-[  --enable-build-warnings Enable build-time compiler warnings],
+[  --enable-build-warnings enable build-time compiler warnings],
 [case "${enableval}" in
   yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
   no)  if test "${GCC}" = yes ; then
This page took 0.02444 seconds and 4 git commands to generate.