summaryrefslogtreecommitdiff
path: root/scripts/Makefile.modpost
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r--scripts/Makefile.modpost4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 739402f45509..44936ebad161 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -94,7 +94,7 @@ targets += .vmlinux.objs
ifdef CONFIG_TRIM_UNUSED_KSYMS
ksym-wl := $(CONFIG_UNUSED_KSYMS_WHITELIST)
-ksym-wl := $(if $(filter-out /%, $(ksym-wl)),$(srctree)/)$(ksym-wl)
+ksym-wl := $(if $(filter-out /%, $(ksym-wl)),$(if $(wildcard $(ksym-wl)),,$(srctree)/))$(ksym-wl)
modpost-args += -t $(addprefix -u , $(ksym-wl))
modpost-deps += $(ksym-wl)
endif
@@ -112,7 +112,7 @@ else
# set src + obj - they may be used in the modules's Makefile
obj := $(KBUILD_EXTMOD)
-src := $(obj)
+src := $(if $(VPATH),$(VPATH)/)$(obj)
# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
include $(kbuild-file)