dmd's linking order
Steven Schveighoffer
schveiguy at yahoo.com
Wed Apr 11 05:09:17 PDT 2012
On Wed, 11 Apr 2012 04:47:19 -0400, Jacob Carlborg <doob at me.com> wrote:
> On 2012-04-11 10:37, Jonathan M Davis wrote:
>
>> I have no idea. If they always need to be in a particular order, then
>> we can
>> just make dmd put the user provide ones in the correct spot, but if it
>> varies
>> depending on the flags, then either dmd is going to have to know which
>> flags go
>> in which order (assuming that it can), or there's no way to solve the
>> problem
>> without introducing new flags to dmd to give you more control over
>> linking
>> order or just using the linker directly.
>>
>> Unfortunately, I have no idea why the linking order even matters in the
>> first
>> place, so I can't really say what we need to do here. Hopefully,
>> someone else
>> around here _does_ know. But the issue does seem to need to be brought
>> up.
>
> I also finds it strange that linking order should matter.
It was a recent change in ld, it happened to me when I upgraded to ubutu
11.10.
See this bug:
http://d.puremagic.com/issues/show_bug.cgi?id=6822
I remember this behavior from old systems I used to work on (really old,
like SunOS 4).
I'm not a linker expert, but I found this page which describes the changes
and the reasoning:
See this post: https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition
My suggestion is to allow specifying in the dmd.conf file the specific
location of phobos/druntime in the link order, then leave the -L options
at the front.
-Steve
More information about the Digitalmars-d
mailing list