aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2017-11-03 10:59:00 +0100
committerJonas Gorski <jonas.gorski@gmail.com>2017-11-07 22:58:46 +0100
commite26ffb31dfa30d498b963a86d231835e3af7d3df (patch)
treefcedd12890c9b4e7c02b7bfc4a2d60831620a562
parent1928fc93ced752bd1e304ab3837fb41e7a80b9d9 (diff)
downloadupstream-e26ffb31dfa30d498b963a86d231835e3af7d3df.tar.gz
upstream-e26ffb31dfa30d498b963a86d231835e3af7d3df.tar.bz2
upstream-e26ffb31dfa30d498b963a86d231835e3af7d3df.zip
build: fix module symbol collection if build_dir is a symlink
If PKG_BUILD_DIR contains symlinks, the generated Module.symvers will contain the resolved paths, not the virtual path with the symlink name. This breaks the filter for the module's own symbols, so to fix this ensure we also grep for the resolved path. Reported-by: Roman Yeryomin <roman@advem.lv> Tested-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
-rw-r--r--include/kernel.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kernel.mk b/include/kernel.mk
index 92136f407a..8cb0defcb5 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -135,7 +135,7 @@ endef
define collect_module_symvers
for subdir in $(PKG_EXTMOD_SUBDIRS); do \
- grep -F $(PKG_BUILD_DIR) $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
+ grep -F $$$$(readlink -f $(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/$$$$subdir/Module.symvers >> $(PKG_BUILD_DIR)/Module.symvers.tmp; \
done; \
sort -u $(PKG_BUILD_DIR)/Module.symvers.tmp > $(PKG_BUILD_DIR)/Module.symvers; \
mv $(PKG_BUILD_DIR)/Module.symvers $(PKG_INFO_DIR)/$(PKG_NAME).symvers