public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [MIPS] CPU-dependent compiler/assembler options for optimization
@ 2008-05-24 13:46 Shinya Kuribayashi
  2008-05-24 20:12 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Shinya Kuribayashi @ 2008-05-24 13:46 UTC (permalink / raw)
  To: u-boot

We take the same options as Linux for now. This means that an ancient
-mcpu support will be lost. Users need gcc 3.0.X or later.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 cpu/mips/config.mk |   38 +++++++++++++++++++++++++++++++-------
 1 files changed, 31 insertions(+), 7 deletions(-)


diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk
index a173c54..8df5e23 100644
--- a/cpu/mips/config.mk
+++ b/cpu/mips/config.mk
@@ -20,13 +20,6 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
-v=$(shell $(AS) --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2)
-MIPSFLAGS:=$(shell \
-if [ "$v" -lt "14" ]; then \
-	echo "-mcpu=4kc"; \
-else \
-	echo "-march=4kc -mtune=4kc"; \
-fi)
 
 ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
 ENDIANNESS = -EL
@@ -37,3 +30,34 @@ endif
 MIPSFLAGS += $(ENDIANNESS)
 
 PLATFORM_CPPFLAGS += $(MIPSFLAGS)
+
+#
+# CPU-dependent compiler/assembler options for optimization.
+#
+cflags-$(CONFIG_CPU_R3000)	+= -march=r3000
+cflags-$(CONFIG_CPU_TX39XX)	+= -march=r3900
+cflags-$(CONFIG_CPU_R6000)	+= -march=r6000 -Wa,--trap
+cflags-$(CONFIG_CPU_R4300)	+= -march=r4300 -Wa,--trap
+cflags-$(CONFIG_CPU_VR41XX)	+= -march=r4100 -Wa,--trap
+cflags-$(CONFIG_CPU_R4X00)	+= -march=r4600 -Wa,--trap
+cflags-$(CONFIG_CPU_TX49XX)	+= -march=r4600 -Wa,--trap
+cflags-$(CONFIG_CPU_LOONGSON2)	+= -march=r4600 -Wa,--trap
+cflags-$(CONFIG_CPU_MIPS32_R1)	+= $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) -Wa,-mips32 -Wa,--trap
+cflags-$(CONFIG_CPU_MIPS32_R2)	+= $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) -Wa,-mips32r2 -Wa,--trap
+cflags-$(CONFIG_CPU_MIPS64_R1)	+= $(call cc-option,-march=mips64,-mips64 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) -Wa,-mips64 -Wa,--trap
+cflags-$(CONFIG_CPU_MIPS64_R2)	+= $(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64) -Wa,-mips64r2 -Wa,--trap
+cflags-$(CONFIG_CPU_R5000)	+= -march=r5000 -Wa,--trap
+cflags-$(CONFIG_CPU_R5432)	+= $(call cc-option,-march=r5400,-march=r5000) -Wa,--trap
+cflags-$(CONFIG_CPU_R5500)	+= $(call cc-option,-march=r5500,-march=r5000) -Wa,--trap
+cflags-$(CONFIG_CPU_NEVADA)	+= $(call cc-option,-march=rm5200,-march=r5000) -Wa,--trap
+cflags-$(CONFIG_CPU_RM7000)	+= $(call cc-option,-march=rm7000,-march=r5000) -Wa,--trap
+cflags-$(CONFIG_CPU_RM9000)	+= $(call cc-option,-march=rm9000,-march=r5000) -Wa,--trap
+cflags-$(CONFIG_CPU_SB1)	+= $(call cc-option,-march=sb1,-march=r5000) -Wa,--trap
+cflags-$(CONFIG_CPU_R8000)	+= -march=r8000 -Wa,--trap
+cflags-$(CONFIG_CPU_R10000)	+= $(call cc-option,-march=r10000,-march=r8000) -Wa,--trap
+
+cflags-$(CONFIG_CPU_R4000_WORKAROUNDS)	+= $(call cc-option,-mfix-r4000,)
+cflags-$(CONFIG_CPU_R4400_WORKAROUNDS)	+= $(call cc-option,-mfix-r4400,)
+cflags-$(CONFIG_CPU_DADDI_WORKAROUNDS)	+= $(call cc-option,-mno-daddi,)
+
+PLATFORM_CPPFLAGS += $(cflags-y)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [MIPS] CPU-dependent compiler/assembler options for optimization
  2008-05-24 13:46 [U-Boot-Users] [MIPS] CPU-dependent compiler/assembler options for optimization Shinya Kuribayashi
