Support building optee on 32-bit Host Linux distribution
Signed-off-by: Prasanna K Mutharaju prasannakarthik@outlook.com --- toolchain.mk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/toolchain.mk b/toolchain.mk index 33c6dfb..d77c2f2 100644 --- a/toolchain.mk +++ b/toolchain.mk @@ -4,10 +4,17 @@ ROOT ?= $(CURDIR)/.. TOOLCHAIN_ROOT ?= $(ROOT)/toolchains
+LBITS := $(shell getconf LONG_BIT) AARCH32_PATH ?= $(TOOLCHAIN_ROOT)/aarch32 AARCH32_CROSS_COMPILE ?= $(AARCH32_PATH)/bin/arm-linux-gnueabihf- -AARCH32_GCC_VERSION ?= gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf -SRC_AARCH32_GCC ?= http://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-lin... + +ifeq ($(LBITS),64) + AARCH32_GCC_VERSION ?= gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf + SRC_AARCH32_GCC ?= http://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-lin... +else + AARCH32_GCC_VERSION ?= gcc-linaro-arm-linux-gnueabihf-4.9-2014.08_linux + SRC_AARCH32_GCC ?= http://releases.linaro.org/archive/14.08/components/toolchain/binaries/%24%7... +endif
AARCH64_PATH ?= $(TOOLCHAIN_ROOT)/aarch64 AARCH64_CROSS_COMPILE ?= $(AARCH64_PATH)/bin/aarch64-linux-gnu-