[m-dev.] Linux & shared libraries

Fergus Henderson fjh at cs.mu.oz.au
Wed Oct 8 17:23:18 AEST 1997


Tyson Richard DOWD, you wrote:
> Fergus Henderson wrote:
> > I've been wondering what we should do about shared libraries on Linux.
> > Currently on Linux, shared and non-shared Mercury code are not compatible.
> > This results in more efficient code for the non-shared case, but is less
> > convenient.
> 
> Perhaps we should now make shared as the default. Apart from the
> benefits of shared libraries, it would bring it into line with what 
> is usually the default on other architectures.
> 
> If we document the efficiency problems (and document that they probably
> only apply to Linux on an x86) then we shouldn't have any problems.
> Perhaps a "performance tuning" section of the user's guide?

Yes, I think a "performance tuning" section is a good idea, and I think
that would address the performance concerns well enough for us to make
shared libraries the default.

But shared and non-shared code would still not be compatible on Linux.
Anytime you build a non-shared library, you would have to explicitly
specify `--no-pic-reg'.  Ditto for anytime you want to link statically.
(So this change would require changes to the
Mmakefiles in the runtime, library, compiler, profiler,
extras/clpr, and extras/trailed_update directories.)

The alternative is to make `.nopicreg' a separate grade.
But that has its own disadvantages.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list