diff options
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r-- | scripts/Makefile.modpost | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index cfc004e04417..2d20640854b7 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -58,6 +58,9 @@ modules := $(patsubst %.o,%.ko, $(wildcard $(__modules:.ko=.o))) | |||
58 | # Stop after building .o files if NOFINAL is set. Makes compile tests quicker | 58 | # Stop after building .o files if NOFINAL is set. Makes compile tests quicker |
59 | _modpost: $(if $(KBUILD_MODPOST_NOFINAL), $(modules:.ko:.o),$(modules)) | 59 | _modpost: $(if $(KBUILD_MODPOST_NOFINAL), $(modules:.ko:.o),$(modules)) |
60 | 60 | ||
61 | ifneq ($(KBUILD_BUILDHOST),$(ARCH)) | ||
62 | cross_build := 1 | ||
63 | endif | ||
61 | 64 | ||
62 | # Step 2), invoke modpost | 65 | # Step 2), invoke modpost |
63 | # Includes step 3,4 | 66 | # Includes step 3,4 |
@@ -70,7 +73,8 @@ modpost = scripts/mod/modpost \ | |||
70 | $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ | 73 | $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ |
71 | $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \ | 74 | $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \ |
72 | $(if $(CONFIG_MARKERS),-M $(markersfile)) \ | 75 | $(if $(CONFIG_MARKERS),-M $(markersfile)) \ |
73 | $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) | 76 | $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \ |
77 | $(if $(cross_build),-c) | ||
74 | 78 | ||
75 | quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules | 79 | quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules |
76 | cmd_modpost = $(modpost) -s | 80 | cmd_modpost = $(modpost) -s |