public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB13 fails to build on MacOS using supplied GNU Bison 2.3
@ 2023-08-19 18:11 Torbjorn SVENSSON
  2023-08-28  5:12 ` Tom de Vries
  2023-08-31 13:31 ` Tom Tromey
  0 siblings, 2 replies; 12+ messages in thread
From: Torbjorn SVENSSON @ 2023-08-19 18:11 UTC (permalink / raw)
  To: gdb; +Cc: Tom Tromey

Hello,

I'm trying to build GDB13 for arm-none-eabi on MacOS and have some mixed 
results.
It looks like after b2bc564fe817f857b4915903f16026472acfbdcc got merged, 
the Bison version included in least Mojave, Catalina and Ventura is 
having trouble to generate code that can be compiled.

Snippet of the build error:

       YACC   m2-exp.c
       CXX    m2-exp.o
     In file included from .../gdb/m2-exp.y:42:
     In file included from .../gdb/language.h:26:
     In file included from .../gdb/symtab.h:39:
     .../gdb/split-name.h:34:3: error: expected identifier
       DOT,
       ^
     m2-exp.c:163:13: note: expanded from macro 'DOT'
     #define DOT 302
                 ^
     In file included from .../gdb/m2-exp.y:42:
     In file included from .../gdb/language.h:26:
     .../gdb/symtab.h:307:23: error: expected unqualified-id
             style = split_style::DOT;
                                  ^
     m2-exp.c:163:13: note: expanded from macro 'DOT'
     #define DOT 302
                 ^
     2 errors generated.


All three versions of MacOS includes GNU Bison 2.3 and it appears that 
this issue was fixed in GNU Bison 2.4.

The change between GNU Bison 2.3 and 2.4 for the m2-exp.c file is that 
the include statements are placed before the list of token kinds (define 
statements, including the define for DOT that is used in an enum 
definition in symtab.h).


Looking at the binutils tree, I see that sub-directory gprofng contains 
bison.m4 and a check to confirm that at least version 3.0.4 is available.

I think the bison.m4 file should be moved up one level and used in both 
gprofng and gdb, but I'm unable to re-generate the configure scripts.

Can someone with knowledge of how automake works fix this?

(CC'ing you Tom as you were the one introducing the split-name.h file 
that highlights this flaw.)

Kind regards,
Torbjörn

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

end of thread, other threads:[~2023-09-17 15:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-19 18:11 GDB13 fails to build on MacOS using supplied GNU Bison 2.3 Torbjorn SVENSSON
2023-08-28  5:12 ` Tom de Vries
2023-08-31 13:31 ` Tom Tromey
2023-08-31 14:01   ` Torbjorn SVENSSON
2023-08-31 18:44     ` Tom Tromey
2023-09-01 10:51       ` Martin Simmons
2023-09-01 13:02         ` Tom Tromey
2023-09-14 20:26           ` Torbjorn SVENSSON
2023-09-14 21:32             ` Tom Tromey
2023-09-15 12:04               ` Torbjorn SVENSSON
2023-09-17  1:21                 ` Tom Tromey
2023-09-17 15:26                   ` Torbjorn SVENSSON

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