summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--scripts/Makefile.build2
2 files changed, 2 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 22a4afd51285..498095b3825e 100644
--- a/Makefile
+++ b/Makefile
@@ -1430,14 +1430,11 @@ endif
# Build modules
#
-# A module can be listed more than once in obj-m resulting in
-# duplicate lines in modules.order files. Those are removed
-# using awk while concatenating to the final file.
PHONY += modules
modules: $(if $(KBUILD_BUILTIN),vmlinux) modules_check modules_prepare
-cmd_modules_order = $(AWK) '!x[$$0]++' $(real-prereqs) > $@
+cmd_modules_order = cat $(real-prereqs) > $@
modules.order: $(subdir-modorder) FORCE
$(call if_changed,modules_order)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 784f46d41959..0df488d0bbb0 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -374,7 +374,7 @@ $(obj)/built-in.a: $(real-obj-y) FORCE
cmd_modules_order = { $(foreach m, $(real-prereqs), \
$(if $(filter %/modules.order, $m), cat $m, echo $(patsubst %.o,%.ko,$m));) :; } \
- | $(AWK) '!x[$$0]++' - > $@
+ > $@
$(obj)/modules.order: $(obj-m) FORCE
$(call if_changed,modules_order)