From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwYKM-0004bU-HT for qemu-devel@nongnu.org; Mon, 16 Jun 2014 10:56:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwYKE-0002NL-97 for qemu-devel@nongnu.org; Mon, 16 Jun 2014 10:56:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwYKD-0002NA-WE for qemu-devel@nongnu.org; Mon, 16 Jun 2014 10:55:58 -0400 Date: Mon, 16 Jun 2014 22:56:11 +0800 From: Fam Zheng Message-ID: <20140616145611.GB2683@T430.redhat.com> References: <1402929805-16836-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1402929805-16836-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] rules.mak: remove $(sort) from extract-libs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, sbruno@ignoranthack.me, qemu-devel@nongnu.org On Mon, 06/16 16:43, Paolo Bonzini wrote: > Duplicate removal was added to extract-libs in order to avoid including > the same library multiple times into the linking command line; this could > potentially happen when using "foo.mo-libs" (which adds the library to > all components, causing it to appear N times if the module is composed > of N objects). However, sorting and removing duplicates causes problems > with static linking, and also with space-separated linker options as > found in some Mac OS X packaging systems. Furthermore, the "optimization" > is really a non-problem since we do not expect .mo modules to be composed > of many files. > > Reported-by: Sean Bruno > Tested-by: Sean Bruno > Signed-off-by: Paolo Bonzini > --- > Peter, can you please apply this directly as it fixes the > build and there are no other pending patches? > --- > rules.mak | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/rules.mak b/rules.mak > index dde8e00..945484e 100644 > --- a/rules.mak > +++ b/rules.mak > @@ -22,7 +22,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d > # Same as -I$(SRC_PATH) -I., but for the nested source/object directories > QEMU_INCLUDES += -I$( > -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs)))) > +extract-libs = $(strip $(foreach o,$1,$($o-libs))) > expand-objs = $(strip $(sort $(filter %.o,$1)) \ > $(foreach o,$(filter %.mo,$1),$($o-objs)) \ > $(filter-out %.o %.mo,$1)) I was wondering about the $(sort), now this matches what I proposed in http://lists.nongnu.org/archive/html/qemu-devel/2014-06/msg02351.html Reviewed-by: Fam Zheng