@ 2008-05-24 20:12 ` Wolfgang Denk
  2008-05-25 15:40   ` Shinya Kuribayashi
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2008-05-24 20:12 UTC (permalink / raw)
  To: u-boot

In message <48381C45.2020801@ruby.dti.ne.jp> you wrote:
> We take the same options as Linux for now. This means that an ancient
> -mcpu support will be lost. Users need gcc 3.0.X or later.

Why is this change necessary?

There are still people out there  who  use  ancient  toolchains  like
gcc-2.95. Do we really have to break compatibility here?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Men will always be men -- no matter where they are.
	-- Harry Mudd, "Mudd's Women", stardate 1329.8

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [MIPS] CPU-dependent compiler/assembler options for optimization
  2008-05-24 20:12 ` Wolfgang Denk
@ 2008-05-25 15:40   ` Shinya Kuribayashi
  2008-05-25 20:22     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Shinya Kuribayashi @ 2008-05-25 15:40 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> In message <48381C45.2020801@ruby.dti.ne.jp> you wrote:
>> We take the same options as Linux for now. This means that an ancient
>> -mcpu support will be lost. Users need gcc 3.0.X or later.
> 
> Why is this change necessary?

Not necessary.

> There are still people out there  who  use  ancient  toolchains  like
> gcc-2.95. Do we really have to break compatibility here?

This patch adds,
- support more CPU variants other than MIPS 4K
- without changing the code.

In other words, every U-Boot/MIPS user other than MIPS 4K must change
cpu/mips/config.mk as he wants.

I thought this patch is more beneficial for MIPS users even if breaking
old gcc 2.96 support. That's all.

I don't want to argue with you about this issue. If you disagree, I'll
drop this from my queue. I don't mind, I can live without this change.


  Shinya

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [MIPS] CPU-dependent compiler/assembler options for optimization
  2008-05-25 15:40   ` Shinya Kuribayashi
@ 2008-05-25 20:22     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-05-25 20:22 UTC (permalink / raw)
  To: u-boot

Dear Shinya,

in message <4839885F.6070801@ruby.dti.ne.jp> you wrote:
> 
> > There are still people out there  who  use  ancient  toolchains  like
> > gcc-2.95. Do we really have to break compatibility here?
> 
> This patch adds,
> - support more CPU variants other than MIPS 4K
> - without changing the code.
> 
> In other words, every U-Boot/MIPS user other than MIPS 4K must change
> cpu/mips/config.mk as he wants.
> 
> I thought this patch is more beneficial for MIPS users even if breaking
> old gcc 2.96 support. That's all.

Maybe you can implement  this  in  a  way  that  still  supports  old
environments at least at the same level as the current code does?

> I don't want to argue with you about this issue. If you disagree, I'll
> drop this from my queue. I don't mind, I can live without this change.

Please don't misunderstand me - I don't want to stop you or to put
obstacles in your way. I just want to make sure we keep the bigger
picture in mind.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Even if you can deceive people about  a  product  through  misleading
statements, sooner or later the product will speak for itself.
- Hajime Karatsu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-25 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-24 13:46 [U-Boot-Users] [MIPS] CPU-dependent compiler/assembler options for optimization Shinya Kuribayashi
2008-05-24 20:12 ` Wolfgang Denk
2008-05-25 15:40   ` Shinya Kuribayashi
2008-05-25 20:22     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox