[dmd-internals] [PATCH] Add -sL swith to pass linker flags at the end of the linker command

Brad Roberts braddr at puremagic.com
Tue Nov 1 14:13:43 PDT 2011


Does this mean the d1 implementation will be significantly different from 
the d2 implementation?  Why?

On Tue, 1 Nov 2011, Leandro Lucarella wrote:

> Date: Tue, 1 Nov 2011 09:53:02 -0300
> From: Leandro Lucarella <luca at llucax.com.ar>
> Reply-To: Discuss the internals of DMD <dmd-internals at puremagic.com>
> To: dmd-internals at puremagic.com
> Subject: [dmd-internals] [PATCH] Add -sL swith to pass linker flags at the end
>      of the linker command
> 
> Hi! I'm working on generating stacktraces (in Linux) for unhandled
> exceptions and other situations for D1+Tango and I came across a problem
> that I can't find any way to fix but to do it in the compiler.
> 
> The problem is I need to pass -ldl to the linker, but for some reason it
> has to be passed *after* the standard library. Since DMD pass all the -L
> flags before it, I came up with a patch that adds a new -sL flag that
> places the passed flags at the end of the linking commands.
> 
> I know Walter is not a fan of compiler flags, but I really don't see
> other option (besides writing the linker command manually, which is not
> really a good option). If you know another way to fix this, please let
> me know. If not, please consider reviewing the patch and merging it
> after any needed changes. In particular I don't know what to do with the
> switch in windows, I don't know if this is needed and I don't know the
> windows linker flags, so in the patch I just placed these flags after
> the regular linker flags.
> 
> Thanks you.
> 
> (patch against DMD 1.071)
> 
> -- 
> Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
> ----------------------------------------------------------------------
> GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
> ----------------------------------------------------------------------
> 41% of all people take people with curly hair less seriously
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-sL-swith-to-pass-linker-flags-at-the-end.patch
Type: text/x-diff
Size: 4059 bytes
Desc: 
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20111101/9ff5d501/attachment.patch>
-------------- next part --------------
_______________________________________________
dmd-internals mailing list
dmd-internals at puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals


More information about the dmd-internals mailing list