From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKIe9-0007Q8-5g for qemu-devel@nongnu.org; Wed, 20 Aug 2014 23:02:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKIe3-0005oz-1V for qemu-devel@nongnu.org; Wed, 20 Aug 2014 23:02:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKIe2-0005ou-Qi for qemu-devel@nongnu.org; Wed, 20 Aug 2014 23:02:34 -0400 Date: Thu, 21 Aug 2014 11:02:49 +0800 From: Fam Zheng Message-ID: <20140821030249.GJ2943@T430.nay.redhat.com> References: <1408528887-22200-1-git-send-email-famz@redhat.com> <1408528887-22200-6-git-send-email-famz@redhat.com> <53F4A2B3.3010000@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53F4A2B3.3010000@redhat.com> Subject: Re: [Qemu-devel] [PATCH 5/6] build-sys: Change libqemuutil.a to qemuutil.o and link whole object List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, mjt@tls.msk.ru, qemu-devel@nongnu.org, stefanha@redhat.com On Wed, 08/20 15:29, Paolo Bonzini wrote: > Il 20/08/2014 12:01, Fam Zheng ha scritto: > > + > > +qemuutil.o: CC_REL_FLAGS := -Wl,-r > > Why the target-specific rule? > > > +qemuutil.o: $(util-obj-y) > > + $(call quiet-command,$(CC) -nostdlib $(CC_REL_FLAGS) -o $@ $^," LD -r $(TARGET_DIR)$@") > > > > > I think either you have > > LD_REL := $(CC) -nostdlib -Wl,-r > > (as opposed to "LD_REL := $(LD) -r" for example) or you do not need to > put -Wl,-r in a separate variable. Because comma doesn't work in Makefile macro invocation, we need to wrap the flag in a variable. (Is there a way to escape it?) Your LD_REL looks cleaner though. Fam