Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
November 01, 2011 [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: not available
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20111101/2fb23817/attachment.patch>
|
November 01, 2011 [dmd-internals] [PATCH] Add -sL swith to pass linker flags at the end of the linker command | ||||
---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | 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.
>
|
November 01, 2011 [dmd-internals] [PATCH] Add -sL swith to pass linker flags at the end of the linker command | ||||
---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | 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 |
November 07, 2011 [dmd-internals] [PATCH] Add -sL swith to pass linker flags at the end of the linker command | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright, el 1 de noviembre a las 12:33 me escribiste: > Could you add this in the form of a github pull request? Thanks! http://permalink.gmane.org/gmane.comp.lang.d.dmd.devel/2530 Thank you. -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- ... los cuales son susceptibles a una creciente variedad de ataques previsibles, tales como desbordamiento del tamp?n, falsificaci?n de par?metros, ... -- Stealth - ISS LLC - Seguridad de IT |
November 07, 2011 [dmd-internals] [PATCH] Add -sL swith to pass linker flags at the end of the linker command | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | Brad Roberts, el 1 de noviembre a las 14:13 me escribiste: > Does this mean the d1 implementation will be significantly different from the d2 implementation? Why? I don't understand what are you talking about, but I would say no, I don't see why it should be any differences between D1 and D2. In fact, I just tried and it applies cleanly to the master branch too. -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- If you don't know what direction you should take You don't know where you are |
November 07, 2011 [dmd-internals] [PATCH] Add -sL swith to pass linker flags at the end of the linker command | ||||
---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | Leandro Lucarella, el 7 de noviembre a las 09:05 me escribiste: > Walter Bright, el 1 de noviembre a las 12:33 me escribiste: > > Could you add this in the form of a github pull request? Thanks! > > http://permalink.gmane.org/gmane.comp.lang.d.dmd.devel/2530 Crap. https://github.com/D-Programming-Language/dmd/pull/497 -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- Y vos, me dijiste que soy, un abismo de silencio. Ser?, porque vos no escuchas, que yo grito por dentro. |
Copyright © 1999-2021 by the D Language Foundation