summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2016-04-25 11:55:08 -0400
committerMichal Marek <mmarek@suse.com>2016-04-26 04:26:28 -0400
commitba79d401f1aee52186ff09607e9405cfb805307d (patch)
tree119e8ee164c941a503428175fd99eec6cf89d1db /Makefile
parentb42841b7bb6286da56b4fa79835c27166b7e228b (diff)
kbuild: fix call to adjust_autoksyms.sh when output directory specified
When a different output directory is specified during the build process (with O= or KBUILD_OUTPUT), the call to adjust_autoksyms.sh script fails with the following error: /bin/sh scripts/adjust_autoksyms.sh \ "make KBUILD_MODULES=1 -f ../Makefile autoksyms_recursive" /bin/sh: scripts/adjust_autoksyms.sh: No such file or directory make[2]: *** [vmlinux] Error 127 make[1]: *** [sub-make] Error 2 make: *** [__sub-make] Error 2 Using the absolute path with $(srctree) variable solves the problem. This is in case the CONFIG_TRIM_UNUSED_KSYMS option is specified. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Fixes: 23121ca2b56b ("kbuild: create/adjust generated/autoksyms.h") Cc: Nicolas Pitre <nico@linaro.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e3af48068c65..e9ad498238e7 100644
--- a/Makefile
+++ b/Makefile
@@ -934,7 +934,7 @@ quiet_cmd_link-vmlinux = LINK $@
934# execute if the rest of the kernel build went well. 934# execute if the rest of the kernel build went well.
935vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE 935vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
936ifdef CONFIG_TRIM_UNUSED_KSYMS 936ifdef CONFIG_TRIM_UNUSED_KSYMS
937 $(Q)$(CONFIG_SHELL) scripts/adjust_autoksyms.sh \ 937 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
938 "$(MAKE) KBUILD_MODULES=1 -f $(srctree)/Makefile autoksyms_recursive" 938 "$(MAKE) KBUILD_MODULES=1 -f $(srctree)/Makefile autoksyms_recursive"
939endif 939endif
940ifdef CONFIG_HEADERS_CHECK 940ifdef CONFIG_HEADERS_CHECK
@@ -949,13 +949,13 @@ endif
949 +$(call if_changed,link-vmlinux) 949 +$(call if_changed,link-vmlinux)
950 950
951autoksyms_recursive: $(vmlinux-deps) 951autoksyms_recursive: $(vmlinux-deps)
952 $(Q)$(CONFIG_SHELL) scripts/adjust_autoksyms.sh \ 952 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
953 "$(MAKE) KBUILD_MODULES=1 -f $(srctree)/Makefile autoksyms_recursive" 953 "$(MAKE) KBUILD_MODULES=1 -f $(srctree)/Makefile autoksyms_recursive"
954PHONY += autoksyms_recursive 954PHONY += autoksyms_recursive
955 955
956# standalone target for easier testing 956# standalone target for easier testing
957include/generated/autoksyms.h: FORCE 957include/generated/autoksyms.h: FORCE
958 $(Q)$(CONFIG_SHELL) scripts/adjust_autoksyms.sh true 958 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh true
959 959
960# Build samples along the rest of the kernel 960# Build samples along the rest of the kernel
961ifdef CONFIG_SAMPLES 961ifdef CONFIG_SAMPLES