linux-image-dbg: Use correct objcopy command when cross-compiling, thanks to Jon Severinsson

svn path=/dists/trunk/linux/; revision=20843
This commit is contained in:
Ben Hutchings 2013-12-02 05:22:23 +00:00
parent c7cfa50525
commit 584007f3e8
2 changed files with 11 additions and 1 deletions

2
debian/changelog vendored
View File

@ -25,6 +25,8 @@ linux (3.12.2-1~exp1) UNRELEASED; urgency=low
* [rt] Update to 3.12.1-rt4
* udeb: Add snd-usb-hiface to sound-modules, thanks to Samuel Thibault
(Closes: #730418)
* linux-image-dbg: Use correct objcopy command when cross-compiling,
thanks to Jon Severinsson
[ Bastian Blank ]
* Use compiler name instead of Linux version in compiler meta-packages.

10
debian/rules.real vendored
View File

@ -20,6 +20,14 @@ ifeq ($(DISTRIBUTOR),)
DISTRIBUTOR := Debian
endif
ifdef OVERRIDE_HOST_TYPE
CROSS_COMPILE := $(OVERRIDE_HOST_TYPE)-
else ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
CROSS_COMPILE := $(DEB_HOST_GNU_TYPE)-
else
CROSS_COMPILE :=
endif
export PYTHONPATH = $(CURDIR)/debian/lib/python
export DH_OPTIONS
export DEB_HOST_ARCH DEB_HOST_GNU_TYPE DEB_BUILD_ARCH
@ -347,7 +355,7 @@ ifeq ($(MODULES),True)
ifeq ($(DEBUG),True)
set -o pipefail; \
find $(PACKAGE_DIR) -name '*.ko' | sed 's|$(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/kernel/||' | while read module ; do \
objcopy --add-gnu-debuglink=$(DIR)/$$module $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/kernel/$$module || exit; \
$(CROSS_COMPILE)objcopy --add-gnu-debuglink=$(DIR)/$$module $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/kernel/$$module || exit; \
done
endif
cp $(DIR)/.config $(PACKAGE_DIR)/boot/config-$(REAL_VERSION)