* Makefile.am (NO_WERROR): Define.
	* warning.m4: New file
	* acinclude.m4: Include warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
bfd/doc/
	* Makefile.in: Regenerate.
binutils/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* configure.in: Include ../bfd/warning.m4 contents.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
gas/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* acinclude.m4: Include ../bfd/warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
gprof/
	* Makefile.am (NO_WERROR): Define.
	* acinclude.m4: Include ../bfd/warning.m4.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
ld/
	* Makefile.am (NO_WERROR): Define.  Use instead of -Wno-error.
	* configure.in: Include ../bfd/warning.m4 contents.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
opcodes/
	* Makefile.am (NO_WERROR): Define.
	* configure.in: Invoke AM_BINUTILS_WARNINGS.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
This commit is contained in:
Alan Modra 2005-04-14 05:26:44 +00:00
parent 92ceba1e4f
commit 9e9b66a956
40 changed files with 685 additions and 659 deletions

View File

@ -1,3 +1,12 @@
2005-04-14 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (NO_WERROR): Define.
* warning.m4: New file
* acinclude.m4: Include warning.m4.
* configure.in: Invoke AM_BINUTILS_WARNINGS.
* Makefile.in: Regenerate.
* configure: Regenerate.
2005-04-14 Alan Modra <amodra@bigpond.net.au> 2005-04-14 Alan Modra <amodra@bigpond.net.au>
* merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors. * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.

View File

@ -18,6 +18,7 @@ bfdincludedir = @bfdincludedir@
bfdlib_LTLIBRARIES = libbfd.la bfdlib_LTLIBRARIES = libbfd.la
WARN_CFLAGS = @WARN_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) AM_CFLAGS = $(WARN_CFLAGS)
# bfd.h goes here, for now # bfd.h goes here, for now

View File

