public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug sim/26194] New: sim/igen generates code leading to linker errors with -fno-common (GCC 10 default)
@ 2020-07-02  6:04 sebastian.huber@embedded-brains.de
  2020-07-02 12:35 ` [Bug sim/26194] " simark at simark dot ca
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sebastian.huber@embedded-brains.de @ 2020-07-02  6:04 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26194

            Bug ID: 26194
           Summary: sim/igen generates code leading to linker errors with
                    -fno-common (GCC 10 default)
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: sim
          Assignee: unassigned at sourceware dot org
          Reporter: sebastian.huber@embedded-brains.de
                CC: vapier at gentoo dot org
  Target Milestone: ---

For example building the v850 simulator for the v850-rtems target results with
a GCC 10 build compiler:

make[3]: Entering directory
'/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850'
gcc -O2 -g -pipe
-I/scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000/6/rtems-v850/build/rtems/6/include
-DHAVE_CONFIG_H  -DWITH_DEFAULT_ALIGNMENT=NONSTRICT_ALIGNMENT
-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31
-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE   -DDEFAULT_INLINE=0
-DWITH_RESERVED_BITS=1  -Wall -Wdeclaration-after-statement -Wpointer-arith
-Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement
-Wempty-body -Wmissing-parameter-type -Wold-style-declaration
-Wold-style-definition -Wformat-nonliteral   -DDEBUG
-I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/v850/../../newlib/libc/sys/sysnecv850
  -I. -I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/v850 -I../common
-I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/v850/../common
-I../../include
-I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/v850/../../include
-I../../bfd
-I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/v850/../../bfd
-I../../opcodes
-I../../../sourceware-mirror-binutils-gdb-4e394b2/sim/v850/../../opcodes  -g
-O2
-L/scratch/git-rtems-source-builder/rtems/build/tmp/sb-10000/6/rtems-v850/build/rtems/6/lib
-o run \
  nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a 
../../libiberty/libiberty.a -ldl  -L../../zlib -lz  
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
libsim.a(idecode.o):/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850/idecode.h:71:
multiple definition of `idecode_issue';
libsim.a(irun.o):/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850/idecode.h:71:
first defined here
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
libsim.a(engine.o):/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850/idecode.h:71:
multiple definition of `idecode_issue';
libsim.a(irun.o):/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850/idecode.h:71:
first defined here
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
libsim.a(support.o):/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850/idecode.h:71:
multiple definition of `idecode_issue';
libsim.a(irun.o):/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850/idecode.h:71:
first defined here
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
libsim.a(semantics.o):/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850/idecode.h:71:
multiple definition of `idecode_issue';
libsim.a(irun.o):/scratch/git-rtems-source-builder/rtems/build/v850-rtems6-gdb-4e394b2-x86_64-linux-gnu-1/build/sim/v850/idecode.h:71:
first defined here

We have:

tail ./sim/v850/idecode.h
(SIM_DESC sd,
 instruction_word instruction_0,
 instruction_address cia);

instruction_address (*idecode_issue)
(SIM_DESC sd,
 instruction_word instruction_0,
 instruction_address cia);

#endif /* _IDECODE_H_*/

This is probably generated by (sim/igen/gen-idecode.c):

void
print_idecode_issue_function_header (lf *file,
                                     const char *processor,
                                     function_decl_type decl_type,
                                     int nr_prefetched_words)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2020-07-03 19:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02  6:04 [Bug sim/26194] New: sim/igen generates code leading to linker errors with -fno-common (GCC 10 default) sebastian.huber@embedded-brains.de
2020-07-02 12:35 ` [Bug sim/26194] " simark at simark dot ca
2020-07-02 15:45 ` sebastian.huber@embedded-brains.de
2020-07-02 15:58 ` simark at simark dot ca
2020-07-03 19:04 ` cvs-commit at gcc dot gnu.org
2020-07-03 19:05 ` sebastian.huber@embedded-brains.de

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