From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtbCL-0007eK-Sm for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:19:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtbCH-00010o-R2 for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:19:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtbCH-00010Y-Iv for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:19:01 -0400 Message-ID: <51D15792.7010900@redhat.com> Date: Mon, 01 Jul 2013 12:18:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1371576844-28743-1-git-send-email-mjt@msgid.tls.msk.ru> <51C1E335.9010304@redhat.com> <51D04D6E.5040506@msgid.tls.msk.ru> <51D1553A.8040204@redhat.com> <51D1558D.8070805@msgid.tls.msk.ru> In-Reply-To: <51D1558D.8070805@msgid.tls.msk.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 0/4] per-object libraries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: qemu-devel@nongnu.org Il 01/07/2013 12:10, Michael Tokarev ha scritto: >>>> >>> Perhaps we can instead use something like >>>>> >>>> >>>>> >>>> common.o: $(patsubst %,../%, $(common-obj-y)) >>>>> >>>> $(LD) -r -o $@ $^ >>>>> >>>> >>>>> >>>> and then link common.o into the QEMU target. Libtool can also be used >>>>> >>>> to abstract "ld -r". Making libtool mandatory wouldn't be a problem IMO >>>>> >>>> (we'd need it anyway for modules) as long as you do not need libtool to >>>>> >>>> start QEMU or gdb from the build directory. >>> >> I think this will mean that whole common.o will have to be linked >>> >> into each executable which uses it, even if some executables are >>> >> only using just one function from whole lot of .o files. >> > >> > This would be a different common.o for each directory. > Like util/common.o which requires -lrt and -lutil even if a given > app does not use openpty() or timer_create() ? No, for each target directory. Paolo