public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 01/10] 'make check-headers' for c++ header
@ 2017-01-06 14:19 Yao Qi
  2017-01-06 14:19 ` [PATCH OBV 04/10] Include target.h in inf-loop.h Yao Qi
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
  To: gdb-patches

If I run 'make check-headers', I get these errors,
....
In file included from ../../binutils-gdb/gdb/common/common-defs.h:78:0,
                 from ../../binutils-gdb/gdb/defs.h:28,
                 from <command-line>:0:
../../binutils-gdb/gdb/common/common-utils.h:23:18: fatal error: string: No such file or directory
 #include <string>
                  ^

because we still parse headers as c file with a c compiler, which is no
longer true after we moved to C++.  This patch changes it to use C++
compiler and parse headers as c++ headers.

The rest of 9 patches are obvious, and I'll push them in.

gdb:

2017-01-06  Yao Qi  <yao.qi@linaro.org>

	* Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
	of CC.  Pass "-x c++-header" instead of "-x c".
---
 gdb/Makefile.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ae5a80e..3ce7d69 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1988,8 +1988,8 @@ CHECK_HEADERS = $(HFILES_NO_SRCDIR)
 check-headers:
 	@echo Checking headers.
 	for i in $(CHECK_HEADERS) ; do \
-		$(CC) -x c -c -fsyntax-only $(INTERNAL_CFLAGS) \
-			-include defs.h $(srcdir)/$$i ; \
+		$(CXX) $(CXX_DIALECT) -x c++-header -c -fsyntax-only \
+		$(INTERNAL_CFLAGS) -include defs.h $(srcdir)/$$i ; \
 	done
 .PHONY: check-headers
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-01-13 14:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
2017-01-06 14:19 ` [PATCH OBV 04/10] Include target.h in inf-loop.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 02/10] Include ax.h in ax-gdb.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 03/10] Include doublest.h and expression.h in dfp.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 05/10] Include mi-cmds.h in mi-parse.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 10/10] Include gdb_proc_service.h in x86-linux-nat.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 07/10] Include signal.h in nat/amd64-linux-siginfo.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 09/10] Include serial.h in ser-base.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 08/10] Include ppc-tdep.h in ppc-linux-tdep.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 06/10] Include break-common.h in nat/aarch64-linux-hw-point.h Yao Qi
2017-01-13 14:41 ` [PATCH 01/10] 'make check-headers' for c++ header Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).