qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 3/3] Workaround --whole-archive on Solaris


From: Andreas Färber
Subject: Re: [Qemu-devel] Re: [PATCH 3/3] Workaround --whole-archive on Solaris
Date: Sun, 13 Dec 2009 09:16:36 +0100


Am 13.12.2009 um 00:07 schrieb Andreas Färber:


Am 12.12.2009 um 21:57 schrieb Juan Quintela:

Andreas Färber <address@hidden> wrote:
From: Andreas Färber <address@hidden>

On OpenSolaris, neither --whole-archive nor -z allextract
appear to work as expected, causing runtime errors. For example:

qemu: could not open disk image [...]

Fix this by extracting archives and linking their object files individually.

libqemu_common.a contains object files from different subdirectories,
leading to name clashes, e.g., nbd.o vs. block/nbd.o.

Archive a renamed copy of the affected files instead, this avoids
duplicating %.c -> %.o compilation rules. Two dashes are used for the copy
to avoid name clashes between, e.g., block-qcow.c and block/qcow.c.

Contain this behavior to Solaris to avoid speed regressions on Linux.

I just wonder.  If we are:
a- linking all archives (that is the whole point)
b- some OS's need to unpack the library due to broken ld (or whatever)

why don't we do the right thing?

just put the objects in some directory, and not create the library in
the 1st place? It is a static library, not a dynamic one, and we want
everything in the 1st place.

The trick is knowing which "everything" we want today!

I think that this is a saner approach that having two ways (well
currently several ways) of linking all archives.

What do you people think?

Juan, being our Makefile inventor, what about
(iv) moving the assembling of some of the obj-y variables to a shared file included by all three Makefiles?

I've tested some softmmus on OpenSolaris/amd64 and it appears to work! Don't have a test environment for all the user emulators though.

Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]