Re: test10-pre7

Peter Samuelson
2000-10-31T14:16:42Z

[rmk]
> > Take the instance where we need to link a.o first, z.o second, f.o
> > third and p.o fourth. How does LINK_FIRST / LINK_LAST guarantee
> > this?

It does. Read the patch. LINK_FIRST *itself* is not sorted.

> > LINK_FIRST = a.o z.o
> > LINK_LAST = f.o p.o
> >
> > But then what guarantees that 'a.o' will be linked before 'z.o'?

[kaos]
> LINK_FIRST is processed in the order it is specified, so a.o will be
> linked before z.o when both are present. See the patch.

Indeed, the right solution is

LINK_FIRST := a.o z.o f.o p.o

which is self-documenting, as Keith has said: by looking at that line,
the intended behavior is obvious. You should still accompany this with
a comment explaining *why* the ordering is needed, but even if you
don't, you are giving us much more information than the status quo
(which is "this link order works, any other order is quite possibly
sane but who knows for sure").

Peter