linux/arch/riscv
Jisheng Zhang 772d7891e8
riscv: vdso: fix and clean-up Makefile
Running "make" on an already compiled kernel tree will rebuild the
kernel even without any modifications:

  CALL    linux/scripts/checksyscalls.sh
  CALL    linux/scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  SO2S    arch/riscv/kernel/vdso/vdso-syms.S
  AS      arch/riscv/kernel/vdso/vdso-syms.o
  AR      arch/riscv/kernel/vdso/built-in.a
  AR      arch/riscv/kernel/built-in.a
  AR      arch/riscv/built-in.a
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  AR      init/built-in.a
  LD      vmlinux.o

The reason is "Any target that utilizes if_changed must be listed in
$(targets), otherwise the command line check will fail, and the target
will always be built" as explained by Documentation/kbuild/makefiles.rst

Fix this build bug by adding vdso-syms.S to $(targets)

At the same time, there are two trivial clean up modifications:

- the vdso-dummy.o is not needed any more after so remove it.

- vdso.lds is a generated file, so it should be prefixed with
  $(obj)/ instead of $(src)/

Fixes: c2c81bb2f6 ("RISC-V: Fix the VDSO symbol generaton for binutils-2.35+")
Cc: stable@vger.kernel.org
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2021-04-26 08:25:19 -07:00
..
boot riscv: Move kernel mapping outside of linear mapping 2021-04-26 08:25:04 -07:00
configs RISC-V: Enable CPU Hotplug in defconfigs 2021-02-26 21:24:02 -08:00
errata riscv: sifive: Apply errata "cip-1200" patch 2021-04-26 08:24:58 -07:00
include riscv: Constify sbi_ipi_ops 2021-04-26 08:25:10 -07:00
kernel riscv: vdso: fix and clean-up Makefile 2021-04-26 08:25:19 -07:00
lib riscv: Add support for function error injection 2021-01-14 15:09:09 -08:00
mm riscv/mm: Use BUG_ON instead of if condition followed by BUG. 2021-04-26 08:25:18 -07:00
net riscv: bpf: Avoid breaking W^X 2021-04-26 08:25:14 -07:00
Kbuild riscv: Allow device trees to be built into the kernel 2020-05-18 11:38:05 -07:00
Kconfig riscv: Set ARCH_HAS_STRICT_MODULE_RWX if MMU 2021-04-26 08:25:16 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.erratas riscv: sifive: Apply errata "cip-1200" patch 2021-04-26 08:24:58 -07:00
Kconfig.socs riscv: sifive: Add SiFive alternative ports 2021-04-26 08:24:56 -07:00
Makefile riscv: Introduce alternative mechanism to apply errata solution 2021-04-26 08:24:55 -07:00