aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
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/gdbserver
parentf245535cf583ae4ca13b10d47b3c7d3334593ece (diff)
downloadfsf-binutils-gdb-cf6de44d75082116865a85cbf94db2632b679361.zip
fsf-binutils-gdb-cf6de44d75082116865a85cbf94db2632b679361.tar.gz
fsf-binutils-gdb-cf6de44d75082116865a85cbf94db2632b679361.tar.bz2
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/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog9
-rw-r--r--gdb/gdbserver/Makefile.in13
-rw-r--r--gdb/gdbserver/acinclude.m43
-rwxr-xr-xgdb/gdbserver/configure54
-rw-r--r--gdb/gdbserver/configure.ac3
5 files changed, 18 insertions, 64 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 629254f..5e9e4cb 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
PR gdb/19495
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index f844ab8..309b496 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -49,11 +49,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
RANLIB = @RANLIB@
-# The name of the compiler to use.
-COMPILER = @COMPILER@
-# Set to CFLAGS or CXXFLAGS, depending on compiler/language.
-COMPILER_CFLAGS = @COMPILER_CFLAGS@
-
CC = @CC@
CXX = @CXX@
AR = @AR@
@@ -66,7 +61,7 @@ depcomp = $(SHELL) $(srcdir)/../depcomp
# Note that these are overridden by GNU make-specific code below if
# GNU make is used. The overrides implement dependency tracking.
-COMPILE.pre = $(COMPILER)
+COMPILE.pre = $(CXX)
COMPILE.post = -c -o $@
COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
POSTCOMPILE = @true
@@ -84,8 +79,8 @@ VPATH = @srcdir@
# Set this up with gcc if you have gnu ld and the loader will print out
# line numbers for undefinded refs.
-#CC_LD=gcc -static
-CC_LD=$(COMPILER)
+#CC_LD=g++ -static
+CC_LD=$(CXX)
# Where is the "include" directory? Traditionally ../include or ./include
INCLUDE_DIR = ${srcdir}/../../include
@@ -138,7 +133,7 @@ CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
-INTERNAL_CFLAGS_BASE = ${COMPILER_CFLAGS} ${GLOBAL_CFLAGS} \
+INTERNAL_CFLAGS_BASE = ${CXXFLAGS} ${GLOBAL_CFLAGS} \
${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
diff --git a/gdb/gdbserver/acinclude.m4 b/gdb/gdbserver/acinclude.m4
index a052c2b..8ec9188 100644
--- a/gdb/gdbserver/acinclude.m4
+++ b/gdb/gdbserver/acinclude.m4
@@ -26,9 +26,6 @@ m4_include(../common/common.m4)
dnl For libiberty_INIT.
m4_include(../libiberty.m4)
-dnl For --enable-build-with-cxx and COMPILER.
-m4_include(../build-with-cxx.m4)
-
dnl For GDB_AC_PTRACE.
m4_include(../ptrace.m4)
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 6b14b52..f112517 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -615,8 +615,6 @@ DEPDIR
am__leading_dot
host_noncanonical
target_noncanonical
-COMPILER_CFLAGS
-COMPILER
RANLIB
AR
INSTALL_DATA
@@ -693,7 +691,6 @@ ac_user_opts='
enable_option_checking
enable_maintainer_mode
enable_largefile
-enable_build_with_cxx
enable_libmcheck
with_ust
with_ust_include
@@ -1339,8 +1336,6 @@ Optional Features:
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--disable-largefile omit support for large files
- --disable-build-with-cxx
- build with C compiler instead of C++ compiler
--enable-libmcheck Try linking with -lmcheck if available
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings if gcc is used
@@ -4774,32 +4769,6 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
-# See if we are building with C++, and substitute COMPILER.
-
- # Check whether --enable-build-with-cxx was given.
-if test "${enable_build_with_cxx+set}" = set; then :
- enableval=$enable_build_with_cxx; case $enableval in
- yes | no)
- ;;
- *)
- as_fn_error "bad value $enableval for --enable-build-with-cxx" "$LINENO" 5 ;;
- esac
-else
- enable_build_with_cxx=yes
-fi
-
-
- if test "$enable_build_with_cxx" = "yes"; then
- COMPILER='$(CXX)'
- COMPILER_CFLAGS='$(CXXFLAGS)'
- else
- COMPILER='$(CC)'
- COMPILER_CFLAGS='$(CFLAGS)'
- fi
-
-
-
-
# Set the 'development' global.
. $srcdir/../../bfd/development.sh
@@ -6288,21 +6257,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.
@@ -6344,14 +6304,12 @@ fi
# 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_ext=cpp
+ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-fi
WARN_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
@@ -6403,14 +6361,12 @@ fi
-if test "$enable_build_with_cxx" = "yes"; then
- ac_ext=c
+ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-fi
case " $WARN_CFLAGS " in
*" -Wmissing-prototypes "*)
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 01ec634..6d5907b 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -40,9 +40,6 @@ AC_ARG_PROGRAM
AC_HEADER_STDC
-# See if we are building with C++, and substitute COMPILER.
-GDB_AC_BUILD_WITH_CXX
-
# Set the 'development' global.
. $srcdir/../../bfd/development.sh