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.
+
+2016-09-05 Pedro Alves <palves@redhat.com>
+
PR backtrace/19927
* frame.c (get_frame_id): Compute the frame id if not computed
yet.
PACKAGE = @PACKAGE@
CATALOGS = @CATALOGS@
-# The name of the compiler to use.
-COMPILER = @COMPILER@
-# Set to CFLAGS or CXXFLAGS, depending on compiler/language.
-COMPILER_CFLAGS = @COMPILER_CFLAGS@
-
# If you are compiling with GCC, make sure that either 1) You have the
# fixed include files where GCC can reach them, or 2) You use the
# -traditional flag. Otherwise the ioctl calls in inflow.c
# 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
# Set this up with gcc if you have gnu ld and the loader will print out
# line numbers for undefined references.
-#CC_LD=gcc -static
-CC_LD=$(COMPILER)
+#CC_LD=g++ -static
+CC_LD=$(CXX)
# Where is our "include" directory? Typically $(srcdir)/../include.
# This is essentially the header file directory for the library
# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
INTERNAL_CFLAGS_BASE = \
- $(COMPILER_CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
+ $(CXXFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \
$(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
$(INTL_CFLAGS) $(INCGNU) $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS)
# and have it work; that's why CFLAGS is here.
# PROFILE_CFLAGS is _not_ included, however, because we use monstartup.
INTERNAL_LDFLAGS = \
- $(COMPILER_CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) \
+ $(CXXFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) \
$(LDFLAGS) $(CONFIG_LDFLAGS)
# If your system is missing alloca(), or, more likely, it's there but
*** Changes since GDB 7.12
+* GDB and GDBserver now require building with a C++ compiler.
+
+ It is no longer possible to build GDB or GDBserver with a C
+ compiler. The --disable-build-with-cxx configure option has been
+ removed.
+
* Support for thread names on MS-Windows.
GDB now catches and handles the special exception that programs
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)
+++ /dev/null
-dnl Copyright (C) 2014-2016 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GDB.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-dnl GDB_AC_BUILD_WITH_CXX()
-dnl Provide an --enable-build-with-cxx/--disable-build-with-cxx set of options
-dnl allowing a user to build with a C++ compiler.
-
-AC_DEFUN([GDB_AC_BUILD_WITH_CXX],
-[
- AC_ARG_ENABLE(build-with-cxx,
- AS_HELP_STRING([--disable-build-with-cxx], [build with C compiler instead of C++ compiler]),
- [case $enableval in
- yes | no)
- ;;
- *)
- AC_MSG_ERROR([bad value $enableval for --enable-build-with-cxx]) ;;
- esac],
- [enable_build_with_cxx=yes])
-
- if test "$enable_build_with_cxx" = "yes"; then
- COMPILER='$(CXX)'
- COMPILER_CFLAGS='$(CXXFLAGS)'
- else
- COMPILER='$(CC)'
- COMPILER_CFLAGS='$(CFLAGS)'
- fi
- AC_SUBST(COMPILER)
- AC_SUBST(COMPILER_CFLAGS)
-])
CCDEPMODE
DEPDIR
am__leading_dot
-COMPILER_CFLAGS
-COMPILER
INSTALL_STRIP_PROGRAM
STRIP
install_sh
enable_maintainer_mode
enable_plugins
enable_largefile
-enable_build_with_cxx
with_separate_debug_dir
with_gdb_datadir
with_relocated_sources
(and sometimes confusing) to the casual installer
--enable-plugins Enable support for plugins
--disable-largefile omit support for large files
- --disable-build-with-cxx
- build with C compiler instead of C++ compiler
--enable-targets=TARGETS
alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-# 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
-
-
-
-
# Dependency checking.
rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
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.
# 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
-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
# In the Cygwin environment, we need some additional flags.
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
-# See if we are building with C++, and substitute COMPILER.
-GDB_AC_BUILD_WITH_CXX
-
# Dependency checking.
ZW_CREATE_DEPDIR
ZW_PROG_COMPILER_DEPENDENCIES([CC])
+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
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@
# 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
# 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
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
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)
am__leading_dot
host_noncanonical
target_noncanonical
-COMPILER_CFLAGS
-COMPILER
RANLIB
AR
INSTALL_DATA
enable_option_checking
enable_maintainer_mode
enable_largefile
-enable_build_with_cxx
enable_libmcheck
with_ust
with_ust_include
--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
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
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.
# 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
-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 "*)
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
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.
# 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
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++])
])