qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] Avoiding --whole-archive


From: Andreas Färber
Subject: Re: [Qemu-devel] [RFC] Avoiding --whole-archive
Date: Sun, 29 Nov 2009 19:53:07 +0100


Am 29.11.2009 um 15:17 schrieb Andreas Färber:

Am 14.06.2009 um 00:15 schrieb Andreas Färber:

Am 31.05.2009 um 12:15 schrieb Anthony Liguori:

Starting with this commit, qemu-system-sparc segfaults immediately; you later fixed it in c833ab7351f2ebac46740380a81e34482e208dcc (Fix segv when passing an unknown protocol) to no longer segfault, now
printing "qemu: could not read disk image /path/to/image".

I would assume -z,allextract isn't doing what we would like it to do on
OpenSolaris.

This problem is still around after Juan's Makefile reorganizations.

Before, I had provided two alternative patches:

* The first version wrote the list of libqemu_common.a's and $ (HWLIB)'s object files into a text file from Makefile[.hw] that was later read in Makefile.target.

* The second version was using dedicated Makefile[.hw] targets for printing the object files to stdout for use by Makefile.target, avoiding the need to write an intermediate file.

Avi had preferred a variation of the first version for reduced complexity.

Other ideas that crossed my mind were:
* using GNU ld directly instead of gcc for linking (broken by -Wl and some other LDFLAGS) * extracting the .a archive to a temporary directory from the target Makefile and obtaining the names by `ls *.o` (similar to libtool)

The attached patches showcase the latter. $(ARLIBS) are extracted to .tmpobjs/<libname>/ and their *.o objects are linked individually. Filtering to *.o was necessary because on OSX archives contain non-.o files that otherwise break compilation. The extraction showed that libqemu_common.a contains two nbd.o files, one from ./nbd.c and one from ./block/nbd.c. The second patch thus renames block/nbd.o to distinguish the two and to avoid linker errors. A more permanent solution would be to rename the nbd.c file. With those two patches once again QEMU works on both OpenSolaris and Mac OS X, for in-tree and out-of-tree builds.

Andreas

Attachment: arlibs-extract.diff
Description: Binary data

Attachment: arlibs-nbd.diff
Description: Binary data


reply via email to

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