This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gdbadmin at sourceware dot org: make-snapshot gdb current failed]


Hi Joel,

> FYI guys,
> 
> the GDB snapshot just failed tonight. This is the log file.
> Maybe because the GDB on sourceware is still 4.4 and does not support
> -Wstack-usage?
> 
> Can we make the use of that option conditionalized on its support?

Sorry about that.

I have checked in the attached patch, which I hope will fix the problem.
Please could you let me know if it does not work.

Cheers
  Nick

bfd/ChangeLog
2016-03-22  Nick Clifton  <nickc@redhat.com>

	* warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
	sufficiently recent version of GCC.
	* configure: Regenerate.

binutils,gas,gprof,gold,ld,opcodes
2016-03-22 Nick Clifton <nickc@redhat.com>

	* configure: Regenerate.

diff --git a/bfd/warning.m4 b/bfd/warning.m4
index 0e838f6..028d079 100644
--- a/bfd/warning.m4
+++ b/bfd/warning.m4
@@ -21,9 +21,16 @@ AC_DEFUN([AM_BINUTILS_WARNINGS],[
 # Set the 'development' global.
 . $srcdir/../bfd/development.sh
 
+# Default set of GCC warnings to enable.
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
 AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
 
+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
+AC_EGREP_CPP([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144")
+
+
 AC_ARG_ENABLE(werror,
   [  --enable-werror         treat compile warnings as errors],
   [case "${enableval}" in
@@ -49,7 +56,7 @@ fi
 
 NO_WERROR=
 if test "${ERROR_ON_WARNING}" = yes ; then
-    GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror -Wstack-usage=262144"
+    GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
     NO_WERROR="-Wno-error"
 fi
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]