UBUNTU: Support arch= cross-compilation for any arch
authorLoïc Minier <loic.minier@linaro.org>
Wed, 16 Mar 2011 00:30:13 +0000 (01:30 +0100)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:54:38 +0000 (06:54 -0700)
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>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

debian/rules.d/0-common-vars.mk

index 81a54bc..2cecd7a 100644 (file)
@@ -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
 
 #