Attached, a small patch for debian/rules to allow dpkg-cross to cross-compile 
binary packages. Tested on a AMD64 host compiling powerpc packages, and no 
unpleasant suprises found.


Regards, Paul.


Index: debian/rules
===================================================================
--- debian/rules	(revision 4519)
+++ debian/rules	(working copy)
@@ -8,6 +8,8 @@
 
 DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 ifeq ($(DEB_HOST_ARCH), i386)
 # Note: Would like to use --includedir=/usr/include/xenomai, but
@@ -35,7 +37,13 @@ ifeq ($(DEB_HOST_ARCH), arm)
 endif
 	CONFIG_OPTS += --prefix=/usr \
 	            --includedir=/usr/include/xenomai \
-	            --mandir=/usr/share/man
+	            --mandir=/usr/share/man \
+
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+	CONFIG_OPTS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+else
+	CONFIG_OPTS += --build $(DEB_BUILD_GNU_TYPE)
+endif
 
 build: build-arch build-indep
 
_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to