From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW3ry-0001pD-VD for qemu-devel@nongnu.org; Wed, 17 Feb 2016 10:18:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aW3ru-0005YO-UI for qemu-devel@nongnu.org; Wed, 17 Feb 2016 10:18:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW3ru-0005YK-Ok for qemu-devel@nongnu.org; Wed, 17 Feb 2016 10:18:18 -0500 Date: Wed, 17 Feb 2016 17:18:15 +0200 From: "Michael S. Tsirkin" Message-ID: <20160217171657-mutt-send-email-mst@redhat.com> References: <1455722040-31820-1-git-send-email-mst@redhat.com> <56C48ECF.8030903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56C48ECF.8030903@redhat.com> Subject: Re: [Qemu-devel] [PATCH] rules: filter out irrelevant files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Michael Tokarev , Victor Kaplansky , Fam Zheng , qemu-devel@nongnu.org On Wed, Feb 17, 2016 at 04:16:31PM +0100, Paolo Bonzini wrote: > > > On 17/02/2016 16:15, Michael S. Tsirkin wrote: > > It's often handy to make executables depend on each other, e.g. make a > > test depend on a helper. This doesn't work now, as linker > > will attempt to use the helper as an object. > > To fix, filter only relevant file types before linking an executable. > > Can you provide an example of what you're trying to do? > > Paolo Write a test that uses vhost-user to talk to a background process helper (e.g. vhost-user-bridge). This has to depend on the helper being built. > > Signed-off-by: Michael S. Tsirkin > > --- > > rules.mak | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/rules.mak b/rules.mak > > index fc5ee41..d1ff311 100644 > > --- a/rules.mak > > +++ b/rules.mak > > @@ -102,7 +102,7 @@ LD_REL := $(CC) -nostdlib -Wl,-r > > modules: > > > > %$(EXESUF): %.o > > - $(call LINK,$^) > > + $(call LINK,$(filter %.o %.a %.mo, $^)) > > > > %.a: > > $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@") > >