Comment 5 for bug 962997

Revision history for this message
Wookey (wookey) wrote :

I don't actually understand why this works. I fixed it slightly differently by explicitly setting $STRIP.

If just setting $CROSS is enough to fix this, how many other things can be fixed by setting $CROSS? What exactly is the scope of this - does it only work in binutils or does it have wider application? I tried reading the autconf manula and it didn't seem to say anything about this. How is setting $CROSS different from setting --host?

Is there any reason to prefer one of these fixes over the other? Marcin's is shorter, mine is a bit clearer?

Is cross-auto-foo best practice actually written down anywhere?

diff -ur origs/debianutils-4.2.2/debian/rules patched/debianutils-4.2.2/debian/rules
--- origs/debianutils-4.2.2/debian/rules 2012-03-24 14:52:38.000000000 +0000
+++ patched/debianutils-4.2.2/debian/rules 2012-03-27 11:46:21.000000000 +0000
@@ -12,8 +12,12 @@
 DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
 DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+STRIP=strip
+
 ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
+STRIP=$(DEB_HOST_GNU_TYPE)-strip
 endif

 CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
@@ -63,7 +67,7 @@
           debian/tmp/bin/

 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
- strip --remove-section=.comment --remove-section=.note \
+ $(STRIP) --remove-section=.comment --remove-section=.note \
                debian/tmp/bin/run-parts \
                debian/tmp/bin/tempfile \
                debian/tmp/usr/bin/ischroot