public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Hurd: do not include defs.h when compiling MiG stubs since they are compiled as C files
@ 2024-07-03 22:05 Flavio Cruz
  2024-12-17 16:45 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Flavio Cruz @ 2024-07-03 22:05 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi, Samuel Thibault

Otherwise, GDB will fail to compile for Hurd.
---
 gdb/Makefile.in            | 3 ++-
 gdb/config/i386/i386gnu.mn | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 6f7f2af31e5..65910d9774d 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -603,11 +603,12 @@ 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_INCLUDED_HEADER = -include $(srcdir)/defs.h
 GDB_CFLAGS = \
 	-I. \
 	-I$(srcdir) \
 	-I$(srcdir)/config \
-	-include $(srcdir)/defs.h \
+	$(GDB_INCLUDED_HEADER) \
 	-DLOCALEDIR="\"$(localedir)\"" \
 	$(DEFS)
 
diff --git a/gdb/config/i386/i386gnu.mn b/gdb/config/i386/i386gnu.mn
index b7414e3bcb4..e90c7fe8d40 100644
--- a/gdb/config/i386/i386gnu.mn
+++ b/gdb/config/i386/i386gnu.mn
@@ -21,7 +21,9 @@ MIGCOM = $(MIG) -cc cat - /dev/null
 	| $(MIGCOM) -sheader /dev/null -server /dev/null -user $*_U.c -header $*_U.h
 
 # MIG stubs are not yet ready for C++ compilation.
-%_S.o %_U.o : COMPILE.post += -x c -include gnu-nat-mig.h
+%_S.o %_U.o : COMPILE.post += -x c
+# Do not include defs.h since it requires C++. Rather include our own gnu-nat-mig.h
+%_S.o %_U.o : GDB_INCLUDED_HEADER = -include gnu-nat-mig.h
 
 NAT_GENERATED_FILES = notify_S.h notify_S.c \
 	process_reply_S.h process_reply_S.c \
-- 
2.45.2


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

* Re: [PATCH] Hurd: do not include defs.h when compiling MiG stubs since they are compiled as C files
  2024-07-03 22:05 [PATCH] Hurd: do not include defs.h when compiling MiG stubs since they are compiled as C files Flavio Cruz
@ 2024-12-17 16:45 ` Tom Tromey
  2024-12-17 17:06   ` Flávio Cruz
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2024-12-17 16:45 UTC (permalink / raw)
  To: Flavio Cruz; +Cc: gdb-patches, Simon Marchi, Samuel Thibault

>>>>> "Flavio" == Flavio Cruz <flaviocruz@gmail.com> writes:

Flavio> Otherwise, GDB will fail to compile for Hurd.

Is this still relevant / necessary?

If so it seems fine to me.

Tom

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

* Re: [PATCH] Hurd: do not include defs.h when compiling MiG stubs since they are compiled as C files
  2024-12-17 16:45 ` Tom Tromey
@ 2024-12-17 17:06   ` Flávio Cruz
  2024-12-17 17:39     ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Flávio Cruz @ 2024-12-17 17:06 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, Simon Marchi, Samuel Thibault

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

On Tue, Dec 17, 2024 at 11:45 AM Tom Tromey <tom@tromey.com> wrote:

> >>>>> "Flavio" == Flavio Cruz <flaviocruz@gmail.com> writes:
>
> Flavio> Otherwise, GDB will fail to compile for Hurd.
>
> Is this still relevant / necessary?


Yes, this is still relevant and can be applied cleanly.

Thanks!


>
> If so it seems fine to me.
>
> Tom
>

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

* Re: [PATCH] Hurd: do not include defs.h when compiling MiG stubs since they are compiled as C files
  2024-12-17 17:06   ` Flávio Cruz
@ 2024-12-17 17:39     ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2024-12-17 17:39 UTC (permalink / raw)
  To: Flávio Cruz; +Cc: Tom Tromey, gdb-patches, Simon Marchi, Samuel Thibault

Flávio> Yes, this is still relevant and can be applied cleanly.

Thank you.  I'm pushing it now.

Tom

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

end of thread, other threads:[~2024-12-17 17:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-03 22:05 [PATCH] Hurd: do not include defs.h when compiling MiG stubs since they are compiled as C files Flavio Cruz
2024-12-17 16:45 ` Tom Tromey
2024-12-17 17:06   ` Flávio Cruz
2024-12-17 17:39     ` Tom Tromey

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).