@ -52,8 +52,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../config/accross.m4 \ $(top_srcdir)/../config/accross.m4 \
$(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \ $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.in $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@ -168,6 +168,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

View File

@ -1,6 +1,7 @@
sinclude(../config/accross.m4) sinclude(../config/accross.m4)
sinclude(../config/acx.m4) sinclude(../config/acx.m4)
sinclude(../bfd/bfd.m4) sinclude(../bfd/bfd.m4)
sinclude(../bfd/warning.m4)
dnl See whether we need to use fopen-bin.h rather than fopen-same.h. dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
AC_DEFUN([BFD_BINARY_FOPEN], AC_DEFUN([BFD_BINARY_FOPEN],

43
bfd/configure vendored
View File

@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL WARN_CFLAGS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l HDEFINES BFD_HOST_64BIT_LONG BFD_HOST_LONG_LONG BFD_HOST_64_BIT_DEFINED BFD_HOST_64_BIT BFD_HOST_U_64_BIT CC_FOR_BUILD EXEEXT_FOR_BUILD COREFILE COREFLAG WIN32LDFLAGS WIN32LIBADD TDEFINES wordsize bfd_libs all_backends bfd_backends bfd_machines bfd_default_target_size bfd_file_ptr bfd_ufile_ptr tdefaults LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l HDEFINES BFD_HOST_64BIT_LONG BFD_HOST_LONG_LONG BFD_HOST_64_BIT_DEFINED BFD_HOST_64_BIT BFD_HOST_U_64_BIT CC_FOR_BUILD EXEEXT_FOR_BUILD COREFILE COREFLAG WIN32LDFLAGS WIN32LIBADD TDEFINES wordsize bfd_libs all_backends bfd_backends bfd_machines bfd_default_target_size bfd_file_ptr bfd_ufile_ptr tdefaults LIBOBJS LTLIBOBJS'
ac_subst_files='' ac_subst_files=''
# Initialize some variables set by options. # Initialize some variables set by options.
@ -860,7 +860,7 @@ Optional Features:
--enable-targets alternative target configurations --enable-targets alternative target configurations
--enable-commonbfdlib build shared BFD/opcodes/libiberty library --enable-commonbfdlib build shared BFD/opcodes/libiberty library
--enable-werror treat compile warnings as errors --enable-werror treat compile warnings as errors
--enable-build-warnings Enable build-time compiler warnings if gcc is used --enable-build-warnings Enable build-time compiler warnings
--enable-maintainer-mode enable make rules and dependencies not useful --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer (and sometimes confusing) to the casual installer
--enable-install-libbfd controls installation of libbfd and related headers --enable-install-libbfd controls installation of libbfd and related headers
@ -4263,7 +4263,8 @@ esac
else else
want_mmap=false want_mmap=false
fi; fi;
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-werror or --disable-werror was given. # Check whether --enable-werror or --disable-werror was given.
if test "${enable_werror+set}" = set; then if test "${enable_werror+set}" = set; then
@ -4277,11 +4278,15 @@ echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
esac esac
fi; fi;
# Enable -Werror by default, suppressing it only for --disable-werror # Enable -Werror by default when using gcc
# or --disable-build-warnings. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
if test "${ERROR_ON_WARNING}" != no ERROR_ON_WARNING=yes
then fi
build_warnings="$build_warnings -Werror"
NO_WERROR=
if test "${ERROR_ON_WARNING}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi fi
# Check whether --enable-build-warnings or --disable-build-warnings was given. # Check whether --enable-build-warnings or --disable-build-warnings was given.
@ -4289,22 +4294,23 @@ if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings" enableval="$enable_build_warnings"
case "${enableval}" in case "${enableval}" in
yes) ;; yes) ;;
no) build_warnings="-w";; no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";; WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"` *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";; WARN_CFLAGS="${t} ${WARN_CFLAGS}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then fi;
echo "Setting warning flags = $build_warnings" 6>&1
fi if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
fi; WARN_CFLAGS="" echo "Setting warning flags = $WARN_CFLAGS" 6>&1
if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi fi
ac_config_headers="$ac_config_headers config.h:config.in" ac_config_headers="$ac_config_headers config.h:config.in"
@ -13517,6 +13523,7 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@LN_S@,$LN_S,;t t s,@LN_S@,$LN_S,;t t
s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBTOOL@,$LIBTOOL,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t s,@MAINT@,$MAINT,;t t

View File

@ -51,42 +51,7 @@ AC_ARG_WITH(mmap,
*) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;; *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
esac],[want_mmap=false])dnl esac],[want_mmap=false])dnl
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AM_BINUTILS_WARNINGS
AC_ARG_ENABLE(werror,
[ --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 -Werror by default, suppressing it only for --disable-werror
# or --disable-build-warnings.
if test "${ERROR_ON_WARNING}" != no
then
build_warnings="$build_warnings -Werror"
fi
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
AC_SUBST(WARN_CFLAGS)
AM_CONFIG_HEADER(config.h:config.in) AM_CONFIG_HEADER(config.h:config.in)

View File

@ -1,3 +1,7 @@
2005-04-14 Alan Modra <amodra@bigpond.net.au>
* Makefile.in: Regenerate.
2005-04-12 Alan Modra <amodra@bigpond.net.au> 2005-04-12 Alan Modra <amodra@bigpond.net.au>
* Makefile.in: Regenerate. * Makefile.in: Regenerate.

View File

@ -42,8 +42,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../config/accross.m4 \ $(top_srcdir)/../config/accross.m4 \
$(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \ $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.in $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@ -132,6 +132,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

43
bfd/warning.m4 Normal file
View File

@ -0,0 +1,43 @@
dnl Common configure.in fragment
AC_DEFUN([AM_BINUTILS_WARNINGS],[
WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(werror,
[ --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 -Werror by default when using gcc
if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
ERROR_ON_WARNING=yes
fi
NO_WERROR=
if test "${ERROR_ON_WARNING}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings],
[case "${enableval}" in
yes) ;;
no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
WARN_CFLAGS="${t} ${WARN_CFLAGS}";;
*) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac])
if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
echo "Setting warning flags = $WARN_CFLAGS" 6>&1
fi
AC_SUBST(WARN_CFLAGS)
AC_SUBST(NO_WERROR)
])

View File

@ -1,3 +1,11 @@
2005-04-14 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (NO_WERROR): Define. Use instead of -Wno-error.
* configure.in: Include ../bfd/warning.m4 contents.
* Makefile.in: Regenerate.
* configure: Regenerate.
* doc/Makefile.in: Regenerate.
2005-04-12 Alan Modra <amodra@bigpond.net.au> 2005-04-12 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am". * Makefile.am: Run "make dep-am".

View File

@ -20,6 +20,7 @@ YFLAGS = -d
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
WARN_CFLAGS = @WARN_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) AM_CFLAGS = $(WARN_CFLAGS)
# these two are almost the same program # these two are almost the same program
@ -245,21 +246,21 @@ sysinfo.h: sysinfo.c
# Disable -Werror, if it has been enabled, since old versions of bison/ # Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings. # yacc will produce working code which contain compile time warnings.
arparse.o: arparse.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
arlex.o: arlex.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
sysroff.o: sysroff.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
defparse.o: defparse.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
deflex.o: deflex.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
nlmheader.o: nlmheader.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
rcparse.o: rcparse.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
rclex.o: rclex.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS) srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)

View File

@ -143,6 +143,7 @@ YFLAGS = -d
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
WARN_CFLAGS = @WARN_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) AM_CFLAGS = $(WARN_CFLAGS)
# these two are almost the same program # these two are almost the same program
@ -1015,21 +1016,21 @@ sysinfo.h: sysinfo.c
# Disable -Werror, if it has been enabled, since old versions of bison/ # Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings. # yacc will produce working code which contain compile time warnings.
arparse.o: arparse.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
arlex.o: arlex.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
sysroff.o: sysroff.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
defparse.o: defparse.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
deflex.o: deflex.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
nlmheader.o: nlmheader.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
rcparse.o: rcparse.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
rclex.o: rclex.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
dlltool.o: dlltool.o:
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c $(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c

399
binutils/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,10 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl esac])dnl
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" dnl FIXME: The following is bfd/warning.m4 contents expanded
dnl When converting to current autotools, please replace with
dnl AM_BINUTILS_WARNINGS
WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(werror, AC_ARG_ENABLE(werror,
[ --enable-werror treat compile warnings as errors], [ --enable-werror treat compile warnings as errors],
@ -39,32 +42,35 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac]) esac])
# Enable -Werror by default, suppressing it only for --disable-werror # Enable -Werror by default when using gcc
# or --disable-build-warnings. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
if test "${ERROR_ON_WARNING}" != no ERROR_ON_WARNING=yes
then
build_warnings="$build_warnings -Werror"
fi fi
NO_WERROR=
if test "${ERROR_ON_WARNING}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi
AC_ARG_ENABLE(build-warnings, AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], [ --enable-build-warnings Enable build-time compiler warnings],
[case "${enableval}" in [case "${enableval}" in
yes) ;; yes) ;;
no) build_warnings="-w";; no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";; WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"` *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";; WARN_CFLAGS="${t} ${WARN_CFLAGS}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac esac])
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1 if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
fi])dnl echo "Setting warning flags = $WARN_CFLAGS" 6>&1
WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi fi
AC_SUBST(WARN_CFLAGS) AC_SUBST(WARN_CFLAGS)
AC_SUBST(NO_WERROR)
AM_CONFIG_HEADER(config.h:config.in) AM_CONFIG_HEADER(config.h:config.in)

