From: Domenico Andreoli <[email-masked]>

This to allow multiple machine/platform options to select the same
mach-/plat- subdir without triggering linking errors.

Ex. Makefile:

machine-$(CONFIG_ARCH_BCM)        += bcm
machine-$(CONFIG_ARCH_BCM4760)    += bcm

Taken from Russel's email:
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/255431

Cc: [email-masked]
Signed-off-by: Russell King <[email-masked]>
Signed-off-by: Domenico Andreoli <[email-masked]>
---
 arch/arm/Makefile |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/arch/arm/Makefile
===================================================================
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -238,8 +238,8 @@ ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y)
 MACHINE  :=
 endif
 
-machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
-platdirs := $(patsubst %,arch/arm/plat-%/,$(plat-y))
+machdirs := $(patsubst %,arch/arm/mach-%/,$(sort $(machine-y)))
+platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y)))
 
 ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y)
 ifeq ($(KBUILD_SRC),)