static linking (was Re: [mercury-users] ICFP 2002)
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Aug 12 15:54:13 AEST 2002
On 12-Aug-2002, Michael Day <mikeday at yeslogic.com> wrote:
>
> > mmc --make --link-flags "--mercury-libs static"
>
> In fact, I seem to be getting static binaries no matter how I build them.
> When I hide the Mercury libraries the binaries still run without errors,
> and they're rather large (smallest is 1.5mb).
>
> Are static binaries the default on Linux?
Yes. See the README.Linux file in the distribution.
As it says there, to use the shared libraries, you must compile
your program with `mmc --pic-reg' and link with `ml --shared' or add
`MGNUCFLAGS=--pic-reg' and `MLFLAGS=--shared' to your Mmakefile.
If you're using `mmc --make', that means either using
`mmc --make --pic-reg --link-flags "--shared"'
or putting the above settings of MGNUCFLAGS and MLFLAGS in the
Mercury.options file.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list