View File

@ -108,6 +108,7 @@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
NLMCONV_DEFS = @NLMCONV_DEFS@ NLMCONV_DEFS = @NLMCONV_DEFS@
NO_WERROR = @NO_WERROR@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
OBJDUMP_DEFS = @OBJDUMP_DEFS@ OBJDUMP_DEFS = @OBJDUMP_DEFS@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@

View File

@ -1,3 +1,12 @@
2005-04-14 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (NO_WERROR): Define. Use instead of -Wno-error.
* acinclude.m4: Include ../bfd/warning.m4.
* configure.in: Invoke AM_BINUTILS_WARNINGS.
* Makefile.in: Regenerate.
* configure: Regenerate.
* doc/Makefile.in: Regenerate.
2005-04-13 Maciej W. Rozycki <macro@linux-mips.org> 2005-04-13 Maciej W. Rozycki <macro@linux-mips.org>
* config/tc-mips.c (IS_ZEXT_32BIT_NUM): New macro. * config/tc-mips.c (IS_ZEXT_32BIT_NUM): New macro.

View File

@ -16,6 +16,7 @@ YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison
LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi` LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
WARN_CFLAGS = @WARN_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) AM_CFLAGS = $(WARN_CFLAGS)
MKDEP = gcc -MM MKDEP = gcc -MM
@ -644,7 +645,7 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
# Disable -Werror, if it has been enabled, since old versions of bison/ # Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings. # yacc will produce working code which contain compile time warnings.
m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
# Don't let the .y.h rule clobber m68k-parse.h. # Don't let the .y.h rule clobber m68k-parse.h.
m68k-parse.h: ; @true m68k-parse.h: ; @true
@ -658,7 +659,7 @@ itbl-lex.o: itbl-lex.c itbl-parse.h $(srcdir)/itbl-lex.h
# Disable -Werror, if it has been enabled, since old versions of bison/ # Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings. # yacc will produce working code which contain compile time warnings.
itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h

View File

@ -53,8 +53,8 @@ DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub NEWS \
subdir = . subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.in $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@ -171,6 +171,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OPCODES_LIB = @OPCODES_LIB@ OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
@ -3045,7 +3046,7 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
# Disable -Werror, if it has been enabled, since old versions of bison/ # Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings. # yacc will produce working code which contain compile time warnings.
m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
# Don't let the .y.h rule clobber m68k-parse.h. # Don't let the .y.h rule clobber m68k-parse.h.
m68k-parse.h: ; @true m68k-parse.h: ; @true
@ -3059,7 +3060,7 @@ itbl-lex.o: itbl-lex.c itbl-parse.h $(srcdir)/itbl-lex.h
# Disable -Werror, if it has been enabled, since old versions of bison/ # Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings. # yacc will produce working code which contain compile time warnings.
itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h

View File

@ -1,3 +1,5 @@
sinclude(../bfd/warning.m4)
dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers) dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
AC_DEFUN([GAS_CHECK_DECL_NEEDED],[ AC_DEFUN([GAS_CHECK_DECL_NEEDED],[
AC_MSG_CHECKING(whether declaration is required for $1) AC_MSG_CHECKING(whether declaration is required for $1)

43
gas/configure vendored
View File

@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL WARN_CFLAGS GDBINIT cgen_cpu_prefix extra_objects target_cpu_type obj_format te_file install_tooldir atof BFDLIB OPCODES_LIB BFDVER_H ALL_OBJ_DEPS YACC LEX LEXLIB LEX_OUTPUT_ROOT CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBM LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL WARN_CFLAGS NO_WERROR GDBINIT cgen_cpu_prefix extra_objects target_cpu_type obj_format te_file install_tooldir atof BFDLIB OPCODES_LIB BFDVER_H ALL_OBJ_DEPS YACC LEX LEXLIB LEX_OUTPUT_ROOT CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBM LIBOBJS LTLIBOBJS'
ac_subst_files='' ac_subst_files=''
# Initialize some variables set by options. # Initialize some variables set by options.
@ -860,7 +860,7 @@ Optional Features:
targets alternative target configurations besides the primary targets alternative target configurations besides the primary
--enable-commonbfdlib build shared BFD/opcodes/libiberty library --enable-commonbfdlib build shared BFD/opcodes/libiberty library
--enable-werror treat compile warnings as errors --enable-werror treat compile warnings as errors
--enable-build-warnings Enable build-time compiler warnings if gcc is used --enable-build-warnings Enable build-time compiler warnings
--disable-nls do not use Native Language Support --disable-nls do not use Native Language Support
--enable-maintainer-mode enable make rules and dependencies not useful --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer (and sometimes confusing) to the casual installer
@ -4088,7 +4088,8 @@ esac
fi; fi;
using_cgen=no using_cgen=no
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-werror or --disable-werror was given. # Check whether --enable-werror or --disable-werror was given.
if test "${enable_werror+set}" = set; then if test "${enable_werror+set}" = set; then
@ -4102,11 +4103,15 @@ echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
esac esac
fi; fi;
# Enable -Werror by default, suppressing it only for --disable-werror # Enable -Werror by default when using gcc
# or --disable-build-warnings. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
if test "${ERROR_ON_WARNING}" != no ERROR_ON_WARNING=yes
then fi
build_warnings="$build_warnings -Werror"
NO_WERROR=
if test "${ERROR_ON_WARNING}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi fi
# Check whether --enable-build-warnings or --disable-build-warnings was given. # Check whether --enable-build-warnings or --disable-build-warnings was given.
@ -4114,22 +4119,23 @@ if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings" enableval="$enable_build_warnings"
case "${enableval}" in case "${enableval}" in
yes) ;; yes) ;;
no) build_warnings="-w";; no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";; WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"` *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";; WARN_CFLAGS="${t} ${WARN_CFLAGS}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then fi;
echo "Setting warning flags = $build_warnings" 6>&1
fi if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
fi; WARN_CFLAGS="" echo "Setting warning flags = $WARN_CFLAGS" 6>&1
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi fi
# Generate a header file # Generate a header file
ac_config_headers="$ac_config_headers config.h:config.in" ac_config_headers="$ac_config_headers config.h:config.in"
@ -11698,6 +11704,7 @@ s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBTOOL@,$LIBTOOL,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@GDBINIT@,$GDBINIT,;t t s,@GDBINIT@,$GDBINIT,;t t
s,@cgen_cpu_prefix@,$cgen_cpu_prefix,;t t s,@cgen_cpu_prefix@,$cgen_cpu_prefix,;t t
s,@extra_objects@,$extra_objects,;t t s,@extra_objects@,$extra_objects,;t t

