This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Do not build gdbserver with -Werror by default if development=false
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 19 May 2014 14:25:25 -0700
- Subject: [RFA] Do not build gdbserver with -Werror by default if development=false
- Authentication-results: sourceware.org; auth=none
Hello,
On GDB release branches, we change $development in gdb/development.sh
to false, in order to build the GDB release without -Werror by default,
thus avoiding harmless compiler warnings from breaking the build of
someone who's only interested in building GDB rather than working
on it.
This patch implements the same strategy for gdbserver, using the exact
same method.
gdb/gdbserver/ChangeLog:
* configure.ac: Only use -Werror by default when DEVELOPMENT
is true.
* configure: Regenerate.
Tested on x86_64-linux, by rebuilding GDBserver first with development
set to true, and then doing it again with development set to false.
Werror was used in the first case, but not in the second.
OK to commit?
Thanks,
--
Joel
PS: that I am planning on doing the same for binutils. If accepted,
we'll have the option of merging our development.sh with theirs
(ie, have our configure scripts source bfd/development.sh), if
we want. But that's orthogonal to this change, so we can worry
about that then.
---
gdb/gdbserver/configure | 4 ++--
gdb/gdbserver/configure.ac | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 6d8a6a7..101062f 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -5244,8 +5244,8 @@ if test "${enable_werror+set}" = set; then :
fi
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+# Enable -Werror by default when using gcc. Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
ERROR_ON_WARNING=yes
fi
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 0dfa4a9..89a8eea 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -143,8 +143,8 @@ AC_ARG_ENABLE(werror,
*) 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
+# Enable -Werror by default when using gcc. Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
ERROR_ON_WARNING=yes
fi
--
1.9.1