Skip to contentSkip to conversation

external toolchain: [ARC] gcc cpu parameter

PATCH New Noam Camus 4 participants 7 messages Feb 23, 2014 – Aug 3, 2014

lore
Share & tools
lore

Noam Camus

author
#0 lore raw

PATCH 1/1 external toolchain: [ARC] gcc cpu parameter

external toolchain passes -mcpu=arc700
However compiler is familiar with -mcpu=ARC700

---
 arch/Config.in.arc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/Config.in.arc +1 -0
@@ -11,4 +11,5 @@ config BR2_ENDIAN
 	default "BIG"	 if BR2_arceb
 
 config BR2_GCC_TARGET_CPU
+	default "ARC700" if BR2_TOOLCHAIN_EXTERNAL
 	default "arc700"

--
1.7.1

#1 lore raw

PATCH 1/1 external toolchain: [ARC] gcc cpu parameter

Dear Noam Camus,

Quoted 12 lines · Noam Camus

external toolchain passes -mcpu=arc700
However compiler is familiar with -mcpu=ARC700

---
 arch/Config.in.arc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

arch/Config.in.arc config BR2_ENDIAN · line 15

Quoted 5 lines
arch/Config.in.arc +1 -0
@@ -11,4 +11,5 @@ config BR2_ENDIAN
 	default "BIG"	 if BR2_arceb
 
 config BR2_GCC_TARGET_CPU
+	default "ARC700" if BR2_TOOLCHAIN_EXTERNAL
 	default "arc700"

We clearly don't want to use BR2_TOOLCHAIN_EXTERNAL here as a condition. What is the official value? Is it -mcpu=arc700 or -mcpu=ARC700 ? Maybe the existing arc700 value was wrong and should just be fixed? Or does the value depends on the gcc version?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
author
#2 lore raw

PATCH 1/1 external toolchain: [ARC] gcc cpu parameter

Hi Thomas,
Using external toolchain than BR2_GCC_TARGET_CPU is passed to GCC by -mcpu Using buildroot toolchain than BR2_GCC_TARGET_CPU is passed to configure by --with-cpu

ARC GCC likes to get -mcpu=ARC700
However through configure I am not sure but I think that config.gcc script is involved and it likes to get arc*.

Maybe my patch is a workaround to make external toolchain work for ARC and complete solution is to change ARC GCC.

Noam

-----Original Message-----
From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
Sent: Sunday, February 23, 2014 11:48 AM
To: Noam Camus
Cc: buildroot at busybox.net
Subject: Re: [Buildroot] [PATCH] external toolchain: [ARC] gcc cpu parameter

Dear Noam Camus,

Quoted 13 lines · Noam Camus

external toolchain passes -mcpu=arc700 However compiler is familiar with -mcpu=ARC700

---
 arch/Config.in.arc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/Config.in.arc index renamed from arch/Config.in.arc +0 -0

60b59f0..53e7052 100644

arch/Config.in.arc config BR2_ENDIAN · line 15

Quoted 5 lines
arch/Config.in.arc +1 -0
@@ -11,4 +11,5 @@ config BR2_ENDIAN
 	default "BIG"	 if BR2_arceb
 
 config BR2_GCC_TARGET_CPU
+	default "ARC700" if BR2_TOOLCHAIN_EXTERNAL
 	default "arc700"

We clearly don't want to use BR2_TOOLCHAIN_EXTERNAL here as a condition. What is the official value? Is it -mcpu=arc700 or -mcpu=ARC700 ? Maybe the existing arc700 value was wrong and should just be fixed? Or does the value depends on the gcc version?

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering http://free-electrons.com

#3 lore raw

PATCH 1/1 external toolchain: [ARC] gcc cpu parameter

Noam, Thomas, All,

On 2014-02-23 10:57 +0000, Noam Camus spake thusly:

Quoted 8 lines

Using external toolchain than BR2_GCC_TARGET_CPU is passed to GCC by -mcpu
Using buildroot toolchain than BR2_GCC_TARGET_CPU is passed to configure by --with-cpu

ARC GCC likes to get -mcpu=ARC700
However through configure I am not sure but I think that config.gcc script is involved and it likes to get arc*.

From what I can see in gcc master:
- ./configure expects: --with-cpu=arc700
- gcc expects : -mpcu=ARC700

Yes, that's it... :-/

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/1 external toolchain: [ARC] gcc cpu parameter

In reply to Noam Camus

Dear Noam Camus,

(It would be nice if you could avoid top-posting. It is considered a bad practice in most open-source circles. See
http://en.wikipedia.org/wiki/Posting_style#Top-posting vs.
http://en.wikipedia.org/wiki/Posting_style#Bottom-posting. Thanks!)

Quoted 2 lines · Noam Camus

Using external toolchain than BR2_GCC_TARGET_CPU is passed to GCC by -mcpu Using buildroot toolchain than BR2_GCC_TARGET_CPU is passed to configure by --with-cpu

Passing -mcpu or --with-cpu is already taken care of by Buildroot depending on the case. However, normally, gcc accepts the same possible values for both -mcpu and --with-cpu.

Quoted 4 lines

ARC GCC likes to get -mcpu=ARC700
However through configure I am not sure but I think that config.gcc script is involved and it likes to get arc*.

Maybe my patch is a workaround to make external toolchain work for ARC and complete solution is to change ARC GCC.

I'm Cc'ing Anton, from Synposys, to get more details about this.

Noam, which ARC external toolchain are you using? Maybe it's an older ARC toolchain, and Synopsys has since then changed the possible -mcpu values?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/1 external toolchain: [ARC] gcc cpu parameter

Hi Thomas,

Quoted 2 lines

I'm Cc'ing Anton, from Synposys, to get more details about this.

I've connected Noam and compiler engineering, so they can discuss what to do about this inconsistency.

Quoted 4 lines

Noam, which ARC external toolchain are you using? Maybe it's an older ARC toolchain, and Synopsys has since then changed the possible -mcpu values?

Nope, this is the same for the current tools as well :-(

Anton

Quoted 8 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#6 lore raw

PATCH 1/1 external toolchain: [ARC] gcc cpu parameter

In reply to Noam Camus

Dear Noam Camus,

Quoted 12 lines · Noam Camus

external toolchain passes -mcpu=arc700
However compiler is familiar with -mcpu=ARC700

---
 arch/Config.in.arc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

arch/Config.in.arc config BR2_ENDIAN · line 15

Quoted 5 lines
arch/Config.in.arc +1 -0
@@ -11,4 +11,5 @@ config BR2_ENDIAN
 	default "BIG"	 if BR2_arceb
 
 config BR2_GCC_TARGET_CPU
+	default "ARC700" if BR2_TOOLCHAIN_EXTERNAL
 	default "arc700"

Since there has been no feedback about this patch since February 2014, I've marked it as Rejected in patchwork, as the proposed solution is not acceptable. Do not hesitate to get back to us with a more appropriate solution.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com