Source: expat Version: 2.1.0-6 Tags: patch User: helm...@debian.org Usertags: rebootstrap
Trying to cross build expat for e.g. powerpc results in a build failure during dh_strip. It built lib64expat1 using "gcc -m64" which produced amd64 objects instead of ppc64 objects which powerpc-linux-gnu-strip does not understand. I am attaching a patch that changes the build inject a suitable CC variable which makes cross building expat work. Helmut
diff -Nru expat-2.1.0/debian/changelog expat-2.1.0/debian/changelog --- expat-2.1.0/debian/changelog 2014-06-04 17:55:11.000000000 +0200 +++ expat-2.1.0/debian/changelog 2015-01-20 22:55:42.000000000 +0100 @@ -1,3 +1,10 @@ +expat (2.1.0-6.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Also use a cross compiler for multilib builds. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Tue, 20 Jan 2015 22:55:26 +0100 + expat (2.1.0-6) unstable; urgency=low * Really do the Ubuntu sync (closes: #748250). diff -Nru expat-2.1.0/debian/rules expat-2.1.0/debian/rules --- expat-2.1.0/debian/rules 2014-06-04 17:54:08.000000000 +0200 +++ expat-2.1.0/debian/rules 2015-01-20 22:55:23.000000000 +0100 @@ -32,6 +32,10 @@ HOST64FLAG = --host=s390x-linux-gnu endif +ifeq ($(origin CC),default) +CC = $(DEB_HOST_GNU_TYPE)-cc +endif + # -pthread -D_REENTRANT #551079 CFLAGS = `dpkg-buildflags --get CFLAGS` CFLAGS += -Wall @@ -65,13 +69,13 @@ build64/config.status: config-common-stamp dh_testdir - (mkdir -p $(@D); cd $(@D); CFLAGS="-m64 $(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + (mkdir -p $(@D); cd $(@D); CC="$(CC) -m64" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ ../configure $(CONFFLAGS) $(HOST64FLAG) --prefix=/usr --mandir=\$${prefix}/share/man \ --libdir=\$${prefix}/lib64) buildw64/config.status: config-common-stamp dh_testdir - (mkdir -p $(@D); cd $(@D); CFLAGS="-m64 $(CFLAGS) -DXML_UNICODE" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + (mkdir -p $(@D); cd $(@D); CC="$(CC) -m64" CFLAGS="$(CFLAGS) -DXML_UNICODE" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ ../configure $(CONFFLAGS) $(HOST64FLAG) --prefix=/usr --mandir=\$${prefix}/share/man \ --libdir=\$${prefix}/lib64)