]> git.dujemihanovic.xyz Git - linux.git/commitdiff
riscv: fix building external modules
authorAndreas Schwab <schwab@suse.de>
Tue, 2 Nov 2021 15:51:43 +0000 (16:51 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 19 Nov 2021 07:06:23 +0000 (23:06 -0800)
When building external modules, vdso_prepare should not be run.  If the
kernel sources are read-only, it will fail.

Fixes: fde9c59aebaf ("riscv: explicitly use symbol offsets for VDSO")
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Makefile

index 5927c94302b87bccd2a11b872b391e5fc164cf0d..8a107ed18b0dc71b7804203540078044cddd1976 100644 (file)
@@ -107,11 +107,13 @@ PHONY += vdso_install
 vdso_install:
        $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@
 
+ifeq ($(KBUILD_EXTMOD),)
 ifeq ($(CONFIG_MMU),y)
 prepare: vdso_prepare
 vdso_prepare: prepare0
        $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso include/generated/vdso-offsets.h
 endif
+endif
 
 ifneq ($(CONFIG_XIP_KERNEL),y)
 ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy)