From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utb3x-0000P1-U6 for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:10:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utb3w-0005pU-58 for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:10:25 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:42081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utb3v-0005p1-TM for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:10:24 -0400 Message-ID: <51D1558D.8070805@msgid.tls.msk.ru> Date: Mon, 01 Jul 2013 14:10:21 +0400 From: Michael Tokarev 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> In-Reply-To: <51D1553A.8040204@redhat.com> 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: Paolo Bonzini Cc: qemu-devel@nongnu.org 01.07.2013 14:08, Paolo Bonzini wrote: > Il 30/06/2013 17:23, 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() ? Thanks, /mjt