View File

@ -48,42 +48,7 @@ esac])dnl
using_cgen=no using_cgen=no
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AM_BINUTILS_WARNINGS
AC_ARG_ENABLE(werror,
[ --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 -Werror by default, suppressing it only for --disable-werror
# or --disable-build-warnings.
if test "${ERROR_ON_WARNING}" != no
then
build_warnings="$build_warnings -Werror"
fi
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
AC_SUBST(WARN_CFLAGS)
# Generate a header file # Generate a header file
AM_CONFIG_HEADER(config.h:config.in) AM_CONFIG_HEADER(config.h:config.in)

View File

@ -40,8 +40,8 @@ subdir = doc
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.in $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@ -129,6 +129,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OPCODES_LIB = @OPCODES_LIB@ OPCODES_LIB = @OPCODES_LIB@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@

View File

@ -1,3 +1,12 @@
2005-04-14 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (NO_WERROR): Define.
* acinclude.m4: Include ../bfd/warning.m4.
* configure.in: Invoke AM_BINUTILS_WARNINGS.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
2005-04-06 Nick Clifton <nickc@redhat.com> 2005-04-06 Nick Clifton <nickc@redhat.com>
* po/rw.po: New translation: Kinyarwanda * po/rw.po: New translation: Kinyarwanda

View File

@ -11,6 +11,7 @@ BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include INCDIR = $(BASEDIR)/include
WARN_CFLAGS = @WARN_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) AM_CFLAGS = $(WARN_CFLAGS)
MKDEP = gcc -MM MKDEP = gcc -MM

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.9.2 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -51,8 +51,8 @@ DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub README \
subdir = . subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.in $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@ -166,6 +166,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

View File

@ -1,3 +1,4 @@
sinclude(../bfd/warning.m4)
sinclude(../libtool.m4) sinclude(../libtool.m4)
dnl The lines below arrange for aclocal not to bring libtool.m4 dnl The lines below arrange for aclocal not to bring libtool.m4
dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake

4
gprof/aclocal.m4 vendored
View File

@ -1,4 +1,4 @@
# generated automatically by aclocal 1.9.2 -*- Autoconf -*- # generated automatically by aclocal 1.9.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
@ -40,7 +40,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced. # Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.2])]) [AM_AUTOMAKE_VERSION([1.9.3])])
# AM_AUX_DIR_EXPAND # AM_AUX_DIR_EXPAND

43
gprof/configure vendored
View File

@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT WARN_CFLAGS LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT WARN_CFLAGS NO_WERROR LIBOBJS LTLIBOBJS'
ac_subst_files='' ac_subst_files=''
# Initialize some variables set by options. # Initialize some variables set by options.
@ -860,7 +860,7 @@ Optional Features:
--enable-maintainer-mode enable make rules and dependencies not useful --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer (and sometimes confusing) to the casual installer
--enable-werror treat compile warnings as errors --enable-werror treat compile warnings as errors
--enable-build-warnings Enable build-time compiler warnings if gcc is used --enable-build-warnings Enable build-time compiler warnings
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -8349,7 +8349,8 @@ _ACEOF
fi fi
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-werror or --disable-werror was given. # Check whether --enable-werror or --disable-werror was given.
if test "${enable_werror+set}" = set; then if test "${enable_werror+set}" = set; then
@ -8363,11 +8364,15 @@ echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
esac esac
fi; fi;
# Enable -Werror by default, suppressing it only for --disable-werror # Enable -Werror by default when using gcc
# or --disable-build-warnings. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
if test "${ERROR_ON_WARNING}" != no ERROR_ON_WARNING=yes
then fi
build_warnings="$build_warnings -Werror"
NO_WERROR=
if test "${ERROR_ON_WARNING}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi fi
# Check whether --enable-build-warnings or --disable-build-warnings was given. # Check whether --enable-build-warnings or --disable-build-warnings was given.
@ -8375,22 +8380,23 @@ if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings" enableval="$enable_build_warnings"
case "${enableval}" in case "${enableval}" in
yes) ;; yes) ;;
no) build_warnings="-w";; no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";; WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"` *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";; WARN_CFLAGS="${t} ${WARN_CFLAGS}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then fi;
echo "Setting warning flags = $build_warnings" 6>&1
fi if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
fi; WARN_CFLAGS="" echo "Setting warning flags = $WARN_CFLAGS" 6>&1
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi fi
ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in" ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
ac_config_commands="$ac_config_commands default" ac_config_commands="$ac_config_commands default"
@ -9123,6 +9129,7 @@ s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t s,@MAINT@,$MAINT,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@LIBOBJS@,$LIBOBJS,;t t s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF CEOF

View File

@ -42,42 +42,7 @@ if test $gprof_cv_decl_getopt_unistd_h = yes; then
[Is the prototype for getopt in <unistd.h> in the expected format?]) [Is the prototype for getopt in <unistd.h> in the expected format?])
fi fi
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AM_BINUTILS_WARNINGS
AC_ARG_ENABLE(werror,
[ --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 -Werror by default, suppressing it only for --disable-werror
# or --disable-build-warnings.
if test "${ERROR_ON_WARNING}" != no
then
build_warnings="$build_warnings -Werror"
fi
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
AC_SUBST(WARN_CFLAGS)
AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
AC_CONFIG_COMMANDS([default],[[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]],[[]]) AC_CONFIG_COMMANDS([default],[[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]],[[]])

View File

@ -1,3 +1,10 @@
2005-04-14 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (NO_WERROR): Define. Use instead of -Wno-error.
* configure.in: Include ../bfd/warning.m4 contents.
* Makefile.in: Regenerate.
* configure: Regenerate.
2005-04-12 Alan Modra <amodra@bigpond.net.au> 2005-04-12 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am". * Makefile.am: Run "make dep-am".

View File

@ -14,6 +14,7 @@ YFLAGS = -d
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
WARN_CFLAGS = @WARN_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) AM_CFLAGS = $(WARN_CFLAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts. # We put the scripts in the directory $(scriptdir)/ldscripts.
@ -420,11 +421,11 @@ STAGESTUFF = *.o ldscripts/* e*.c
# Disable -Werror, if it has been enabled, since old versions of bison/ # Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings. # yacc will produce working code which contain compile time warnings.
ldgram.o: ldgram.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
ldlex.o: ldlex.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
deffilep.o: deffilep.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
# At the moment this is just a list of those emulation template files # At the moment this is just a list of those emulation template files
# that contain internationalised strings. # that contain internationalised strings.

View File

@ -134,6 +134,7 @@ YFLAGS = -d
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
WARN_CFLAGS = @WARN_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) AM_CFLAGS = $(WARN_CFLAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts. # We put the scripts in the directory $(scriptdir)/ldscripts.
@ -1168,11 +1169,11 @@ mostlyclean distclean maintainer-clean
# Disable -Werror, if it has been enabled, since old versions of bison/ # Disable -Werror, if it has been enabled, since old versions of bison/
# yacc will produce working code which contain compile time warnings. # yacc will produce working code which contain compile time warnings.
ldgram.o: ldgram.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
ldlex.o: ldlex.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
deffilep.o: deffilep.o:
$(COMPILE) -c $< -Wno-error $(COMPILE) -c $< $(NO_WERROR)
po/POTFILES.in: @MAINT@ Makefile po/POTFILES.in: @MAINT@ Makefile
for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \ for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \

337
ld/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,10 @@ AC_SUBST(use_sysroot)
AC_SUBST(TARGET_SYSTEM_ROOT) AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" dnl FIXME: The following is bfd/warning.m4 contents expanded
dnl When converting to current autotools, please replace with
dnl AM_BINUTILS_WARNINGS
WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(werror, AC_ARG_ENABLE(werror,
[ --enable-werror treat compile warnings as errors], [ --enable-werror treat compile warnings as errors],
@ -76,32 +79,35 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac]) esac])
# Enable -Werror by default, suppressing it only for --disable-werror # Enable -Werror by default when using gcc
# or --disable-build-warnings. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
if test "${ERROR_ON_WARNING}" != no ERROR_ON_WARNING=yes
then
build_warnings="$build_warnings -Werror"
fi fi
NO_WERROR=
if test "${ERROR_ON_WARNING}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi
AC_ARG_ENABLE(build-warnings, AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings enable build-time compiler warnings if gcc is used], [ --enable-build-warnings Enable build-time compiler warnings],
[case "${enableval}" in [case "${enableval}" in
yes) ;; yes) ;;
no) build_warnings="-w";; no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";; WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"` *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";; WARN_CFLAGS="${t} ${WARN_CFLAGS}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac esac])
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1 if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
fi])dnl echo "Setting warning flags = $WARN_CFLAGS" 6>&1
WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi fi
AC_SUBST(WARN_CFLAGS) AC_SUBST(WARN_CFLAGS)
AC_SUBST(NO_WERROR)
AM_CONFIG_HEADER(config.h:config.in) AM_CONFIG_HEADER(config.h:config.in)

