X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fwarning.m4;h=244dd4483ce79e86c155502e40b58caf6e173e2e;hb=95830fd17d6ae253d8f6c2595188cadd59058799;hp=b4a2f48f8ba21fc337fca7c99d4233a0a2d50b91;hpb=91d6fa6a035cc7d0b7be5c99c194a64cb80924b0;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/warning.m4 b/bfd/warning.m4 index b4a2f48f8b..244dd4483c 100644 --- a/bfd/warning.m4 +++ b/bfd/warning.m4 @@ -1,7 +1,25 @@ dnl Common configure.in fragment +dnl +dnl Copyright 2012 Free Software Foundation +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; see the file COPYING3. If not see +dnl . +dnl AC_DEFUN([AM_BINUTILS_WARNINGS],[ -GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow" +GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" +AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow") AC_ARG_ENABLE(werror, [ --enable-werror treat compile warnings as errors], @@ -11,7 +29,7 @@ AC_ARG_ENABLE(werror, *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; esac]) -# Enable -Wno-format by default when using gcc on mingw +# Disable -Wformat by default when using gcc on mingw case "${host}" in *-*-mingw32*) if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then