arch: toolchain: Introduce target CPU revision.
authorSonic Zhang <sonic.zhang@analog.com>
Fri, 3 May 2013 00:39:36 +0000 (00:39 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 5 May 2013 20:49:50 +0000 (22:49 +0200)
Adds the possibility to have a free-form CPU revision string and append it
to the target CPU. Only Blackfin actually uses this option.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
arch/Config.in
arch/Config.in.bfin
toolchain/gcc/gcc-uclibc-4.x.mk
toolchain/toolchain-external/ext-tool.mk

index e32cfd91474cb5b01ec4c8e30fa9dbd24c115bd4..fa9dad3432159c20413500f0b700e631da401f52 100644 (file)
@@ -189,6 +189,9 @@ config BR2_GCC_TARGET_ABI
 config BR2_GCC_TARGET_CPU
        string
 
+config BR2_GCC_TARGET_CPU_REVISION
+       string
+
 # Set up target binary format
 choice
        prompt "Target Binary Format"
index ac9662041301f220d24491a54e8baaef3f312f9a..f755c8db0fea5b5ecc11825e8cb396734ca3dd57 100644 (file)
@@ -97,3 +97,11 @@ config BR2_GCC_TARGET_CPU
        default bf548           if BR2_bf548
        default bf549           if BR2_bf549
        default bf561           if BR2_bf561
+
+config BR2_GCC_TARGET_CPU_REVISION
+       string "Target CPU revision"
+       help
+         Specify a target CPU revision, which will be appended to the
+         value of the -mcpu option. For example, if the selected CPU is
+         bf609, and then selected CPU revision is "0.0", then gcc will
+         receive the -mcpu=bf609-0.0 option.
index f1803cb665c527d07783ee624fec924e575813fb..128b7abe66cc199910c08c022abe5c91ed62ea0c 100644 (file)
@@ -90,7 +90,11 @@ ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
 GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
 endif
 ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
-GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU)
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
+GCC_WITH_CPU:=--with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
+else
+GCC_WITH_CPU:=--with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU))
+endif
 endif
 
 # AVR32 GCC special configuration
index dce0299beefff53d9256642c63184affc140206f..bf2bee8683f3ffa53e246bd79f3a334fba416fc6 100644 (file)
@@ -134,7 +134,11 @@ TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += \
 endif
 
 CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
+ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
 CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU))
+else
+CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
+endif
 CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
 CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))