kbuild: simplify generic vdso installation code
With commit 4b0bf9a012
("riscv: compat_vdso: install compat_vdso.so.dbg
to /lib/modules/*/vdso/") applied, all debug VDSO files are installed in
$(MODLIB)/vdso/.
Simplify the installation rule.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
d98dba8852
commit
1c369b6c94
@ -13,16 +13,15 @@ install-dir := $(MODLIB)/vdso
|
|||||||
|
|
||||||
define gen_install_rules
|
define gen_install_rules
|
||||||
|
|
||||||
src := $$(firstword $$(subst :,$(space),$(1)))
|
dest := $(install-dir)/$$(patsubst %.dbg,%,$$(notdir $(1)))
|
||||||
dest := $(install-dir)/$$(or $$(word 2,$$(subst :,$(space),$(1))),$$(patsubst %.dbg,%,$$(notdir $(1))))
|
|
||||||
|
|
||||||
__default: $$(dest)
|
__default: $$(dest)
|
||||||
$$(dest): $$(src) FORCE
|
$$(dest): $(1) FORCE
|
||||||
$$(call cmd,install)
|
$$(call cmd,install)
|
||||||
|
|
||||||
# Some architectures create .build-id symlinks
|
# Some architectures create .build-id symlinks
|
||||||
ifneq ($(filter arm sparc x86, $(SRCARCH)),)
|
ifneq ($(filter arm sparc x86, $(SRCARCH)),)
|
||||||
link := $(install-dir)/.build-id/$$(shell $(READELF) -n $$(src) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug
|
link := $(install-dir)/.build-id/$$(shell $(READELF) -n $(1) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug
|
||||||
|
|
||||||
__default: $$(link)
|
__default: $$(link)
|
||||||
$$(link): $$(dest) FORCE
|
$$(link): $$(dest) FORCE
|
||||||
|
Loading…
Reference in New Issue
Block a user