mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
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++".
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
|
||||||
|
|
||||||
|
* Makefile.in (COMPILE.pre): Add "-x c++".
|
||||||
|
|
||||||
2017-06-16 Alan Hayward <alan.hayward@arm.com>
|
2017-06-16 Alan Hayward <alan.hayward@arm.com>
|
||||||
Pedro Alves <palves@redhat.com>
|
Pedro Alves <palves@redhat.com>
|
||||||
Yao Qi <yao.qi@linaro.org>
|
Yao Qi <yao.qi@linaro.org>
|
||||||
|
@ -114,7 +114,7 @@ depcomp = $(SHELL) $(srcdir)/../depcomp
|
|||||||
|
|
||||||
# Note that these are overridden by GNU make-specific code below if
|
# Note that these are overridden by GNU make-specific code below if
|
||||||
# GNU make is used. The overrides implement dependency tracking.
|
# GNU make is used. The overrides implement dependency tracking.
|
||||||
COMPILE.pre = $(CXX) $(CXX_DIALECT)
|
COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
|
||||||
COMPILE.post = -c -o $@
|
COMPILE.post = -c -o $@
|
||||||
COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
|
COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
|
||||||
POSTCOMPILE = @true
|
POSTCOMPILE = @true
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
|
||||||
|
|
||||||
|
* Makefile.in (COMPILE.pre): Add "-x c++".
|
||||||
|
|
||||||
2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
|
2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||||
|
|
||||||
* fork-child.c: Conditionally include <signal.h>.
|
* fork-child.c: Conditionally include <signal.h>.
|
||||||
|
@ -65,7 +65,7 @@ depcomp = $(SHELL) $(srcdir)/../depcomp
|
|||||||
|
|
||||||
# Note that these are overridden by GNU make-specific code below if
|
# Note that these are overridden by GNU make-specific code below if
|
||||||
# GNU make is used. The overrides implement dependency tracking.
|
# GNU make is used. The overrides implement dependency tracking.
|
||||||
COMPILE.pre = $(CXX) $(CXX_DIALECT)
|
COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
|
||||||
COMPILE.post = -c -o $@
|
COMPILE.post = -c -o $@
|
||||||
COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
|
COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
|
||||||
POSTCOMPILE = @true
|
POSTCOMPILE = @true
|
||||||
|
Reference in New Issue
Block a user