[m-rev.] diff: fix `mmc --make' link object order
Simon Taylor
stayl at cs.mu.OZ.AU
Thu May 23 16:01:13 AEST 2002
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:
> > 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'.
In general that's true, but we need to explicitly link with the `.a'
files when compiling the compiler (the `.so' files for the libraries
need to be installed before they can be used).
Simon.
--------------------------------------------------------------------------
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