summaryrefslogtreecommitdiff
path: root/gdb/warning.m4
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-09-05 19:10:44 +0100
committerPedro Alves <palves@redhat.com>2016-09-05 19:10:44 +0100
commitcf6de44d75082116865a85cbf94db2632b679361 (patch)
tree5f9fc201a3675b3d4c32fc8ff36f909cbcbbf8dd /gdb/warning.m4
parentf245535cf583ae4ca13b10d47b3c7d3334593ece (diff)
downloadbinutils-gdb-cf6de44d75082116865a85cbf94db2632b679361.tar.gz
gdb/: Require a C++ compiler
This removes all support for building gdb & gdbserver with a C compiler from gdb & gdbserver's build machinery. gdb/ChangeLog: 2016-09-05 Pedro Alves <palves@redhat.com> * NEWS: Mention that a C++ compiler is now required. * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove. (COMPILE.pre, CC_LD): Use CXX directly. (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly. * acinclude.m4: Don't include build-with-cxx.m4. * build-with-cxx.m4: Delete file. * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call. * warning.m4: Assume $enable_build_with_cxx is yes. * configure: Regenerate. gdb/gdbserver/ChangeLog: 2016-09-05 Pedro Alves <palves@redhat.com> * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove. (COMPILE.pre, CC_LD): Use CXX directly. (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly. * acinclude.m4: Don't include build-with-cxx.m4. * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call. * configure: Regenerate.
Diffstat (limited to 'gdb/warning.m4')
-rw-r--r--gdb/warning.m423
1 files changed, 5 insertions, 18 deletions
diff --git a/gdb/warning.m4 b/gdb/warning.m4
index 8d7ce68ce3f..849fa2d7190 100644
--- a/gdb/warning.m4
+++ b/gdb/warning.m4
@@ -35,21 +35,12 @@ if test "${ERROR_ON_WARNING}" = yes ; then
WERROR_CFLAGS="-Werror"
fi
-# These options work in either C or C++ modes.
+# The options we'll try to enable.
build_warnings="-Wall -Wpointer-arith \
-Wno-unused -Wunused-value -Wunused-function \
-Wno-switch -Wno-char-subscripts \
--Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable"
-
-# Now add in C and C++ specific options, depending on mode.
-if test "$enable_build_with_cxx" = "yes"; then
- build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
--Wno-narrowing"
-else
- build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
--Wdeclaration-after-statement -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
-fi
+-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
+-Wno-sign-compare -Wno-write-strings -Wno-narrowing"
# Enable -Wno-format by default when using gcc on mingw since many
# GCC versions complain about %I64.
@@ -89,9 +80,7 @@ fi])dnl
# The set of warnings supported by a C++ compiler is not the same as
# of the C compiler.
-if test "$enable_build_with_cxx" = "yes"; then
- AC_LANG_PUSH([C++])
-fi
+AC_LANG_PUSH([C++])
WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
@@ -127,7 +116,5 @@ fi
AC_SUBST(WARN_CFLAGS)
AC_SUBST(WERROR_CFLAGS)
-if test "$enable_build_with_cxx" = "yes"; then
- AC_LANG_POP([C++])
-fi
+AC_LANG_POP([C++])
])