This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Don't use -I for common subdirectory
- From: Tom Tromey <tromey at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 25 Jan 2019 22:41:08 -0000
- Subject: [binutils-gdb] Don't use -I for common subdirectory
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a0707f3c36cab402cd4c3235bedd2b5f7b4c6aed
commit a0707f3c36cab402cd4c3235bedd2b5f7b4c6aed
Author: Tom Tromey <tom@tromey.com>
Date: Tue Jan 22 00:26:45 2019 -0700
Don't use -I for common subdirectory
This changes the Makefiles to remove the -I for the common/
subdirectory. This will enforce the rule that includes must use the
'common/filename.h' form.
gdb/ChangeLog
2019-01-25 Tom Tromey <tom@tromey.com>
* Makefile.in (GDB_CFLAGS): Don't add -I for common.
gdb/gdbserver/ChangeLog
2019-01-25 Tom Tromey <tom@tromey.com>
* Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/Makefile.in | 2 +-
gdb/gdbserver/ChangeLog | 4 ++++
gdb/gdbserver/Makefile.in | 2 +-
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b893255..ede7a64 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2019-01-25 Tom Tromey <tom@tromey.com>
+ * Makefile.in (GDB_CFLAGS): Don't add -I for common.
+
+2019-01-25 Tom Tromey <tom@tromey.com>
+
* xtensa-linux-nat.c: Fix common/ includes.
* xml-support.h: Fix common/ includes.
* xml-support.c: Fix common/ includes.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 215ef79..72ca855 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -543,7 +543,7 @@ CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
# your system doesn't have fcntl.h in /usr/include (which is where it
# should be according to Posix).
DEFS = @DEFS@
-GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/common -I$(srcdir)/config \
+GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \
-DLOCALEDIR="\"$(localedir)\"" $(DEFS)
# MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 0fd3360..a244c4f 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,9 @@
2019-01-25 Tom Tromey <tom@tromey.com>
+ * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
+
+2019-01-25 Tom Tromey <tom@tromey.com>
+
* win32-low.c: Fix common/ includes.
* win32-i386-low.c: Fix common/ includes.
* tracepoint.c: Fix common/ includes.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 4ae1369..8cffe3dd 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -118,7 +118,7 @@ GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
# in those directories should be included with the subdirectory.
# e.g.: "target/wait.h".
#
-INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../common \
+INCLUDE_CFLAGS = -I. -I${srcdir} \
-I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
$(INCGNU)