From: Peter Samuelson <peter@cadcamlab.org>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Keith Owens <kaos@ocs.com.au>,
Jeff Garzik <jgarzik@mandrakesoft.com>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: test10-pre7
Date: Tue, 31 Oct 2000 21:06:33 -0600 [thread overview]
Message-ID: <20001031210633.D1041@wire.cadcamlab.org> (raw)
In-Reply-To: <Pine.LNX.4.10.10010310930110.6866-100000@penguin.transmeta.com> <200010311928.e9VJS2d08641@flint.arm.linux.org.uk>
In-Reply-To: <200010311928.e9VJS2d08641@flint.arm.linux.org.uk>; from rmk@arm.linux.org.uk on Tue, Oct 31, 2000 at 07:28:01PM +0000
[Russell King]
> Since someone kindly enlightened me that LINK_FIRST was unsorted, I'm
> finding it very hard to grasp what the difference is between an
> unsorted LINK_FIRST and unsorted LINK_LAST list, and an unsorted
> obj-y list. From what I understand, obj-y = $(LINK_FIRST)
> $(LINK_LAST) ?
Not quite. If that's how you understand it, I see why you think it's a
bad idea. Here's what is *really* happening:
obj-y = {subset of LINK_FIRST that is in obj-y} \
{subset of obj-y that is not in LINK_FIRST or LINK_LAST} \
{subset of LINK_LAST that is in obj-y}
GNU make has extensions that make this easy to implement -- no more
verbose than the pseudocode, in fact.
The biggest difference between LINK_FIRST and obj-y is that LINK_FIRST
is meant to be a static list, not dependent on CONFIG_*, and specifies
*only* those objects which must be linked before (or after, for
LINK_LAST) other objects. In the common case, most object files do
*not* appear in LINK_FIRST or LINK_LAST, but just in O_OBJS.
In the pathological case of strict requirements for the whole
directory, LINK_FIRST would contain all of obj-y. Keith and I think
this is a rare case -- a more common case is the opposite:
LINK_FIRST/LAST are empty because there are *no* ordering requirements.
Again, anything that appears in O_OBJS but not in LINK_FIRST is linked
in arbitrary order. Anything that appears in LINK_FIRST but not in
O_OBJS is ignored. That is why it can be a static list.
Since LINK_FIRST is a (usually short) static list, it is easy for the
author to guarantee that it has no duplicate files in it. By contrast,
O_OBJS (or obj-y) frequently has duplicates, because of things like
obj-$(CONFIG_FOO) := foo.o xxx.o
obj-$(CONFIG_BAR) := bar.o xxx.o
where xxx.o is something like 8390 support for network cards.
Removing duplicates is a side effect of the GNU make 'sort' function,
which is THE ONLY REASON we want to sort $(O_OBJS). The reordering is
the "other" side effect, the less desirable one. GNU make does not
provide a 'uniq-without-sort' function, and while one is trivial to
write in e.g. shell, some of us consider a shell hack to be, well, more
hackish than LINK_FIRST.
** BTW, the only reason I'm still posting to this thread, which seems
pretty moot because "Linus Has Spoken", is that I believe there is
still a lot of misunderstanding about what LINK_FIRST actually does.
When I'm satisfied that the opponents truly *understand* LINK_FIRST
and still oppose it, I'll shut up.
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-01 3:07 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-30 19:32 test10-pre7 Linus Torvalds
2000-10-30 20:34 ` [PATCH] test10-pre7 Alexander Viro
2000-10-30 21:02 ` Linus Torvalds
2000-10-30 21:23 ` Alexander Viro
2000-10-30 22:01 ` Alexander Viro
2000-10-30 23:05 ` Linus Torvalds
2000-10-30 23:14 ` Alexander Viro
2000-10-30 23:17 ` Linus Torvalds
2000-10-30 22:21 ` Linus Torvalds
2000-10-30 22:06 ` Rik van Riel
2000-10-31 10:05 ` John Kennedy
2000-10-30 21:37 ` test10-pre7 Keith Owens
2000-10-30 22:01 ` test10-pre7 Jeff Garzik
2000-10-30 22:06 ` test10-pre7 Keith Owens
2000-10-30 22:13 ` test10-pre7 Jeff Garzik
2000-10-30 22:24 ` test10-pre7 Linus Torvalds
2000-10-30 22:41 ` test10-pre7 Keith Owens
2000-10-30 22:51 ` test10-pre7 Linus Torvalds
2000-10-30 23:02 ` test10-pre7 Jeff Garzik
2000-10-30 23:04 ` test10-pre7 Keith Owens
2000-10-30 23:08 ` test10-pre7 Linus Torvalds
2000-10-30 23:03 ` test10-pre7 Keith Owens
2000-10-30 23:15 ` test10-pre7 Linus Torvalds
2000-10-30 23:32 ` test10-pre7 Christoph Hellwig
2000-10-30 23:40 ` test10-pre7 Linus Torvalds
2000-10-30 23:45 ` test10-pre7 Christoph Hellwig
2000-10-30 23:51 ` test10-pre7 Linus Torvalds
2000-10-30 23:57 ` test10-pre7 Christoph Hellwig
2000-10-31 0:47 ` test10-pre7 Linus Torvalds
2000-10-31 1:01 ` test10-pre7 Christoph Hellwig
2000-10-31 2:54 ` test10-pre7 Linus Torvalds
2000-10-31 1:49 ` test10-pre7 Keith Owens
2000-10-31 2:07 ` test10-pre7 Keith Owens
2000-10-31 2:58 ` test10-pre7 Linus Torvalds
2000-10-31 13:55 ` test10-pre7 Peter Samuelson
2000-10-31 17:29 ` test10-pre7 Linus Torvalds
2000-10-31 17:38 ` test10-pre7 H. Peter Anvin
2000-10-31 19:51 ` test10-pre7 Horst von Brand
2000-11-01 2:32 ` test10-pre7 Peter Samuelson
2000-10-31 4:57 ` test10-pre7 Rusty Russell
2000-10-31 6:10 ` test10-pre7 Linus Torvalds
2000-10-30 23:38 ` test10-pre7 Keith Owens
2000-10-30 23:47 ` test10-pre7 Linus Torvalds
2000-10-31 0:03 ` test10-pre7 Keith Owens
2000-10-31 9:37 ` test10-pre7 Russell King
2000-10-31 14:02 ` test10-pre7 Keith Owens
2000-10-31 14:16 ` test10-pre7 Peter Samuelson
2000-10-31 17:31 ` test10-pre7 Linus Torvalds
2000-10-31 19:28 ` test10-pre7 Russell King
2000-10-31 20:59 ` test10-pre7 Linus Torvalds
2000-11-01 0:16 ` test10-pre7 (LINK ordering) Randy Dunlap
2000-11-01 0:52 ` Jeff Garzik
2000-11-01 3:06 ` Peter Samuelson [this message]
2000-11-01 2:35 ` test10-pre7 Keith Owens
2000-11-01 12:46 ` test10-pre7 Alan Cox
2000-10-31 11:59 ` test10-pre7 Peter Samuelson
2000-10-31 21:01 ` test10-pre7 John Alvord
2000-11-01 3:30 ` test10-pre7 Peter Samuelson
2000-10-31 8:18 ` test10-pre7 Rogier Wolff
2000-10-31 0:52 test10-pre7 Michael Elizabeth Chastain
2000-10-31 1:05 ` test10-pre7 Christoph Hellwig
2000-10-31 16:15 test10-pre7 Vladislav Malyshkin
2000-10-31 16:45 ` test10-pre7 Peter Samuelson
2000-10-31 18:07 ` test10-pre7 Vladislav Malyshkin
2000-10-31 18:38 ` test10-pre7 Linus Torvalds
2000-10-31 19:16 ` test10-pre7 H. Peter Anvin
2000-11-01 3:15 ` test10-pre7 Peter Samuelson
2000-11-01 6:11 ` test10-pre7 H. Peter Anvin
2000-11-01 6:31 ` test10-pre7 Peter Samuelson
2000-11-01 7:42 ` test10-pre7 Peter Samuelson
2000-11-03 16:26 ` test10-pre7 Vladislav Malyshkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20001031210633.D1041@wire.cadcamlab.org \
--to=peter@cadcamlab.org \
--cc=jgarzik@mandrakesoft.com \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®