[PATCH 1/6] UBUNTU: Support arch= cross-compilation for any arch

Loïc Minier loic.minier at linaro.org
Wed Mar 16 00:30:13 UTC 2011


Use "dpkg-architecture -a$(arch) -qDEB_HOST_GNU_TYPE" to compute
CROSS_COMPILE when calling debian/rules arch=foo instead of harcoding
support for only armel / arm-linux-gnueabi.

Signed-off-by: Loïc Minier <loic.minier at linaro.org>
---
 debian/rules.d/0-common-vars.mk |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index c6e10aa..f6930cb 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -108,9 +108,7 @@ DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 #
 arch := $(DEB_HOST_ARCH)
 ifneq ($(arch),$(DEB_HOST_ARCH))
-	ifeq ($(arch),armel)
-		CROSS_COMPILE ?= arm-linux-gnueabi-
-	endif
+	CROSS_COMPILE ?= $(shell dpkg-architecture -a$(arch) -qDEB_HOST_GNU_TYPE -f 2>/dev/null)-
 endif
 
 #
-- 
1.7.4.1





More information about the kernel-team mailing list