On Tue, 30 Sep 2008, Linus Torvalds wrote:
A clearer (and more flexible) solution might be this patch. It's more
explicit about the fact that it simply makes it clear that any drivers
that are added by the architecture Makefile will be _first_ in the list of
drivers.
I suspect we should do the same with 'libs' and 'core' too, for that
matter, but we don't really use '*.a' libraries any more so link order
doesn't matter apart from initcall ordering. And libraries should hopfully
never have that issue. And 'core' is at least right now just the
initramfs thing. So in practice, it's probably only drivers/ that coul
have issues like this.
Sam added to Cc, since this is a build issue. What do people think?
Background: We are very careful to add 'drivers/pci' _before_
'drivers/{acpi,pnp}' in the drivers/Makefile, but what happens now is that
since the arch Makefile adds it's own drivers to the very end, the really
core PCI initcalls actually get ordered at the end, not the beginning.
Linus
---
Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 1d03c16..642b9b9 100644
--- a/Makefile
+++ b/Makefile
@@ -458,7 +458,6 @@ scripts: scripts_basic include/config/auto.conf
# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
-drivers-y := drivers/ sound/ firmware/
net-y := net/
libs-y := lib/
core-y := usr/
@@ -517,6 +516,9 @@ endif
include $(srctree)/arch/$(SRCARCH)/Makefile
+# Do this _after_ the architecture may have added its own core drivers
+drivers-y += drivers/ sound/ firmware/
+
ifneq (CONFIG_FRAME_WARN,0)
KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
endif
--
| Andrew Morton | -mm merge plans for 2.6.23 |
| Chuck Ebbert | Why do so many machines need "noapic"? |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 023/196] MCP_UCB1200: Convert from class_device to device |
git: | |
| David Miller | Re: [BUG] New Kernel Bugs |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 31/37] dccp: Remove manual influence on NDP Count feature |
| Gregory Haskins | [RFC PATCH 00/17] virtual-bus |