View File

@ -1,3 +1,11 @@
2005-04-14 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (NO_WERROR): Define.
* configure.in: Invoke AM_BINUTILS_WARNINGS.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure: Regenerate.
2005-04-04 Nick Clifton <nickc@redhat.com> 2005-04-04 Nick Clifton <nickc@redhat.com>
* fr30-asm.c: Regenerate. * fr30-asm.c: Regenerate.

View File

@ -9,6 +9,7 @@ BFDDIR = $(srcdir)/../bfd
MKDEP = gcc -MM MKDEP = gcc -MM
WARN_CFLAGS = @WARN_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) AM_CFLAGS = $(WARN_CFLAGS)
bfdlibdir = @bfdlibdir@ bfdlibdir = @bfdlibdir@

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.9.2 from Makefile.am. # Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -52,8 +52,8 @@ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../bfd/acinclude.m4 \ $(top_srcdir)/../bfd/acinclude.m4 \
$(top_srcdir)/../config/accross.m4 \ $(top_srcdir)/../config/accross.m4 \
$(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \ $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.in $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@ -159,6 +159,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@ MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@ MSGFMT = @MSGFMT@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

4
opcodes/aclocal.m4 vendored
View File

@ -1,4 +1,4 @@
# generated automatically by aclocal 1.9.2 -*- Autoconf -*- # generated automatically by aclocal 1.9.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
@ -40,7 +40,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced. # Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.2])]) [AM_AUTOMAKE_VERSION([1.9.3])])
# AM_AUX_DIR_EXPAND # AM_AUX_DIR_EXPAND

43
opcodes/configure vendored
View File

@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL WARN_CFLAGS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l CC_FOR_BUILD EXEEXT_FOR_BUILD HDEFINES CGEN_MAINT_TRUE CGEN_MAINT_FALSE cgendir WIN32LDFLAGS WIN32LIBADD archdefs BFD_MACHINES LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l CC_FOR_BUILD EXEEXT_FOR_BUILD HDEFINES CGEN_MAINT_TRUE CGEN_MAINT_FALSE cgendir WIN32LDFLAGS WIN32LIBADD archdefs BFD_MACHINES LIBOBJS LTLIBOBJS'
ac_subst_files='' ac_subst_files=''
# Initialize some variables set by options. # Initialize some variables set by options.
@ -859,7 +859,7 @@ Optional Features:
--enable-targets alternative target configurations --enable-targets alternative target configurations
--enable-commonbfdlib build shared BFD/opcodes/libiberty library --enable-commonbfdlib build shared BFD/opcodes/libiberty library
--enable-werror treat compile warnings as errors --enable-werror treat compile warnings as errors
--enable-build-warnings Enable build-time compiler warnings if gcc is used --enable-build-warnings Enable build-time compiler warnings
--enable-maintainer-mode enable make rules and dependencies not useful --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer (and sometimes confusing) to the casual installer
--enable-install-libbfd controls installation of libbfd and related headers --enable-install-libbfd controls installation of libbfd and related headers
@ -4242,7 +4242,8 @@ echo "$as_me: error: bad value ${enableval} for opcodes commonbfdlib option" >&2
{ (exit 1); exit 1; }; } ;; { (exit 1); exit 1; }; } ;;
esac esac
fi; fi;
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-werror or --disable-werror was given. # Check whether --enable-werror or --disable-werror was given.
if test "${enable_werror+set}" = set; then if test "${enable_werror+set}" = set; then
@ -4256,11 +4257,15 @@ echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
esac esac
fi; fi;
# Enable -Werror by default, suppressing it only for --disable-werror # Enable -Werror by default when using gcc
# or --disable-build-warnings. if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
if test "${ERROR_ON_WARNING}" != no ERROR_ON_WARNING=yes
then fi
build_warnings="$build_warnings -Werror"
NO_WERROR=
if test "${ERROR_ON_WARNING}" = yes ; then
WARN_CFLAGS="$WARN_CFLAGS -Werror"
NO_WERROR="-Wno-error"
fi fi
# Check whether --enable-build-warnings or --disable-build-warnings was given. # Check whether --enable-build-warnings or --disable-build-warnings was given.
@ -4268,22 +4273,23 @@ if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings" enableval="$enable_build_warnings"
case "${enableval}" in case "${enableval}" in
yes) ;; yes) ;;
no) build_warnings="-w";; no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";; WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"` *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";; WARN_CFLAGS="${t} ${WARN_CFLAGS}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then fi;
echo "Setting warning flags = $build_warnings" 6>&1
fi if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
fi; WARN_CFLAGS="" echo "Setting warning flags = $WARN_CFLAGS" 6>&1
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi fi
ac_config_headers="$ac_config_headers config.h:config.in" ac_config_headers="$ac_config_headers config.h:config.in"
@ -9529,6 +9535,7 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@LN_S@,$LN_S,;t t s,@LN_S@,$LN_S,;t t
s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBTOOL@,$LIBTOOL,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t s,@MAINT@,$MAINT,;t t

View File

@ -44,42 +44,7 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;; *) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
esac])dnl esac])dnl
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AM_BINUTILS_WARNINGS
AC_ARG_ENABLE(werror,
[ --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 -Werror by default, suppressing it only for --disable-werror
# or --disable-build-warnings.
if test "${ERROR_ON_WARNING}" != no
then
build_warnings="$build_warnings -Werror"
fi
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
AC_SUBST(WARN_CFLAGS)
AM_CONFIG_HEADER(config.h:config.in) AM_CONFIG_HEADER(config.h:config.in)