gdb: Respect CXXFLAGS when building with C++ compiler
Currently, even when built with --enable-build-with-cxx, gdb uses
CFLAGS instead of CXXFLAGS. This commit fixes it.
CXXFLAGS set in the environment when configure was run is now honored
in the generated gdb/Makefile, and you can also override CXXFLAGS in
the command like at make time, with the usual 'make CXXFLAGS="..."'
Objects built with a C compiler (e.g., gnulib) still honor CFLAGS
instead.
gdb/ChangeLog:
2016-01-21 Pedro Alves <palves@redhat.com>
* Makefile.in (COMPILER_CFLAGS): New.
(CXXFLAGS): Get it from configure.
(INTERNAL_CFLAGS_BASE, INTERNAL_LDFLAGS): Use COMPILER_CFLAGS
instead of CFLAGS.
* build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Set and AC_SUBST
COMPILER_CFLAGS.
* configure: Regenerate.
gdb/gdbserver/ChangeLog:
2016-01-21 Pedro Alves <palves@redhat.com>
* Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
(INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
* configure: Regenerate.