> Yepp. These warnings are there becuse of the way the list-style Makefiles
> work.  You will see lots of them in drivers/net and drivers/scsi, too.

Here's a patch.  Let me know if it works for you; if it does,
I will submit it for 2.4.0.

Here is some history: drivers/sound was the first of the list-style
Makefiles and has been using lists since the late 2.1.NN series.
Originally, drivers/sound/Makefile used $(sort ...) to remove duplicates.

In 2.3.14, Linus introduced init sections.  This made $(sort ...)
unusable for the construction of O_OBJS and OX_OBJS.

Today, O_OBJS and OX_OBJS may contain duplicates, and Rules.make is
supposed to ignore the duplicates (while still preserving order).
The fact that SYMTAB_OBJS causes these warning messages is a bug.

I have written documentation on Rules.make and the interface between
Rules.make and Makefiles.  It's here:

      ftp://ftp.shout.net/pub/users/mec/kbuild/x-Dkm-9.diff

Here's a quote:

      The order of files in $(O_OBJS) and $(OX_OBJS) is significant.
      All $(OX_OBJS) files come first, in the order listed, followed by
      all $(O_OBJS) files, in the order listed.  Duplicates in the lists
      are allowed: the first instance will be linked into $(O_TARGET)
      and succeeding instances will be ignored.  (Note: Rules.make may
      emit warning messages for duplicates, but this is harmless).

I would really like to see this documentation in the kernel.  I've sent
it to Linus three times, and he's ignored it three times.  I will try
some more after the release of 2.4.0.

Anyways ... I'd appreciate it if a couple of people would try this patch
so that I can submit it.

Michael Elizabeth Chastain
<mailto:[EMAIL PROTECTED]>
"love without fear"

===

diff -u -r -N linux-2.4.0-test8/Rules.make linux/Rules.make
--- linux-2.4.0-test8/Rules.make        Sun Aug 13 12:55:51 2000
+++ linux/Rules.make    Sun Sep 10 14:06:02 2000
@@ -190,7 +190,7 @@
 #
 ifdef CONFIG_MODULES
 
-SYMTAB_OBJS = $(LX_OBJS) $(OX_OBJS) $(MX_OBJS) $(MIX_OBJS)
+SYMTAB_OBJS := $(sort $(LX_OBJS) $(OX_OBJS) $(MX_OBJS) $(MIX_OBJS))
 
 ifdef CONFIG_MODVERSIONS
 ifneq "$(strip $(SYMTAB_OBJS))" ""

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to