[U-Boot-Users] MPC85xx config.mk patch for -mno-string

Wolfgang,
Taking Junita Ajith junita_ppc@yahoo.com suggestion, here is a patch to the MPC85XX ADS and CDS config.mk file to add the -mno-string option. Verifed working using gcc version 3.3.3 (Yellow Dog Linux 3.3.3-16.ydl.4).
Thanks, jdl
* Patch by Jon Loeliger, 14-Dec-2004: Force MPC85xx build to use -mno-string as e500 core doesn't implement string instructions.
Index: cpu/mpc85xx/config.mk =================================================================== RCS file: /cm/vault/u-boot/u-boot/cpu/mpc85xx/config.mk,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 config.mk --- cpu/mpc85xx/config.mk 17 Nov 2003 21:14:39 -0000 1.1.1.1 +++ cpu/mpc85xx/config.mk 14 Dec 2004 17:31:21 -0000 @@ -23,4 +23,6 @@
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
-PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float +PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 \ + -ffixed-r2 -ffixed-r29 -mno-string\ + -Wa,-me500 -msoft-float

In message 1103053896.29431.8.camel@cashmere.sps.mot.com you wrote:
- Patch by Jon Loeliger, 14-Dec-2004: Force MPC85xx build to use -mno-string as e500 core doesn't implement string instructions.
Why do we need this? GCC 3.3.3 (DENX ELDK 3.1 3.3.3-8) compiles the same code without problems. Where are the string instructions coming from?
Best regards,
Wolfgang Denk

On Wed, 2004-12-15 at 16:33, Wolfgang Denk wrote:
In message 1103053896.29431.8.camel@cashmere.sps.mot.com you wrote:
- Patch by Jon Loeliger, 14-Dec-2004: Force MPC85xx build to use -mno-string as e500 core doesn't implement string instructions.
Why do we need this? GCC 3.3.3 (DENX ELDK 3.1 3.3.3-8) compiles the same code without problems. Where are the string instructions coming from?
Well, technically, we really shouldn't _need_ to do this. It's really being done as a safety issue. Well, that and I'm going to use the "Also, 85xx Linux does this too." defense. :-)
I don't recall if Junita Ajith indicated what compiler he(?) used, but ELDK-3.1 was mentioned with a claim that it was needed for his build.
Wolfgang Denk
jdl

Wolfgang Denk writes:
Wolfgang> Why do we need this? GCC 3.3.3 (DENX ELDK 3.1 3.3.3-8) Wolfgang> compiles the same code without problems. Where are the Wolfgang> string instructions coming from?
GCC can be built with different defaults. The -mno-string option guarantees that string instructions will not be generated. I wrote some half-year ago that I too need this option for my GCC version. In theory, -mcpu=8540 implies -mno-string. In the real world, at least some GCC versions generate string instructions if -mno-string is not specified explicitly, and you can discover this only when the U-Boot crashes in run-time.
participants (3)
-
Jon Loeliger
-
Wolfgang Denk
-
Yuli Barcohen