aboutsummaryrefslogtreecommitdiff
path: root/ld/configure.in
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-03-16 16:17:14 +0000
committerNick Clifton <nickc@redhat.com>2005-03-16 16:17:14 +0000
commit1ad12f975f8a2a0ce45569ea3f550ef25705ad37 (patch)
treed5cc4951369f37e674d91cba4892aaa87a487ab7 /ld/configure.in
parent9b265ec209d7dd38bd411cdd3bac4d705a244398 (diff)
downloadgdb-1ad12f975f8a2a0ce45569ea3f550ef25705ad37.zip
gdb-1ad12f975f8a2a0ce45569ea3f550ef25705ad37.tar.gz
gdb-1ad12f975f8a2a0ce45569ea3f550ef25705ad37.tar.bz2
Enable -Werror by default
Diffstat (limited to 'ld/configure.in')
-rw-r--r--ld/configure.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/configure.in b/ld/configure.in
index 8b8354d..d84a2ae 100644
--- a/ld/configure.in
+++ b/ld/configure.in
@@ -67,6 +67,22 @@ AC_SUBST(TARGET_SYSTEM_ROOT)
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+AC_ARG_ENABLE(error-on-warning,
+ [ --enable-error-on-warning 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-error-on-warning) ;;
+ esac])
+
+# Enable -Werror by default, suppressing it only for --disable-error-on-warning
+# 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