]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbserver/Makefile.in: add missing `-x c++`
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 25 Mar 2024 18:28:00 +0000 (14:28 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 26 Mar 2024 01:48:24 +0000 (21:48 -0400)
When building with Clang, I get:

      CXX    nat/x86-linux-tdesc-ipa.o
    clang++: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Werror,-Wdeprecated]

Fix that by adding the missing `-x c++` in the rule building
`gdb/nat/*.c` files for the in-process agent.

Change-Id: Ie53e4b9a8b57bef9669397fdfaf21617107c7180
Approved-By: Tom Tromey <tom@tromey.com>
gdbserver/Makefile.in

index bd6f68e7f2cf95c47ea2f11eb254d209ca17d84f..5506701106df0461e7d41d385afa16c92f27b2c5 100644 (file)
@@ -520,7 +520,7 @@ gdbsupport/%-ipa.o: ../gdbsupport/%.cc
        $(POSTCOMPILE)
 
 nat/%-ipa.o: ../gdb/nat/%.c
-       $(IPAGENT_COMPILE) $<
+       $(IPAGENT_COMPILE) -x c++ $<
        $(POSTCOMPILE)
 
 %-ipa.o: ../gdb/%.c