diff mbox

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

Message ID 1300235418-19872-2-git-send-email-loic.minier@linaro.org
State New
Headers show

Commit Message

Loïc Minier March 16, 2011, 12:30 a.m. UTC
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@linaro.org>
---
 debian/rules.d/0-common-vars.mk |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff mbox

Patch

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
 
 #