Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSaym-000880-0I for qemu-devel@nongnu.org; Wed, 06 Jan 2010 13:51:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSayh-0007zP-Db for qemu-devel@nongnu.org; Wed, 06 Jan 2010 13:51:35 -0500 Received: from [199.232.76.173] (port=53184 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSayh-0007zC-83 for qemu-devel@nongnu.org; Wed, 06 Jan 2010 13:51:31 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:45716) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSayg-0004XR-Jp for qemu-devel@nongnu.org; Wed, 06 Jan 2010 13:51:30 -0500 Message-Id: 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) Subject: Re: [Qemu-devel] [PATCH v2] Drop --whole-archive and static libraries Date: Wed, 6 Jan 2010 19:51:05 +0100 References: <1262268274-1043-1-git-send-email-andreas.faerber@web.de> Sender: andreas.faerber@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: "Kirill A. Shutemov" , Paolo Bonzini , QEMU Developers , Palle Lyckegaard , Juan Quintela Am 04.01.2010 um 21:47 schrieb Blue Swirl: > On Sun, Jan 3, 2010 at 12:31 PM, Blue Swirl =20 > wrote: >> 2009/12/31 Andreas F=E4rber : >>> From: Andreas F=E4rber >>> >>> Juan has contributed a cool Makefile infrastructure that enables =20 >>> us to drop >>> static libraries completely: >>> >>> Move shared obj-y definitions to Makefile.objs, prefixed =20 >>> {common-,hw-,user-}, >>> and link those object files directly into the executables. >>> >>> Replace HWLIB by HWDIR, specifying only the directory. >>> >>> Drop --whole-archive and ARLIBS in Makefiles and configure. >>> >>> Drop GENERATED_HEADERS dependency in rules.mak, since this =20 >>> rebuilds all >>> common objects after generating a target-specific header; add =20 >>> dependency >>> rules to Makefile and Makefile.target instead. >>> >>> v2: >>> - Don't try to include /config.mak for user emulators >>> - Changes to user object paths ("Quickfix for libuser.a drop") =20 >>> were obsoleted >>> by "user_only: compile everything with -fpie" (Kirill A. Shutemov) >> >> Breaks build: >> CC i386-softmmu/i386-dis.o >> make[1]: *** No rule to make target `/loader.o', needed by `qemu'. =20= >> Stop. > > I found out that completely removing the object directory and > recreating it from scratch helps. This sucks bisectability-wise, is > there any way to avoid it? Sounds as if configure was not re-run and thus $(HWDIR) not set in =20 config-target.mak. No idea why, more likely a general issue. Do you have a way to reproduce? What about `make clean` or `make =20 distclean`? > There is still one problem, tools need config-host.h but the > dependencies are not correct: > CC qemu-nbd.o > In file included from /src/qemu/qemu-nbd.c:19: > /src/qemu/qemu-common.h:32:25: error: config-host.h: No such file or =20= > directory Fix coming up. Basically, $(GENERATED_HEADERS) were previously used on =20= _all_ object files via rules.mak. That does not work when referencing =20= objects from another Makefile, so the modelling needs to be done =20 explicitly. Andreas=