public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "rbusser at lgcpi dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug build/12925] New: link creating libsim.a has multiple definition problems Date: Thu, 23 Jun 2011 15:02:00 -0000 [thread overview] Message-ID: <bug-12925-4717@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=12925 Summary: link creating libsim.a has multiple definition problems Product: gdb Version: 7.2 Status: NEW Severity: normal Priority: P2 Component: build AssignedTo: unassigned@sourceware.org ReportedBy: rbusser@lgcpi.com building a gdb with simulation capability for the powerpc results in a linker problem. inline.c has these preprocessor commands #if (SEMANTICS_INLINE & INCLUDE_MODULE) #include "semantics.c" #endif #if (IDECODE_INLINE & INCLUDE_MODULE) #include "idecode.c" #endif if SEMANTICS_INLINE is defined, sementics.c gets inlined into idecode.c. The problem here is that semantics.c includes a global declaration around line #37 int option_mpc860c0 = 0; So, when the linker attempts to create libsim.a with this command ar rc libsim.a debug.o filter_filename.o bits.o sim-endian.o os_emul.o emul_generic.o emul_bugapi.o emul_chirp.o emul_netbsd.o emul_unix.o registers.o vm.o corefile.o model.o spreg.o cpu.o interrupts.o events.o cap.o device.o tree.o device_table.o itable.o mon.o icache.o semantics.o idecode.o support.o sim-fpu.o psim.o version.o pk_disklabel.o hw_cpu.o hw_memory.o hw_nvram.o hw_iobus.o hw_htab.o hw_disk.o hw_trace.o hw_register.o hw_vm.o hw_init.o hw_core.o hw_pal.o hw_com.o hw_eeprom.o hw_opic.o hw_glue.o hw_phb.o hw_ide.o options.o gdb-sim.o sim_calls.o callback.o targ-map.o which attempts to link both semantics.o and idecode.o the result is a multiple definitions error involving option_mpc860c0. Then, if you remove the definition of SEMANTICS_INLINE by commenting out these lines in ppc-config.h /* #ifndef SEMANTICS_INLINE #define SEMANTICS_INLINE (DEFAULT_INLINE & ~INLINE_MODULE) #endif */ line #157 in options.c printf_filtered ("SEMANTICS_INLINE = %s\n", options_inline (SEMANTICS_INLINE)); complains. It is in a print function called "print_options" which apparently assumes that SEMANTICS_INLINE is always defined. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next reply other threads:[~2011-06-23 15:02 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-23 15:02 rbusser at lgcpi dot com [this message] 2015-03-29 22:01 ` [Bug sim/12925] link sim " vapier at gentoo dot org 2015-03-29 22:02 ` vapier at gentoo dot org 2021-10-03 15:40 ` vapier at gentoo dot org 2021-10-31 9:33 ` vapier at gentoo dot org
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=bug-12925-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /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: linkBe 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).