diff mbox

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

Message ID 1374324735-2286-2-git-send-email-gustavo@zacarias.com.ar
State Accepted
Headers show

Commit Message

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

Comments

Thomas Petazzoni July 21, 2013, 3:35 p.m. UTC | #1
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. UTC | #2
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.
diff mbox

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),)