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

Walter Bright walter at digitalmars.com
Tue Nov 1 12:33:49 PDT 2011


Could you add this in the form of a github pull request? Thanks!

On 11/1/2011 5:53 AM, Leandro Lucarella wrote:
> 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.
>


More information about the dmd-internals mailing list