fix link error with both megaraid drivers
PATCH 1/1 fix link error with both megaraid drivers
Hi Marcelo,
the issue described below is still present in -pre9.
cu
Adrian
----- Forwarded message from Adrian Bunk <[email protected]> -----
Date: Thu, 23 Oct 2003 16:07:43 +0200
From: Adrian Bunk <[email protected]>
To: Marcelo Tosatti <[email protected]>,
Matt Domsch <[email protected]>, [email protected]
Cc: [email protected]
Subject: [patch] 2.4.23-pre8: link error with both megaraid drivers
Quoted 7 lines · Marcelo Tosatti
...
Summary of changes from v2.4.23-pre7 to v2.4.23-pre8
============================================
...
Matt Domsch:
o Fix megaraid2 compilation problems
...
Trying to compile both megaraid drivers statically into the kernel still fails with the following link error:
<-- snip -->
...
ld -m elf_i386 -r -o scsidrv.o scsi_mod.o sim710.o advansys.o pci2000.o
pci2220i.o psi240i.o BusLogic.o dpt_i2o.o u14-34f.o ultrastor.o aha152x.o
aha1542.o aha1740.o aacraid/aacraid.o aic7xxx/aic7xxx.o aic7xxx/aic79xx.o ips.o
fd_mcs.o fdomain.o in2000.o g_NCR5380.o NCR53c406a.o NCR_D700.o 53c700.o sym53c416.o qlogicfas.o qlogicisp.o qlogicfc.o qla1280.o pas16.o seagate.o t128.o dmx3191d.o
dtc.o 53c7,8xx.o sym53c8xx_2/sym53c8xx_2.o eata_dma.o eata_pio.o wd7000.o
NCR53C9x.o mca_53c9x.o ibmmca.o eata.o tmscsim.o AM53C974.o megaraid.o megaraid2.o atp870u.o gdth.o initio.o a100u2w.o ide-scsi.o 3w-xxxx.o ppa.o imm.o scsi_debug.o
cpqfc.o nsp32.o st.o osst.o sd_mod.o sr_mod.o sg.omegaraid2.o(.text+0x1ff0): In function `megaraid_info':
: multiple definition of `megaraid_info'megaraid.o(.text+0x29f8): first defined here
ld: Warning: size of symbol `megaraid_info' changed from 67 in
megaraid.o to 57 in megaraid2.o
make[3]: *** [scsidrv.o] Error 1
make[3]: Leaving directory `/home/bunk/linux/kernel-2.4/linux/kernel-2.4/linux-2.4.23-pre8-full/drivers/scsi'
<-- snip -->
The patch below fixes this issue by disalllowing the static inclusion of both drivers at the same time.
cu
Adrian
drivers/scsi/Config.in renamed from drivers/scsi/Config.in.old +6 -1
@@ -67,7 +67,12 @@ dep_tristate 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 $CONFIG_SCSI dep_tristate 'AM53/79C974 PCI SCSI support' CONFIG_SCSI_AM53C974 $CONFIG_SCSI $CONFIG_PCI dep_tristate 'AMI MegaRAID support' CONFIG_SCSI_MEGARAID $CONFIG_SCSI -dep_tristate 'AMI MegaRAID2 support' CONFIG_SCSI_MEGARAID2 $CONFIG_SCSI +if [ "$CONFIG_SCSI_MEGARAID" != "y" ]; then + define_tristate CONFIG_SCSI_MEGARAID2_DEP $CONFIG_SCSI +else + define_tristate CONFIG_SCSI_MEGARAID2_DEP m $CONFIG_SCSI +fi +dep_tristate 'AMI MegaRAID2 support' CONFIG_SCSI_MEGARAID2 $CONFIG_SCSI_MEGARAID2_DEP dep_tristate 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC $CONFIG_SCSI if [ "$CONFIG_SCSI_BUSLOGIC" != "n" ]; then
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----
Just dont compile both drivers at the same time?
Quoted 3 lines · Adrian Bunk
Hi Marcelo,
the issue described below is still present in -pre9.
Quoted 2 lines · Marcelo Tosatti
Just dont compile both drivers at the same time?
IMHO, ideally every valid .config you get through a "make *config" should compile.
Compile errors with valid .config's give a wrong impression of the stability of the Linux kernel.
I know it's impossible to make configuring the kernel 100% idiot proof, but when it's easy to avoid a pitfall many users might observe I think it really should be expressed in the Config.in files.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed