public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB Master Fails to Build on CentOS 7
@ 2021-05-21 15:18 Joel Sherrill
  2021-05-21 15:31 ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 2021-05-21 15:18 UTC (permalink / raw)
  To: Eli Zaretskii via Gdb

Hi

This appears to be due to the older gcc apparently not defaulting to C99.
Either the code needs to change or -std=c99 needs to be passed by the build
machinery.

ibtool: compile:  gcc -O2 -g -pipe
-I/home/joel/rtems-work/rtems-source-builder/rtems/build/tmp/sb-1001/7/rtems-powerpc/home/joel/rtems-work/tools/7/include
-DHAVE_CONFIG_H -I. -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes
-I. -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes -I../bfd
-I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/../include
-I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/../bfd -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT ppc-dis.lo -MD
-MP -MF .deps/ppc-dis.Tpo -c
../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c -o ppc-dis.o
../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c: In function
‘print_insn_powerpc’:
../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c:1071:8:
error: ‘for’ loop initial declarations are only allowed in C99 mode
        for (int i = 0; i < 2; i++)

Thanks.

--joel
RTEMS

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

* Re: GDB Master Fails to Build on CentOS 7
  2021-05-21 15:18 GDB Master Fails to Build on CentOS 7 Joel Sherrill
@ 2021-05-21 15:31 ` Simon Marchi
  2021-05-21 16:19   ` Joel Sherrill
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2021-05-21 15:31 UTC (permalink / raw)
  To: Joel Sherrill, Eli Zaretskii via Gdb



On 2021-05-21 11:18 a.m., Joel Sherrill via Gdb wrote:
> Hi
> 
> This appears to be due to the older gcc apparently not defaulting to C99.
> Either the code needs to change or -std=c99 needs to be passed by the build
> machinery.
> 
> ibtool: compile:  gcc -O2 -g -pipe
> -I/home/joel/rtems-work/rtems-source-builder/rtems/build/tmp/sb-1001/7/rtems-powerpc/home/joel/rtems-work/tools/7/include
> -DHAVE_CONFIG_H -I. -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes
> -I. -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes -I../bfd
> -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/../include
> -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/../bfd -W -Wall
> -Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT ppc-dis.lo -MD
> -MP -MF .deps/ppc-dis.Tpo -c
> ../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c -o ppc-dis.o
> ../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c: In function
> ‘print_insn_powerpc’:
> ../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c:1071:8:
> error: ‘for’ loop initial declarations are only allowed in C99 mode
>         for (int i = 0; i < 2; i++)
> 
> Thanks.
> 
> --joel
> RTEMS
> 

This should normally be fixed by this commit:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a8d6316b67d52eaa1b7b311084ddff71a66f7cc0

Simon

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

* Re: GDB Master Fails to Build on CentOS 7
  2021-05-21 15:31 ` Simon Marchi
@ 2021-05-21 16:19   ` Joel Sherrill
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Sherrill @ 2021-05-21 16:19 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Eli Zaretskii via Gdb

On Fri, May 21, 2021 at 10:31 AM Simon Marchi <simon.marchi@polymtl.ca>
wrote:

>
>
> On 2021-05-21 11:18 a.m., Joel Sherrill via Gdb wrote:
> > Hi
> >
> > This appears to be due to the older gcc apparently not defaulting to C99.
> > Either the code needs to change or -std=c99 needs to be passed by the
> build
> > machinery.
> >
> > ibtool: compile:  gcc -O2 -g -pipe
> >
> -I/home/joel/rtems-work/rtems-source-builder/rtems/build/tmp/sb-1001/7/rtems-powerpc/home/joel/rtems-work/tools/7/include
> > -DHAVE_CONFIG_H -I.
> -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes
> > -I. -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes -I../bfd
> > -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/../include
> > -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/../bfd -W -Wall
> > -Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT ppc-dis.lo
> -MD
> > -MP -MF .deps/ppc-dis.Tpo -c
> > ../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c -o
> ppc-dis.o
> > ../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c: In
> function
> > ‘print_insn_powerpc’:
> > ../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c:1071:8:
> > error: ‘for’ loop initial declarations are only allowed in C99 mode
> >         for (int i = 0; i < 2; i++)
> >
> > Thanks.
> >
> > --joel
> > RTEMS
> >
>
> This should normally be fixed by this commit:
>
>
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a8d6316b67d52eaa1b7b311084ddff71a66f7cc0


Hmm.. looks like my bad. The package recipe for rtems-binutils-gdb-head
actually uses a specific hash and that's set to ed29efb.

Looks like I need to bump our hash.

Thanks.

--joel

>
>
> Simon
>

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

end of thread, other threads:[~2021-05-21 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 15:18 GDB Master Fails to Build on CentOS 7 Joel Sherrill
2021-05-21 15:31 ` Simon Marchi
2021-05-21 16:19   ` Joel Sherrill

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