arch: allow GCC target options to be optionally overwritten

The BR2_GCC_TARGET_* configuration variables are copied to
corresponding GCC_TARGET_* variables which may then be optionally
modified or overwritten by architecture specific makefiles.

All makefiles must use the new GCC_TARGET_* variables instead
of the BR2_GCC_TARGET_* versions.

Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
[Thomas: simplify include of arch/arch.mk]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Mark Corbin
2018-09-12 11:22:53 +01:00
committed by Thomas Petazzoni
parent 1eca624c03
commit bd0640a213
12 changed files with 52 additions and 38 deletions

View File

@@ -151,18 +151,18 @@ TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))
# Definition of the CFLAGS to use with the external toolchain, as well as the
# common toolchain wrapper build arguments
#
ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU))
ifeq ($(GCC_TARGET_CPU_REVISION),)
CC_TARGET_CPU_ := $(GCC_TARGET_CPU)
else
CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
CC_TARGET_CPU_ := $(GCC_TARGET_CPU)-$(GCC_TARGET_CPU_REVISION)
endif
CC_TARGET_ARCH_ := $(call qstrip,$(BR2_GCC_TARGET_ARCH))
CC_TARGET_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_ABI))
CC_TARGET_NAN_ := $(call qstrip,$(BR2_GCC_TARGET_NAN))
CC_TARGET_FP32_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_FP32_MODE))
CC_TARGET_FPU_ := $(call qstrip,$(BR2_GCC_TARGET_FPU))
CC_TARGET_FLOAT_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI))
CC_TARGET_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_MODE))
CC_TARGET_ARCH_ := $(GCC_TARGET_ARCH)
CC_TARGET_ABI_ := $(GCC_TARGET_ABI)
CC_TARGET_NAN_ := $(GCC_TARGET_NAN)
CC_TARGET_FP32_MODE_ := $(GCC_TARGET_FP32_MODE)
CC_TARGET_FPU_ := $(GCC_TARGET_FPU)
CC_TARGET_FLOAT_ABI_ := $(GCC_TARGET_FLOAT_ABI)
CC_TARGET_MODE_ := $(GCC_TARGET_MODE)
# march/mtune/floating point mode needs to be passed to the external toolchain
# to select the right multilib variant