build: xtools: Simplify derivation of toolchain flags
Currently several of the variables in the CROSS_COMPILE_... family are repeated for each architecture despite the content of the variable being the same in all cases. Fix this. Change-Id: Ib40eca67926e22050a366e7b349331deaa7dd954 Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
This commit is contained in:
parent
ee85618d74
commit
06844200d8
|
@ -3,20 +3,12 @@ $(error XTOOLS_TOOLCHAIN_PATH is not set)
|
|||
endif
|
||||
|
||||
CROSS_COMPILE_TARGET_arm = arm-none-eabi
|
||||
CROSS_COMPILE_arm=${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET_arm}/bin/${CROSS_COMPILE_TARGET_arm}-
|
||||
CROSS_COMPILE_arm_version ?= $(shell $(CROSS_COMPILE_arm)gcc -dumpversion)
|
||||
TOOLCHAIN_CFLAGS_arm = -I${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET_arm}/${CROSS_COMPILE_TARGET_arm}/sysroot/usr/include
|
||||
|
||||
|
||||
CROSS_COMPILE_TARGET_x86 = i586-pc-elf
|
||||
CROSS_COMPILE_x86=${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET_x86}/bin/${CROSS_COMPILE_TARGET_x86}-
|
||||
CROSS_COMPILE_x86_version ?= $(shell $(CROSS_COMPILE_x86)gcc -dumpversion)
|
||||
TOOLCHAIN_CFLAGS_x86 = -I${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET_x86}/${CROSS_COMPILE_TARGET_x86}/sysroot/usr/include
|
||||
|
||||
CROSS_COMPILE= $(CROSS_COMPILE_$(ARCH))
|
||||
CROSS_COMPILE_TARGET = ${CROSS_COMPILE_TARGET_${ARCH}}
|
||||
CROSS_COMPILE_version = ${CROSS_COMPILE_${ARCH}_version}
|
||||
TOOLCHAIN_CFLAGS = ${TOOLCHAIN_CFLAGS_${ARCH}}
|
||||
CROSS_COMPILE = ${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-
|
||||
CROSS_COMPILE_version ?= $(shell $(CROSS_COMPILE)gcc -dumpversion)
|
||||
TOOLCHAIN_CFLAGS = -I${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_TARGET}/sysroot/usr/include
|
||||
|
||||
TOOLCHAIN_LIBS = gcc
|
||||
|
||||
|
|
Loading…
Reference in a new issue