]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
riscv: vdso: fix and clean-up Makefile
authorJisheng Zhang <jszhang@kernel.org>
Fri, 2 Apr 2021 13:29:08 +0000 (21:29 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 30 Jun 2021 06:27:51 +0000 (08:27 +0200)
commit31d53f54738ed5a3d8684173b6fc534c7d68abc3
tree8b386a9ac0319f930152e65a1f87687282794028
parente86145fded5a92890d1dbe01e4de6e33cb413d4d
riscv: vdso: fix and clean-up Makefile

BugLink: https://bugs.launchpad.net/bugs/1933691
[ Upstream commit 772d7891e8b3b0baae7bb88a294d61fd07ba6d15 ]

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: c2c81bb2f691 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
arch/riscv/kernel/vdso/Makefile