Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJb4O-0007PR-BN for qemu-devel@nongnu.org; Sat, 12 Dec 2009 18:08:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJb4K-0007O4-B9 for qemu-devel@nongnu.org; Sat, 12 Dec 2009 18:08:12 -0500 Received: from [199.232.76.173] (port=57503 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJb4K-0007Nw-7U for qemu-devel@nongnu.org; Sat, 12 Dec 2009 18:08:08 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:57597) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJb4J-0003Uu-I3 for qemu-devel@nongnu.org; Sat, 12 Dec 2009 18:08:07 -0500 Message-Id: <62024FDC-0214-49BF-BC69-14167AC4C034@web.de> From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 13 Dec 2009 00:07:42 +0100 References: <1260645057-19819-1-git-send-email-andreas.faerber@web.de> <1260645057-19819-2-git-send-email-andreas.faerber@web.de> <1260645057-19819-3-git-send-email-andreas.faerber@web.de> <1260645057-19819-4-git-send-email-andreas.faerber@web.de> Sender: andreas.faerber@web.de Subject: [Qemu-devel] Re: [PATCH 3/3] Workaround --whole-archive on Solaris List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: Avi Kivity , QEMU Developers , Palle Lyckegaard Am 12.12.2009 um 21:57 schrieb Juan Quintela: > Andreas F=E4rber wrote: >> From: Andreas F=E4rber >> >> 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 =20 >> 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 =20 >> 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? Maybe because, if we are honest, we have lengthy discussions about =20 sticking to ISO/ANSI/POSIX malloc behavior when it affects customers =20 on The OS, but silently ignore some "fringe" OS breaking after =20 choosing a convenient but non-standard GCC mechanism? ;) > 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? Certainly I would prefer having one shared linking mechanism. The three separate Makefiles (Makefile, Makefile.hw, Makefile.target) =20= that govern which objects are to be compiled pose the problem. In the end, we need some mechanism to get the right set of objects =20 into Makefile.target. Previous attempts were (i) writing object file paths to a file (me not satisfied), or (ii) printing them from within make (Avi objected), and now (iii) extracting them from archives (Juan objected for Linux). Juan, being our Makefile inventor, what about (iv) moving the assembling of some of the obj-y variables to a shared =20= file included by all three Makefiles? Would that work? If we had, e.g., common-obj-y and libhw{32,64}-obj-y =20= accessible in Makefile.target, we could use them for both dependency =20 modelling and linking. Regards, Andreas=