Re: ac21 config problem

From: Keith Owens (kaos@ocs.com.au)
Date: Mon Jun 19 2000 - 19:24:28 EST


On Mon, 19 Jun 2000 16:19:16 +0100 (BST),
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>Keith Owens wrote
>>Andrew Morton wrote
>> >/usr/src/linux/Rules.make:263: target `8390.o' given more than once in
>> >the same rule.
>
>Thats fine

That's annoying.

>> AC, please add to 2.4.0-test1. Against 2.4.0-test1-ac21.
>
>No - this breaks the initialisation order

Hits self on head. This patch removes the annoying warnings without
disturbing the link order. It even documents why sort is bad for these
variables ;).

BTW: drivers/usb/Makefiles *does* sort O_OBJS and OX_OBJS. Either they
do not care about link order or it is a bug, no idea which.

Index: 0-test1-ac21.1/Rules.make
--- 0-test1-ac21.1/Rules.make Fri, 26 May 2000 13:10:01 +1000 kaos (linux-2.4/B/c/24_Rules.make 1.1 644)
+++ 0-test1-ac21.1(w)/Rules.make Tue, 20 Jun 2000 10:23:28 +1000 kaos (linux-2.4/B/c/24_Rules.make 1.1 644)
@@ -68,9 +68,13 @@
 
 #
 # Rule to compile a set of .o files into one .o file
+# Sort O[X]_OBJS to remove duplicates. Do it after setting ALL_O, the
+# initial order of O[X]_OBJS variables must be preserved for linking.
 #
 ifdef O_TARGET
-ALL_O = $(OX_OBJS) $(O_OBJS)
+ALL_O := $(OX_OBJS) $(O_OBJS)
+O_OBJS := $(sort $(O_OBJS))
+OX_OBJS := $(sort $(OX_OBJS))
 $(O_TARGET): $(ALL_O)
         rm -f $@
     ifneq "$(strip $(ALL_O))" ""

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:18 EST