Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>, gdb@sourceware.org
Subject: Re: Building GDB with GCC 10 (-fno-common by default)
Date: Thu, 2 Jul 2020 08:23:49 -0400	[thread overview]
Message-ID: <e34bb750-8248-820c-8466-f30b380be668@simark.ca> (raw)
In-Reply-To: <a7eca1a2-856b-34d0-031f-296d99f05a33@embedded-brains.de>

On 2020-07-01 5:29 a.m., Sebastian Huber wrote:
> Hello,
> 
> could this build error of the powerpc-rtems target be an issue with the 
> new -fno-common default of GCC 10?
> 
> make[3]: Entering directory 
> '/scratch/git-rtems-source-builder/rtems/build/powerpc-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/ppc'
> gcc -O2 -g -pipe 
> -I/scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000/6/rtems-powerpc/build/rtems/6/include 
> -g -O2 -I. -I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/ppc 
> -I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/ppc/../../include 
> -I../../bfd 
> -I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/ppc/../../bfd 
> -I../../gdb 
> -I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/ppc/../../gdb 
> -I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/ppc/../../gdb/config 
> -o igen igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o 
> filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o 
> gen-idecode.o gen-support.o
> /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: 
> ld-insn.o:/scratch/git-rtems-source-builder/rtems/build/powerpc-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/ppc/../../../sourceware-mirror-binutils-gdb-4e394b2/sim/ppc/ld-insn.h:221: 
> multiple definition of `max_model_fields_len'; 
> igen.o:/scratch/git-rtems-source-builder/rtems/build/powerpc-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/ppc/../../../sourceware-mirror-binutils-gdb-4e394b2/sim/ppc/ld-insn.h:221: 
> first defined here
> 
> We have:
> 
> sim/ppc/ld-insn.h:int max_model_fields_len;
> sim/ppc/ld-insn.c:  if (max_model_fields_len < len)
> sim/ppc/ld-insn.c:    max_model_fields_len = len;
> sim/ppc/ld-insn.c:    if (max_model_fields_len < len)
> sim/ppc/ld-insn.c:      max_model_fields_len = len;
> sim/ppc/gen-model.c:            max_model_fields_len,
> sim/ppc/gen-model.c:        max_model_fields_len,
> 
> Missing extern in ld-insn.h and no definition in a source file?

Indeed, the .h should have an extern declaration, and there should be one definition to
allocate the storage, probably in ld-insn.c.  If that fixes the issue, would you mind
sending a patch?

Thanks,

Simon



      reply	other threads:[~2020-07-02 12:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  9:29 Sebastian Huber
2020-07-02 12:23 ` Simon Marchi [this message]

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=e34bb750-8248-820c-8466-f30b380be668@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb@sourceware.org \
    --cc=sebastian.huber@embedded-brains.de \
    /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