Bug 16827 - Duplication symbol _sim_addr_range_hit_p in sim common on Mavrick
Summary: Duplication symbol _sim_addr_range_hit_p in sim common on Mavrick
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: sim (show other bugs)
Version: 7.7
: P2 normal
Target Milestone: ---
Assignee: Mike Frysinger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-10 05:12 UTC by Chris Johns
Modified: 2015-03-29 21:52 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Clean up and fix the inline of the sim-arange code. (405 bytes, patch)
2014-04-10 05:12 UTC, Chris Johns
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Johns 2014-04-10 05:12:20 UTC
Created attachment 7544 [details]
Clean up and fix the inline of the sim-arange code.

Building RTEMS targets with a simulator fail on Mavrick using cc etc with:

duplicate symbol _sim_addr_range_hit_p in:
    nrun.o
    libsim.a(sim-cpu.o)

printed once for each object file libsim.a. The failure happens with the bfin and h8300 targets and I suspect all will fail. The same targets build on FreeBSD 10.

The configure command line is:

../gdb-7.7/configure --build=x86_64-apple-darwin13.1.0 --host=x86_64-apple-darwin13.1.0 --target=h8300-rtems4.11 --verbose --disable-nls --without-included-gettext --disable-win32-registry --disable-werror --enable-sim --without-zlib --with-expat --with-python --prefix=/Users/chris/development/rtems/4.11 --bindir=/Users/chris/development/rtems/4.11/bin --exec-prefix=/Users/chris/development/rtems/4.11 --includedir=/Users/chris/development/rtems/4.11/include --libdir=/Users/chris/development/rtems/4.11/lib --mandir=/Users/chris/development/rtems/4.11/share/man --infodir=/Users/chris/development/rtems/4.11/share/info

I attach a patch which works on Mavrick and FreeBSD. I am not sure it is 100% as some of the logic used in the way the inline, extern and extern inline are handled left me confused so I just cleaned up the code.
Comment 1 Mike Frysinger 2015-03-29 21:52:54 UTC
i fixed the issue here:
https://sourceware.org/ml/gdb-patches/2015-03/msg00967.html