public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Joel Sherrill <joel.sherrill@gmail.com>,
	Eli Zaretskii via Gdb <gdb@sourceware.org>
Subject: Re: GDB Master Fails to Build on CentOS 7
Date: Fri, 21 May 2021 11:31:15 -0400	[thread overview]
Message-ID: <dddc1d6d-1df9-e57d-e60a-fc443c413d9c@polymtl.ca> (raw)
In-Reply-To: <CAF9ehCXzGTwn58jdL=+=fSaB6Z_XMfL_PNa8g8+jWCgLOKt6dw@mail.gmail.com>



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

  reply	other threads:[~2021-05-21 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 15:18 Joel Sherrill
2021-05-21 15:31 ` Simon Marchi [this message]
2021-05-21 16:19   ` Joel Sherrill

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=dddc1d6d-1df9-e57d-e60a-fc443c413d9c@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb@sourceware.org \
    --cc=joel.sherrill@gmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).