* [PATCH] kbuild: fix call to adjust_autoksyms.sh when output directory specified
@ 2016-04-25 15:55 Nicolas Ferre
2016-04-25 16:01 ` Nicolas Pitre
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Ferre @ 2016-04-25 15:55 UTC (permalink / raw)
To: linux-kbuild, mmarek, linux-kernel, nico
Cc: linux-arm-kernel, Nicolas Ferre, Rusty Russell
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>
---
Hi Nicolas,
I found this issue while running on today's Linux-next with my ARM
cross-compiler.
I suspect it's the proper way to fix the issue but I may miss some of the
details of the top kernel Makefile.
It does work for my separated output directory setup and I verified it still
compiles an in-sources setup as well (even if it's obvious...).
Bye,
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index c3937c5ae3b8..1c26b410ba7b 100644
--- a/Makefile
+++ b/Makefile
@@ -934,7 +934,7 @@ quiet_cmd_link-vmlinux = LINK $@
# execute if the rest of the kernel build went well.
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
ifdef CONFIG_TRIM_UNUSED_KSYMS
- $(Q)$(CONFIG_SHELL) scripts/adjust_autoksyms.sh \
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
"$(MAKE) KBUILD_MODULES=1 -f $(srctree)/Makefile autoksyms_recursive"
endif
ifdef CONFIG_HEADERS_CHECK
@@ -949,13 +949,13 @@ endif
+$(call if_changed,link-vmlinux)
autoksyms_recursive: $(vmlinux-deps)
- $(Q)$(CONFIG_SHELL) scripts/adjust_autoksyms.sh \
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
"$(MAKE) KBUILD_MODULES=1 -f $(srctree)/Makefile autoksyms_recursive"
PHONY += autoksyms_recursive
# standalone target for easier testing
include/generated/autoksyms.h: FORCE
- $(Q)$(CONFIG_SHELL) scripts/adjust_autoksyms.sh true
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh true
# Build samples along the rest of the kernel
ifdef CONFIG_SAMPLES
--
2.1.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kbuild: fix call to adjust_autoksyms.sh when output directory specified
2016-04-25 15:55 [PATCH] kbuild: fix call to adjust_autoksyms.sh when output directory specified Nicolas Ferre
@ 2016-04-25 16:01 ` Nicolas Pitre
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pitre @ 2016-04-25 16:01 UTC (permalink / raw)
To: Nicolas Ferre
Cc: linux-kbuild, mmarek, linux-kernel, linux-arm-kernel, Rusty Russell
On Mon, 25 Apr 2016, Nicolas Ferre wrote:
> 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
[...]
I posted a few fixes for this and some other issues already.
You may grab them all at once from this branch where I committed them on
top of Michal's kbuild branch:
git://git.linaro.org/people/nicolas.pitre/linux kbuild
Nicolas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-25 16:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-25 15:55 [PATCH] kbuild: fix call to adjust_autoksyms.sh when output directory specified Nicolas Ferre
2016-04-25 16:01 ` Nicolas Pitre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).