]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/Makefile.in
gdb: Pass -x c++ to the compiler
authorSimon Marchi <simon.marchi@ericsson.com>
Sat, 17 Jun 2017 21:17:00 +0000 (23:17 +0200)
committerSimon Marchi <simon.marchi@ericsson.com>
Sat, 17 Jun 2017 21:17:00 +0000 (23:17 +0200)
commitcf0dd6f02cd45d6dbb6bd87dde25dd3ed74eb7d0
tree8e9d7226b47d9a6c815fcd204b9c8ee3c9d68c49
parent291e62953900e0f4998224127bc56239e421cda9
gdb: Pass -x c++ to the compiler

Because we are compiling .c files containing C++ code, clang++ complains
with:

  clang: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated

If renaming all the source files to .cpp is out of the question, an
alternative is to pass "-x c++" to convince the compiler that we are
really compiling C++.  It works fine with GCC too.

gdb/ChangeLog:

* Makefile.in (COMPILE.pre): Add "-x c++".

gdb/gdbserver/ChangeLog:

* Makefile.in (COMPILE.pre): Add "-x c++".
gdb/ChangeLog
gdb/Makefile.in
gdb/gdbserver/ChangeLog
gdb/gdbserver/Makefile.in