Re: [PATCH] driver/char/Makefile cleanup and bugfix

From: Michael Elizabeth Chastain (
Date: Fri Aug 04 2000 - 14:12:04 EST

Hi Pauline,

That stripping happens in the rule for building $(O_TARGET):

    # Rules.make
    $(LD) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(ALL_O), $^)

The Gnu Make documentation guarantees that $^ has no duplicates.

It's tricky but it was the quickest way to remove the duplicates
while preserving order.

This will be documented soon in Documentation/kbuild/makefiles.txt.
I really want Makefile writers to have some documentation to rely on,
rather than wondering if some property in Rules.make is a guarantee
or an accident of the moment.

Michael Elizabeth Chastain
"love without fear"

> Err, no think non modular for all. I saw the Makefile rule where
> it strips .o's from the modules which are built in the kernel,
> but didn't find the stripping of multiple built-in .o's. Won't
> that imply the kernel-link will fail on to i2c-old.o's?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:13 EST