Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] gdb: fix building with system readline
Date: Fri, 19 Mar 2010 02:09:00 -0000	[thread overview]
Message-ID: <1268964553-30413-1-git-send-email-vapier@gentoo.org> (raw)

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"
 
 \f
 /* 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"
 \f
 /* Instruction macros used for analyzing the prologue.  */
-- 
1.7.0.2


             reply	other threads:[~2010-03-19  2:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19  2:09 Mike Frysinger [this message]
2010-03-22 17:25 ` Tom Tromey
2010-03-22 17:39   ` Joel Brobecker
2010-03-22 19:33     ` Mike Frysinger
2010-03-23  4:48 ` [PATCH v2] " Mike Frysinger
2010-03-23 16:00   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1268964553-30413-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox