[Issue 3266] New: rdmd links core.thread twice
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 27 05:36:30 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3266
Summary: rdmd links core.thread twice
Product: D
Version: 2.031
Platform: Other
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: lat7h at virginia.edu
Consider the following minimal code in threadbug.d:
import core.thread;
void main() { }
Running
rdmd threadbug.d
gives many linker error messages stating that the core.thread functions are
present in both the rdmd-generated temporary "threadbug.o" and the libphobos1.a
library file; for instance:
/usr/opt/dmd2/linux/lib/libphobos2.a(thread_42_258.o): In function
`_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread':
core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x0):
multiple definition of
`_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread'
/tmp/rdmd-threadbug.d-90B05FDCCD9547CEC2BBFC3765364CC0/threadbug.o:/usr/opt/dmd2/src/druntime/import/core/sys/posix/sched.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x0):
first defined here
Running
dmd -run threadbug.d
gives no errors.
It appears that rdmd's include-all-dependencies-in-the-o-file approach lacks
the proper exception for core.thread.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list