[m-rev.] diff: fix `mmc --make' link object order
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed May 22 18:52:56 AEST 2002
On 22-May-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 22-May-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 22-May-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > >
> > > compiler/make.program_target.m:
> > > MLOBJS or `--link-objects' may contain `.a' files, which
> > > should come last on the linker command line.
> >
> > You know, it seems to me that putting `.a' files in MLOBJS
> > or passing them via `--link-objects' is an abuse of that feature.
> >
> > Surely `.a' files should be mentioned in MLLIBS rather than MLOBJS
> > and passed via `--library' rather than `--link-objects', shouldn't they?
>
> MLLIBS is documented to be a list of `-l' options, so `.a'
> files shouldn't be passed there.
Well, MLOBJS is documented to be a list of object files,
so `.a' files shouldn't be passed there either.
`.a' files can't be passed directly in MLLIBS,
but you can pass the corresponding `-l' option.
E.g. instead of `MLOBJS=libfoo.a' use `MLLIBS=-lfoo'.
Likewise you can use `--library foo' instead of `--link-objects libfoo.a'.
--
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-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list