From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKOII-0000pl-K1 for qemu-devel@nongnu.org; Thu, 21 Aug 2014 05:04:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKOI5-00027W-Ab for qemu-devel@nongnu.org; Thu, 21 Aug 2014 05:04:30 -0400 Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]:36971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKOI5-00027K-42 for qemu-devel@nongnu.org; Thu, 21 Aug 2014 05:04:17 -0400 Received: by mail-we0-f180.google.com with SMTP id w61so8986433wes.25 for ; Thu, 21 Aug 2014 02:04:16 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53F5B60B.9000901@redhat.com> Date: Thu, 21 Aug 2014 11:04:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1408528887-22200-1-git-send-email-famz@redhat.com> <1408528887-22200-6-git-send-email-famz@redhat.com> <53F4A2B3.3010000@redhat.com> <20140821030249.GJ2943@T430.nay.redhat.com> In-Reply-To: <20140821030249.GJ2943@T430.nay.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Fam Zheng Cc: kwolf@redhat.com, mjt@tls.msk.ru, qemu-devel@nongnu.org, stefanha@redhat.com Il 21/08/2014 05:02, Fam Zheng ha scritto: > 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?) Well, there's comma=, and $(comma). Or Wl=-Wl, of course. But neither is particularly nice. > Your LD_REL looks cleaner though. Okay, let's go with it then. Paolo