Don't sort the extracted options, sort the objects.

Reported-by: Christian Mahnke <cmah...@googlemail.com>
Signed-off-by: Fam Zheng <f...@redhat.com>
---
 rules.mak | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules.mak b/rules.mak
index 9dda9f7..5c454d8 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 $(sort $(foreach o,$1,$($o-libs))) \
+                  $(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))
-- 
1.9.0


Reply via email to