This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] gdb: fix building with system readline


Building gdb with --enable-targets=all and --with-system-readline hits a
failure in a few targets all related to the inclusion of some opcodes
headers.  The usage of the bundled readline results in an -I to the top
srcdir, but if that isn't used, then there is no such -I path.  A few gdb
targets use this implicitly to include opcodes/ source header files.  So
change the include paths to use an -I to the opcodes/ directory, and then
have the gdb files drop the opcodes/ path in the #include.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
An alternative is to add -I$(top_srcdir) to the main CFLAGS ...

2010-03-18  Mike Frysinger  <vapier@gentoo.org>

	* gdb/Makefile.in (OPCODES_CFLAGS): Add -I$(OPCODES_SRC).
	* gdb/frv-tdep.c: Remove "opcodes/" from #include.
	* gdb/lm32-tdep.c: Likewise.
	* gdb/mep-tdep.c: Likewise.
	* gdb/microblaze-tdep.c: Likewise.

 gdb/Makefile.in       |    2 +-
 gdb/frv-tdep.c        |    2 +-
 gdb/lm32-tdep.c       |    2 +-
 gdb/mep-tdep.c        |    4 ++--
 gdb/microblaze-tdep.c |    4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 9a02ba1..53e4f29 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -309,7 +309,7 @@ OPCODES = $(OPCODES_DIR)/libopcodes.a
 # Where are the other opcode tables which only have header file
 # versions?
 OP_INCLUDE = $(INCLUDE_DIR)/opcode
-OPCODES_CFLAGS = -I$(OP_INCLUDE)
+OPCODES_CFLAGS = -I$(OP_INCLUDE) -I$(OPCODES_SRC)
 
 # The simulator is usually nonexistent; targets that include one
 # should set this to list all the .o or .a files to be linked in.
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index a38ec8e..0fc22a6 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -32,7 +32,7 @@
 #include "gdb_assert.h"
 #include "sim-regno.h"
 #include "gdb/sim-frv.h"
-#include "opcodes/frv-desc.h"	/* for the H_SPR_... enums */
+#include "frv-desc.h"	/* for the H_SPR_... enums */
 #include "symtab.h"
 #include "elf-bfd.h"
 #include "elf/frv.h"
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index d5047cd..a52eefb 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -35,7 +35,7 @@
 #include "regcache.h"
 #include "trad-frame.h"
 #include "reggroups.h"
-#include "opcodes/lm32-desc.h"
+#include "lm32-desc.h"
 
 #include "gdb_string.h"
 
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index bd200c1..364497d 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -53,8 +53,8 @@
 
 /* Get the user's customized MeP coprocessor register names from
    libopcodes.  */
-#include "opcodes/mep-desc.h"
-#include "opcodes/mep-opc.h"
+#include "mep-desc.h"
+#include "mep-opc.h"
 
 
 /* The gdbarch_tdep structure.  */
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index fe2c021..3a20a85 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -38,8 +38,8 @@
 #include "gdb_assert.h"
 #include "gdb_string.h"
 #include "target-descriptions.h"
-#include "opcodes/microblaze-opcm.h"
-#include "opcodes/microblaze-dis.h"
+#include "microblaze-opcm.h"
+#include "microblaze-dis.h"
 #include "microblaze-tdep.h"
 
 /* Instruction macros used for analyzing the prologue.  */
-- 
1.7.0.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]