* [PATCH] gdb: fix building with system readline
@ 2010-03-19 2:09 Mike Frysinger
2010-03-22 17:25 ` Tom Tromey
2010-03-23 4:48 ` [PATCH v2] " Mike Frysinger
0 siblings, 2 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-03-19 2:09 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gdb: fix building with system readline
2010-03-19 2:09 [PATCH] gdb: fix building with system readline Mike Frysinger
@ 2010-03-22 17:25 ` Tom Tromey
2010-03-22 17:39 ` Joel Brobecker
2010-03-23 4:48 ` [PATCH v2] " Mike Frysinger
1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2010-03-22 17:25 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches
>>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
Mike> Building gdb with --enable-targets=all and --with-system-readline hits a
Mike> failure in a few targets all related to the inclusion of some opcodes
Mike> headers. The usage of the bundled readline results in an -I to the top
Mike> srcdir, but if that isn't used, then there is no such -I path. A few gdb
Mike> targets use this implicitly to include opcodes/ source header files. So
Mike> change the include paths to use an -I to the opcodes/ directory, and then
Mike> have the gdb files drop the opcodes/ path in the #include.
Mike> An alternative is to add -I$(top_srcdir) to the main CFLAGS ...
I personally find the #include "opcodes/whatever.h" form a little
clearer. However, I don't have very strong feelings about it.
Give this patch a couple more days; if nobody speaks up in favor of one
approach or the other, then it is ok.
thanks,
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gdb: fix building with system readline
2010-03-22 17:25 ` Tom Tromey
@ 2010-03-22 17:39 ` Joel Brobecker
2010-03-22 19:33 ` Mike Frysinger
0 siblings, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2010-03-22 17:39 UTC (permalink / raw)
To: Tom Tromey; +Cc: Mike Frysinger, gdb-patches
> I personally find the #include "opcodes/whatever.h" form a little
> clearer. However, I don't have very strong feelings about it.
So do I, actually. I had it on my list to see if there was a way
around doing that (there may be an obvious way, I have just had
time to skim the patch when it came in).
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gdb: fix building with system readline
2010-03-22 17:39 ` Joel Brobecker
@ 2010-03-22 19:33 ` Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-03-22 19:33 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Tom Tromey, gdb-patches
[-- Attachment #1: Type: Text/Plain, Size: 574 bytes --]
On Monday 22 March 2010 13:38:46 Joel Brobecker wrote:
> > I personally find the #include "opcodes/whatever.h" form a little
> > clearer. However, I don't have very strong feelings about it.
>
> So do I, actually. I had it on my list to see if there was a way
> around doing that (there may be an obvious way, I have just had
> time to skim the patch when it came in).
i could simply add -I$(top_srcdir) to OPCODES_CFLAGS and a small comment
explaining why. i went the opcodes/ path because that's the patch i happened
to already have laying around.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] gdb: fix building with system readline
2010-03-19 2:09 [PATCH] gdb: fix building with system readline Mike Frysinger
2010-03-22 17:25 ` Tom Tromey
@ 2010-03-23 4:48 ` Mike Frysinger
2010-03-23 16:00 ` Tom Tromey
1 sibling, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2010-03-23 4:48 UTC (permalink / raw)
To: gdb-patches
here's the alternate version ...
2010-03-23 Mike Frysinger <vapier@gentoo.org>
* gdb/Makefile.in (OPCODES_CFLAGS): Add -I$(OPCODES_SRC)/..
--- gdb/Makefile.in 10 Mar 2010 18:20:05 -0000 1.1115
+++ gdb/Makefile.in 23 Mar 2010 04:47:14 -0000
@@ -309,7 +309,8 @@ 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)
+# Some source files like to use #include "opcodes/file.h"
+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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] gdb: fix building with system readline
2010-03-23 4:48 ` [PATCH v2] " Mike Frysinger
@ 2010-03-23 16:00 ` Tom Tromey
0 siblings, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2010-03-23 16:00 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches
>>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
Mike> 2010-03-23 Mike Frysinger <vapier@gentoo.org>
Mike> * gdb/Makefile.in (OPCODES_CFLAGS): Add -I$(OPCODES_SRC)/..
Thanks, this is ok.
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-23 16:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-19 2:09 [PATCH] gdb: fix building with system readline Mike Frysinger
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox