aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-04-14 05:26:44 +0000
committerAlan Modra <amodra@gmail.com>2005-04-14 05:26:44 +0000
commit9e9b66a9565074bc875a2b2d01c628c58bca6bd5 (patch)
tree2185c9bc4eb2ce954ac7aed4943370113c168910 /bfd
parent92ceba1e4f12b335f6161d08a52c62a9c7954fe0 (diff)
downloadgdb-9e9b66a9565074bc875a2b2d01c628c58bca6bd5.zip
gdb-9e9b66a9565074bc875a2b2d01c628c58bca6bd5.tar.gz
gdb-9e9b66a9565074bc875a2b2d01c628c58bca6bd5.tar.bz2
bfd/
* 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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/Makefile.am1
-rw-r--r--bfd/Makefile.in5
-rw-r--r--bfd/acinclude.m41
-rwxr-xr-xbfd/configure43
-rw-r--r--bfd/configure.in37
-rw-r--r--bfd/doc/ChangeLog4
-rw-r--r--bfd/doc/Makefile.in5
-rw-r--r--bfd/warning.m443
9 files changed, 90 insertions, 58 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index cd93c38..6b3c567 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,14 @@
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>
+
* merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
Write trailing padding.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index ba8bef8..934ff3f 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -18,6 +18,7 @@ bfdincludedir = @bfdincludedir@
bfdlib_LTLIBRARIES = libbfd.la
WARN_CFLAGS = @WARN_CFLAGS@
+NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS)
# bfd.h goes here, for now
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index f744693..68940d6 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -52,8 +52,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../config/accross.m4 \
$(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
- $(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \
- $(top_srcdir)/configure.in
+ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
+ $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -168,6 +168,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/bfd/acinclude.m4 b/bfd/acinclude.m4
index 5c97328..871bbc0 100644
--- a/bfd/acinclude.m4
+++ b/bfd/acinclude.m4
@@ -1,6 +1,7 @@
sinclude(../config/accross.m4)
sinclude(../config/acx.m4)
sinclude(../bfd/bfd.m4)
+sinclude(../bfd/warning.m4)
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
AC_DEFUN([BFD_BINARY_FOPEN],
diff --git a/bfd/configure b/bfd/configure
index c53745b..072c255 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#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=''
# Initialize some variables set by options.
@@ -860,7 +860,7 @@ Optional Features:
--enable-targets alternative target configurations
--enable-commonbfdlib build shared BFD/opcodes/libiberty library
--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
(and sometimes confusing) to the casual installer
--enable-install-libbfd controls installation of libbfd and related headers
@@ -4263,7 +4263,8 @@ esac
else
want_mmap=false
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.
if test "${enable_werror+set}" = set; then
@@ -4277,11 +4278,15 @@ echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
esac
fi;
-# 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"
+# 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
# 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"
case "${enableval}" in
yes) ;;
- no) build_warnings="-w";;
+ no) WARN_CFLAGS="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${build_warnings} ${t}";;
+ WARN_CFLAGS="${WARN_CFLAGS} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- build_warnings="${t} ${build_warnings}";;
- *) build_warnings=`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"$build_warnings" != x""; then
- echo "Setting warning flags = $build_warnings" 6>&1
-fi
-fi; WARN_CFLAGS=""
-if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
- WARN_CFLAGS="${build_warnings}"
+fi;
+
+if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
+ echo "Setting warning flags = $WARN_CFLAGS" 6>&1
fi
+
+
+
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,@LIBTOOL@,$LIBTOOL,;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_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
diff --git a/bfd/configure.in b/bfd/configure.in
index 565936c..ffddcc7 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -51,42 +51,7 @@ AC_ARG_WITH(mmap,
*) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
esac],[want_mmap=false])dnl
-build_warnings="-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, 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_BINUTILS_WARNINGS
AM_CONFIG_HEADER(config.h:config.in)
diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog
index 87967d1..1e7d042 100644
--- a/bfd/doc/ChangeLog
+++ b/bfd/doc/ChangeLog
@@ -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>
* Makefile.in: Regenerate.
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 2cfaa4c..6337a57 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -42,8 +42,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/../config/accross.m4 \
$(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
- $(top_srcdir)/../libtool.m4 $(top_srcdir)/../gettext.m4 \
- $(top_srcdir)/configure.in
+ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
+ $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@@ -132,6 +132,7 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
diff --git a/bfd/warning.m4 b/bfd/warning.m4
new file mode 100644
index 0000000..38feb5f
--- /dev/null
+++ b/bfd/warning.m4
@@ -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)
+])