Messages in this thread Patch in this message | | | From | root <kufel!root> | Subject | [PATCH] Makefile fix | Date | Tue, 18 Jul 2000 00:20:40 +0200 (CEST) |
| |
Hi, The following patch removes warnings (probably introduced by the new Makefile system) when attempting to link the same object file into one target multiple times (eg. when compiling some ethernet drivers into kernel):
/usr/src/linux/Rules.make:267: target `8390.o' given more than once in the same rule. /usr/src/linux/Rules.make:267: target `8390.o' given more than once in the same rule. /usr/src/linux/Rules.make:267: target `8390.o' given more than once in the same rule. /usr/src/linux/Rules.make:267: target `8390.o' given more than once in the same rule. /usr/src/linux/Rules.make:267: target `8390.o' given more than once in the same rule. /usr/src/linux/Rules.make:267: target `8390.o' given more than once in the same rule. /usr/src/linux/Rules.make:267: target `8390.o' given more than once in the same rule. ...
It happens in drivers/net/, drivers/sound/, and (not fixed, irport.o) in drivers/net/irda/.
It does not concern module compilation as the object files are not linked together then.
Any comments ?
Regards Andrzej
diff -u --recursive linux-2.4test4/drivers/net/Makefile linux-moj/drivers/net/Makefile --- linux-2.4test4/drivers/net/Makefile Wed Jul 12 20:20:29 2000 +++ linux-moj/drivers/net/Makefile Mon Jul 17 23:46:17 2000 @@ -29,6 +29,8 @@ export-objs := 8390.o arlan.o aironet4500_core.o aironet4500_card.o ppp_async.o \ ppp_generic.o slhc.o pppox.o +list-common := 7990.o 8390.o slhc.o aironet4500_core.o + ifeq ($(CONFIG_PCMCIA),y) SUB_DIRS += pcmcia MOD_IN_SUB_DIRS += pcmcia @@ -279,6 +281,10 @@ # HIPPI adapters # +# Remove duplicates + +common-y := $(filter $(obj-y), $(list-common)) +obj-y := $(filter-out $(common-y), $(obj-y)) $(common-y) # Extract lists of the multi-part drivers. # The 'int-*' lists are the intermediate files used to build the multi's. diff -u --recursive linux-2.4test4/drivers/sound/Makefile linux-moj/drivers/sound/Makefile --- linux-2.4test4/drivers/sound/Makefile Fri Jul 14 21:25:48 2000 +++ linux-moj/drivers/sound/Makefile Mon Jul 17 23:54:06 2000 @@ -20,7 +20,7 @@ sound_core.o sound_syms.o uart401.o \ nm256_audio.o ac97.o ac97_codec.o - +list-common := ad1848.o mpu401.o uart401.o sb_lib.o opl3.o ac97_codec.o # Object file lists. @@ -122,6 +122,11 @@ vidc_mod-objs := vidc.o vidc_fill.o wavefront-objs := wavfront.o wf_midi.o yss225.o + +# Remove duplicates + +common-y := $(filter $(obj-y), $(list-common)) +obj-y := $(filter-out $(common-y), $(obj-y)) $(common-y) # Extract lists of the multi-part drivers. # The 'int-*' lists are the intermediate files used to build the multi's.
-- ======================================================================= Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl tel. (0-58) 347 14 61 Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej - 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/
| |