Skip to contentSkip to conversation

Compile fdc, escc and SCSI controllers only once

Qemu-devel Jan Kiszka 3 participants 5 messages May 21, 2009 – May 22, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Jan Kiszka

author
#1 lore raw
Quoted 9 lines · Anthony Liguori

From: Blue Swirl <[email protected]>

Makefile.hw +0 -0
index 87675fd..6da37a9 100644

Makefile.hw OBJS+= fw_cfg.o · line 27

Quoted 8 lines
Makefile.hw +4 -1
@@ -21,7 +21,13 @@ OBJS+= fw_cfg.o
 OBJS+= watchdog.o
 OBJS+= nand.o ecc.o
 
-OBJS+= m48t59.o
+OBJS+= m48t59.o escc.o
+
+# PC style devices
+OBJS+= fdc.o 

This breaks archs that do not come with DMA_* implementations. At least ARM no longer links.

LINK arm-softmmu/qemu-system-arm
../libhw64/libqemuhw64.a(fdc.o): In function `fdctrl_stop_transfer':
/data/qemu/hw/fdc.c:1086: undefined reference to `DMA_release_DREQ' [...]

Jan

#2 lore raw
Quoted 22 lines · Jan Kiszka
Quoted 9 lines · Anthony Liguori

From: Blue Swirl <[email protected]>

Makefile.hw +0 -0
index 87675fd..6da37a9 100644

Makefile.hw OBJS+= fw_cfg.o · line 27

Quoted 8 lines
Makefile.hw +4 -1
@@ -21,7 +21,13 @@ OBJS+= fw_cfg.o
 OBJS+= watchdog.o
 OBJS+= nand.o ecc.o
 
-OBJS+= m48t59.o
+OBJS+= m48t59.o escc.o
+
+# PC style devices
+OBJS+= fdc.o

This breaks archs that do not come with DMA_* implementations. At least ARM no longer links.

Quoted 4 lines

LINK arm-softmmu/qemu-system-arm
../libhw64/libqemuhw64.a(fdc.o): In function `fdctrl_stop_transfer':
/data/qemu/hw/fdc.c:1086: undefined reference to `DMA_release_DREQ' [...]

Yes, I forgot about the whole-archive hack. I've disabled it for hwlib, so now arm-softmmu links.

The whole-archive flag should be used only when needed, otherwise it will pull in a lot of unnecessary stuff like above.

#3 lore raw
Quoted 11 lines
Quoted 8 lines

This breaks archs that do not come with DMA_* implementations. At least ARM no longer links.

LINK arm-softmmu/qemu-system-arm
../libhw64/libqemuhw64.a(fdc.o): In function `fdctrl_stop_transfer':
/data/qemu/hw/fdc.c:1086: undefined reference to `DMA_release_DREQ' [...]

Yes, I forgot about the whole-archive hack. I've disabled it for hwlib, so now arm-softmmu links.

This is completely wrong. The reason we use whole-archive is so that device constructors are run. Most machines are broken after your change.

Paul

#4 lore raw
Quoted 9 lines · Paul Brook
Quoted 9 lines
Quoted 8 lines

This breaks archs that do not come with DMA_* implementations. At least ARM no longer links.

LINK arm-softmmu/qemu-system-arm
../libhw64/libqemuhw64.a(fdc.o): In function `fdctrl_stop_transfer':
/data/qemu/hw/fdc.c:1086: undefined reference to `DMA_release_DREQ' [...]

Quoted 6 lines
Quoted 2 lines

Yes, I forgot about the whole-archive hack. I've disabled it for hwlib, so now arm-softmmu links.

This is completely wrong. The reason we use whole-archive is so that device
constructors are run. Most machines are broken after your change.

Did you test? I don't see any breakage, qemu-img --help shows all block formats and qemu-system-arm -M '?' lists all machines.

Because whole-archive is still used for libqemu_common.a, all devices in that archive are linked in (whether they are used or not!), so the constructors work.

#5 lore raw
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

Yes, I forgot about the whole-archive hack. I've disabled it for hwlib, so now arm-softmmu links.

This is completely wrong. The reason we use whole-archive is so that device constructors are run. Most machines are broken after your change.

Quoted 6 lines

Did you test? I don't see any breakage, qemu-img --help shows all block formats and qemu-system-arm -M '?' lists all machines.

Because whole-archive is still used for libqemu_common.a, all devices in that archive are linked in (whether they are used or not!), so the constructors work.

The machines themselves are there, but many of the devices they use (e.g. the pci scsi emulation) are not.

Paul