On Thu, 06/05 17:11, Peter Maydell wrote:
> On 5 June 2014 14:38, Rainer Müller <rai...@codingfarm.de> wrote:
> > On 2014-03-14 13:29, Paolo Bonzini wrote:
> >> Il 13/03/2014 19:48, Peter Maydell ha scritto:
> >>> Yep, here we are:
> >>> LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names
> >>> -arch x86_64
> >>> CURL_LIBS=-L/opt/local/lib -lcurl
> >>>
> >>> rules.mak is incorrectly reordering the contents of
> >>> these and generating a non-working mess.
> >>
> >> Fam,
> >>
> >> is the $(sort) actually necessary in extract-libs?  It is required in
> >> expand-objs, but duplicate -l options should be harmless.
> >
> > The current master still contains this bug and sorts "-arch x86_64"
> > separately. I doubt the $(sort) does anything useful.
> 
> Ugh. This was supposed to be fixed by commit 6295b98d7b767c.
> Fam, can you re-check your fix, please?
> 

I don't understand that fix now, looks like it was moved onto a wrong list.

Rainer, does this below patch work for you? (we can't duplicate object, so sort
is required there).

Fam

---

diff --git a/rules.mak b/rules.mak
index b12d312..b895859 100644
--- a/rules.mak
+++ b/rules.mak
@@ -23,8 +23,8 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
 QEMU_INCLUDES += -I$(<D) -I$(@D)

 maybe-add = $(filter-out $1, $2) $1
-extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \
-                  $(foreach o,$(call expand-objs,$1),$($o-libs)))
+extract-libs = $(strip $(foreach o,$1,$($o-libs)) \
+                  $(sort $(foreach o,$(call expand-objs,$1),$($o-libs))))
 expand-objs = $(strip $(sort $(filter %.o,$1)) \
                   $(foreach o,$(filter %.mo,$1),$($o-objs)) \
                   $(filter-out %.o %.mo,$1))


Reply via email to