Why is libphobos not a shared library?
Dejan Lekic
dejan.lekic at gmail.com
Fri Jun 15 01:32:29 PDT 2012
On Fri, 15 Jun 2012 08:06:48 +0000, Dejan Lekic wrote:
> On Thu, 14 Jun 2012 15:28:44 +0100, Iain Buclaw wrote:
>
>> On 14 June 2012 14:18, Matthew Caron <Matt.Caron at redlion.net> wrote:
>>> On 06/14/2012 09:08 AM, Iain Buclaw wrote:
>>>>
>>>> Hi Matthew,
>>>>
>>>> This is a pet peeve with us at the moment. Yes, I can produce a
>>>> shared libphobos for you, but the default runtime implementation does
>>>> not support it, and the current workaround is specific to Linux
>>>> systems only - possibly other related POSIX systems too, so long as
>>>> /proc/self/maps exists on the system.
>>>>
>>>> Regards
>>>
>>>
>>> I am not professing to have copious amounts of time, but how might I
>>> be able to help, even if it is just to test things?
>>>
>>> I have, at my disposal, the standard complement of x86 Linux boxen, as
>>> well as a variety of ARM-ish processors (hence my interest in cross
>>> compiling D), ranging from ARM9 (armv5t) up to Cortex-A8.
>>>
>>> If adoption of D at my company proceeds, this will become more of a
>>> hot-button issue because demand for it will increase. As such, I might
>>> be able to actually devote some on the clock engineering time to it,
>>> rather than doing it in my spare time. As of right now, it is termed
>>> "not for production use", because D and GDC are both fairly new. (Yes,
>>> I know both D2 and GDC are both over 5 years old, but we're that
>>> conservative.). The crux of the issue is that, when you're trying to
>>> cram as much as you can into 16MB of NAND, shared libraries are your
>>> best friend.
>>>
>>>
>>>
>> If the idea is to cram as much into 16MB of NAND, I would suggest that
>> you avoid building libphobos at all, and just have the libdruntime
>> library. I will need to add this as a switch to the build for you. If
>> you need any guidance on building as a shared library, I'll be
>> available on IRC from around 7.30pm GMT+0 time. Either on Freenode or
>> OFTC in #d and #d.gdc.
>>
>>
>> Regards
>
> I wish I could do that with DMD... DMD has -defaultlib=<name> but if
> developer leaves <name> to be empty compilation will fail.
Actually, after some chat on IRC, thanks to Daniel, I've found out that
it is possible to do it with -defaultlib=druntime , but then you must
have libdruntime.a installed (which is not the case if developer
installed packaged dmd because druntime is inside phobos).
--
Dejan Lekic
mailto:dejan.lekic(a)gmail.com
http://dejan.lekic.org
More information about the D.gnu
mailing list