IDE fix -- L_TARGET issues

From: Pavel Machek (pavel@suse.cz)
Date: Thu May 25 2000 - 18:02:59 EST


Hi!

ide-cs can not work when compiled into kernel: __initcall() it relies
upon is not compatible with L_TARGET. Here's fix that makes ide-cs
work. Please apply.
                                                        Pavel
PS: Makefile should be rewritten to drivers/usb/Makefile-style, and
ide.a should be renamed to ide.o. If you'll apply patch, I'll do it.

Here's list of directories where initcall potentially does not
work. They probably should be converted to O_TARGETs. (Ugh. __initcall
will not work in whole drivers/block!)

./lib/Makefile:L_TARGET := lib.a
./net/Makefile:L_TARGET := network.a
./drivers/net/wan/Makefile:L_TARGET := wan.a
./drivers/net/arcnet/Makefile:L_TARGET := arcnet.a
./drivers/net/tokenring/Makefile:L_TARGET := tr.a
./drivers/net/irda/Makefile:L_TARGET := irda_drivers.a
./drivers/net/appletalk/Makefile:L_TARGET := appletalk.a
./drivers/net/fc/Makefile:L_TARGET := fc.a
./drivers/block/Makefile:L_TARGET := block.a
./drivers/block/paride/Makefile:L_TARGET := paride.a
./drivers/scsi/Makefile:L_TARGET := scsi.a
./drivers/pci/Makefile:L_TARGET := pci.a
./drivers/cdrom/Makefile:L_TARGET := cdrom.a
./drivers/isdn/Makefile:L_TARGET :=
./drivers/isdn/Makefile: L_TARGET := isdn.a
./drivers/isdn/avmb1/Makefile:L_OBJS := # used as component of an L_TARGET
./drivers/isdn/avmb1/Makefile:LX_OBJS := # used as component of an L_TARGET
./drivers/isdn/avmb1/Makefile:L_TARGET := # used for .a targets (from L and LX objects)
./drivers/isdn/hisax/Makefile:L_TARGET :=
./drivers/isdn/divert/Makefile:L_TARGET :=
./drivers/isdn/hysdn/Makefile:L_TARGET :=
./drivers/sbus/Makefile:L_TARGET := sbus.a
./drivers/macintosh/Makefile:L_TARGET := macintosh.a
./drivers/sgi/Makefile:L_TARGET := sgi.a
./drivers/fc4/Makefile:L_TARGET := fc4.a
./drivers/acorn/block/Makefile:L_TARGET := acorn-block.a
./drivers/acorn/net/Makefile:L_TARGET := acorn-net.a
./drivers/acorn/scsi/Makefile:L_TARGET := acorn-scsi.a
./drivers/nubus/Makefile:L_TARGET := nubus.a
./drivers/dio/Makefile:L_TARGET := dio.a
./drivers/zorro/Makefile:L_TARGET := zorro.a
./drivers/i2o/Makefile:L_TARGET := i2o.a
./drivers/tc/Makefile:L_TARGET := tc.a
./drivers/parport/Makefile:L_TARGET := parport.a
./drivers/i2c/Makefile:L_TARGET := i2c.a
./drivers/telephony/Makefile:L_TARGET := telephony.a
./drivers/ieee1394/Makefile:L_TARGET := ieee1394.a
./arch/i386/math-emu/Makefile:L_TARGET := math.a
./arch/i386/lib/Makefile:L_TARGET = lib.a
./arch/alpha/kernel/Makefile:L_TARGET := rest.a
./arch/alpha/kernel/Makefile:O_OBJS += $(L_TARGET)
./arch/mips/lib/Makefile:L_TARGET = lib.a
./arch/m68k/lib/Makefile:L_TARGET = lib.a
./arch/arm/lib/Makefile:L_TARGET := lib.a
./arch/sh/lib/Makefile:L_TARGET = lib.a
./arch/mips64/arc/Makefile:L_TARGET = arclib.a
./arch/mips64/lib/Makefile:L_TARGET = lib.a
./arch/mips64/sgi-ip22/Makefile:L_TARGET = ip22.a
./arch/mips64/sgi-ip27/Makefile:L_TARGET = ip27.a
./arch/s390/lib/Makefile:L_TARGET = lib.a

--- clean/drivers/ide/Makefile Thu Apr 27 10:05:33 2000
+++ linux/drivers/ide/Makefile Fri May 26 00:48:47 2000
@@ -18,11 +18,11 @@
 MOD_SUB_DIRS := $(SUB_DIRS)
 ALL_SUB_DIRS := $(SUB_DIRS)
 
-L_TARGET := ide.a
-L_OBJS := ide-geometry.o
+O_TARGET := ide.a
+O_OBJS := ide-geometry.o
 M_OBJS :=
 MOD_LIST_NAME := IDE_MODULES
-LX_OBJS :=
+OX_OBJS :=
 MX_OBJS :=
 
 ifeq ($(CONFIG_BLK_DEV_AEC62XX),y)
@@ -78,7 +78,7 @@
 endif
 
 ifeq ($(CONFIG_BLK_DEV_HD),y)
-L_OBJS += hd.o
+O_OBJS += hd.o
 endif
 
 ifeq ($(CONFIG_BLK_DEV_HPT34X),y)
@@ -178,8 +178,8 @@
 ###Collect
 
 ifeq ($(CONFIG_BLK_DEV_IDE),y)
- LX_OBJS += ide.o ide-features.o
- L_OBJS += ide-probe.o $(IDE_OBJS)
+ OX_OBJS += ide.o ide-features.o
+ O_OBJS += ide-probe.o $(IDE_OBJS)
 else
   ifeq ($(CONFIG_BLK_DEV_IDE),m)
   MIX_OBJS += ide.o ide-features.o $(IDE_OBJS)
@@ -190,7 +190,7 @@
 ############
 
 ifeq ($(CONFIG_BLK_DEV_IDECS),y)
-L_OBJS += ide-cs.o
+O_OBJS += ide-cs.o
 else
   ifeq ($(CONFIG_BLK_DEV_IDECS),m)
   M_OBJS += ide-cs.o
@@ -198,7 +198,7 @@
 endif
 
 ifeq ($(CONFIG_BLK_DEV_IDEDISK),y)
-L_OBJS += ide-disk.o
+O_OBJS += ide-disk.o
 else
   ifeq ($(CONFIG_BLK_DEV_IDEDISK),m)
   M_OBJS += ide-disk.o
@@ -206,7 +206,7 @@
 endif
 
 ifeq ($(CONFIG_BLK_DEV_IDECD),y)
-L_OBJS += ide-cd.o
+O_OBJS += ide-cd.o
 else
   ifeq ($(CONFIG_BLK_DEV_IDECD),m)
   M_OBJS += ide-cd.o
@@ -214,7 +214,7 @@
 endif
 
 ifeq ($(CONFIG_BLK_DEV_IDETAPE),y)
-L_OBJS += ide-tape.o
+O_OBJS += ide-tape.o
 else
   ifeq ($(CONFIG_BLK_DEV_IDETAPE),m)
   M_OBJS += ide-tape.o
@@ -222,7 +222,7 @@
 endif
 
 ifeq ($(CONFIG_BLK_DEV_IDEFLOPPY),y)
-L_OBJS += ide-floppy.o
+O_OBJS += ide-floppy.o
 else
   ifeq ($(CONFIG_BLK_DEV_IDEFLOPPY),m)
   M_OBJS += ide-floppy.o

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org

- 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 : Wed May 31 2000 - 21:00:16 EST