Patchwork [1/9] gcc/bfin: doesn't support --with-cpu defaults

login
register
mail settings
Submitter Gustavo Zacarias
Date July 20, 2013, 12:52 p.m.
Message ID <1374324735-2286-2-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/260441/
State Accepted
Headers show

Comments

Gustavo Zacarias - July 20, 2013, 12:52 p.m.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/gcc/gcc.mk | 3 +++
 1 file changed, 3 insertions(+)
Thomas Petazzoni - July 21, 2013, 3:35 p.m.
Dear Gustavo Zacarias,

On Sat, 20 Jul 2013 09:52:07 -0300, Gustavo Zacarias wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

> +# GCC doesn't support --with-cpu for bfin
> +ifeq ($(BR2_bfin),)
>  ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
>  ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
>  HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
> @@ -166,6 +168,7 @@ else
>  HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU))
>  endif
>  endif
> +endif

This looks odd because the BR2_GCC_TARGET_CPU_REVISION thing was added
by Sonic Zhang, see 66d41890ec2b76189bcd427a0cc3966ff56f9712. So it is
specifically useful on Blackfin. Maybe just with Analog Devices
toolchains, I don't know. But clearly, removing that for Blackfin seems
wrong.
Gustavo Zacarias - July 21, 2013, 4:26 p.m.
On 07/21/2013 12:35 PM, Thomas Petazzoni wrote:

> This looks odd because the BR2_GCC_TARGET_CPU_REVISION thing was added
> by Sonic Zhang, see 66d41890ec2b76189bcd427a0cc3966ff56f9712. So it is
> specifically useful on Blackfin. Maybe just with Analog Devices
> toolchains, I don't know. But clearly, removing that for Blackfin seems
> wrong.

Exactly, with their twisted toolchains, snip without it:

checking for clock_t... yes
checking for .preinit_array/.init_array/.fini_array support... yes
checking if mkdir takes one argument... no
This target does not support --with-cpu.
Valid --with options are:
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory
`/home/gustavoz/b/fin/output/build/host-gcc-initial-4.5.4/build'
make: ***
[/home/gustavoz/b/fin/output/build/host-gcc-initial-4.5.4/.stamp_built]
Error 2

Regards.

Patch

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 85cd7d4..cbeaa6c 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -159,6 +159,8 @@  endif
 ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
 HOST_GCC_COMMON_CONF_OPT += --with-abi=$(BR2_GCC_TARGET_ABI)
 endif
+# GCC doesn't support --with-cpu for bfin
+ifeq ($(BR2_bfin),)
 ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
 ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
 HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
@@ -166,6 +168,7 @@  else
 HOST_GCC_COMMON_CONF_OPT += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU))
 endif
 endif
+endif
 
 GCC_TARGET_FPU = $(call qstrip,$(BR2_GCC_TARGET_FPU))
 ifneq ($(GCC_TARGET_FPU),)