[2/2] gdbserver/Makefile.in: add missing `-x c++`

Message ID 20240325183011.1037710-3-simon.marchi@efficios.com
State New
Headers
Series Fix some trivial build failures with clang |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_check--master-arm fail Patch failed to apply

Commit Message

Simon Marchi March 25, 2024, 6:28 p.m. UTC
  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
---
 gdbserver/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index bd6f68e7f2cf..5506701106df 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -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