FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Some recommended changes to Unix with respect to libraries

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
Gregor



Joined: 05 May 2006
Posts: 72
Location: Portland, OR

PostPosted: Mon Oct 09, 2006 4:04 pm    Post subject: Some recommended changes to Unix with respect to libraries Reply with quote

There are several changes I'd recommend to make libraries a bit less painful on Unix. All three of them are either fixing bugs or adding features - that is, it could not have possibly worked as is, but does work with this change. So, they're not harmful.

1) In build.d, the vShrLibExtention [sic] is `s` instead of `so`. .s files are assembly, .so files are shared objects Smile This is wrong in both the provided .cfg and build.d.

2) Again in build.d, for DMD on GNU/Linux, the default vLinkLibSwitch is ``, instead of `-l`. If you try to link against some library with no switches, it'll be very unhappy (cannot find file 'phobos'). This should be -l. It's correct in the example .cfg file, so it's less important.

3) This is a hand-wavy one Smile. There should be a mechanism for building shared libraries on Unix. I've written one for build used with DSSS (sorry, I have sort of a branch Smile ), so I can generalize it a bit and submit it if you'd like. The method of generating shared libraries for Windows can't be generalized, since there's no equivalent of a DllMain, no such kludge is necessary on Unix. It gets even more confusing, since GDC on Windows can build shared libraries like GDC on Unix, generating its own DllMain et cetera Smile. Unfortunately (well, fortunately for me) DMD doesn't support shared libraries on linux, so that makes the situation a bit more complicated (there needs to be a -shlib-support flag or something thereabout), but it's still very much an implementable plan.
(Note: This is not related to my library naming convention proposal, which I decided I'd implement at a higher level - it does make sense that build should be able to name things whatever the user feels like).

Sorry if I came off a bit ranty there Smile

EDIT: one of these days I'll read my post before posting...
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group