linux-image-dbg: Don't rely on upstream makefile to make .build-id links to vDSO debuginfo

Fixes FTBFS on arm64, s390.
This commit is contained in:
Ben Hutchings 2016-01-19 17:32:46 +00:00
parent 6b3f710f74
commit 33cd223d58
2 changed files with 15 additions and 7 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
linux (4.3.3-7) unstable; urgency=medium
* linux-image-dbg: Don't rely on upstream makefile to make .build-id
links to vDSO debuginfo (fixes FTBFS on arm64, s390)
-- Ben Hutchings <ben@decadent.org.uk> Tue, 19 Jan 2016 17:29:21 +0000
linux (4.3.3-6) unstable; urgency=medium
[ Ben Hutchings ]

15
debian/rules.real vendored
View File

@ -431,14 +431,15 @@ ifeq ($(MODULES),True)
endif
ifeq ($(VDSO),True)
+$(MAKE_CLEAN) -C $(DIR) vdso_install INSTALL_MOD_PATH='$(CURDIR)'/$(DEBUG_DIR)
# Fix .build-id links
find $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id -name '*.debug' | while read link; do \
rel_path="$${link#$(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id/}" && \
mkdir -p "$(DEBUG_DIR)/.build-id/$$(dirname "$$rel_path")" && \
ln -s -r -L "$$link" "$(DEBUG_DIR)/.build-id/$$rel_path" || \
exit; \
# Create .build-id links. Some architectures already do so, but in the
# wrong place, so delete those first.
rm -rf $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id
find $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/ -type f | while read vdso; do \
if buildid="$$(readelf -n "$$vdso" | sed -rne 's/^\s+Build ID: (.*)$$/\1/p')" && [ "$$buildid" ]; then \
mkdir -p "$(DEBUG_DIR)/.build-id/$${buildid:0:2}"; \
ln -s -r "$$vdso" "$(DEBUG_DIR)/.build-id/$${buildid:0:2}/$${buildid:2}.debug"; \
fi; \
done
rm -r $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id
endif
# Add symlinks to vmlinux from the locations expected by kdump-tools,
# systemtap and others