• Nicolas Ferre's avatar
    kbuild: fix call to adjust_autoksyms.sh when output directory specified · ba79d401
    Nicolas Ferre authored
    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: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
    Fixes: 23121ca2 ("kbuild: create/adjust generated/autoksyms.h")
    Cc: Nicolas Pitre <nico@linaro.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
    ba79d401
Makefile 55.7 KB