public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] powerpc/85xx: select -mcpu=8540 to match -Wa, e500
@ 2013-01-09  1:43 Scott Wood
  2013-01-19  1:38 ` [U-Boot] [PATCH v2] " Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2013-01-09  1:43 UTC (permalink / raw)
  To: u-boot

This allows building with toolchains that by default target e6500.

When targetting e6500, GCC generates a two-operand form of mfcr which gas
normally maps to mfocr.  However, when we tell gas to target e500 rather
than e6500, it rejects two-operand mfcr.  Tell GCC to target a
least-common-denominator e500 to match what we tell the assembler.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 arch/powerpc/cpu/mpc85xx/config.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/cpu/mpc85xx/config.mk b/arch/powerpc/cpu/mpc85xx/config.mk
index f36d823..d1765cd 100644
--- a/arch/powerpc/cpu/mpc85xx/config.mk
+++ b/arch/powerpc/cpu/mpc85xx/config.mk
@@ -23,7 +23,7 @@
 
 PLATFORM_RELFLAGS += -meabi
 
-PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
+PLATFORM_CPPFLAGS += -ffixed-r2 -mcpu=8540 -Wa,-me500 -msoft-float -mno-string
 
 # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
 # see "[PATCH,rs6000] make -mno-spe work as expected" on
-- 
1.7.9.5

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

* [U-Boot] [PATCH v2] powerpc/85xx: select -mcpu=8540 to match -Wa, e500
  2013-01-09  1:43 [U-Boot] [PATCH] powerpc/85xx: select -mcpu=8540 to match -Wa, e500 Scott Wood
@ 2013-01-19  1:38 ` Scott Wood
  2013-01-24  8:07   ` Andy Fleming
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2013-01-19  1:38 UTC (permalink / raw)
  To: u-boot

This allows building with toolchains that by default target e6500.

When targetting e6500, GCC generates a two-operand form of mfcr which gas
normally maps to mfocr.  However, when we tell gas to target e500 rather
than e6500, it rejects two-operand mfcr.  Tell GCC to target a
least-common-denominator e500 to match what we tell the assembler.

-misel and -mno-strict-align are added to keep the code size from growing
(it actually ends up shrinking a bit compared to -mcpu=603e, which was
the default on my old toolchain).

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
v2: add -misel and -mno-strict-align

 arch/powerpc/cpu/mpc85xx/config.mk |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/cpu/mpc85xx/config.mk b/arch/powerpc/cpu/mpc85xx/config.mk
index f36d823..450d511 100644
--- a/arch/powerpc/cpu/mpc85xx/config.mk
+++ b/arch/powerpc/cpu/mpc85xx/config.mk
@@ -23,7 +23,8 @@
 
 PLATFORM_RELFLAGS += -meabi
 
-PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
+PLATFORM_CPPFLAGS += -ffixed-r2 -mcpu=8540 -misel -mno-strict-align \
+	-Wa,-me500 -msoft-float -mno-string
 
 # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
 # see "[PATCH,rs6000] make -mno-spe work as expected" on
-- 
1.7.9.5

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

* [U-Boot] [PATCH v2] powerpc/85xx: select -mcpu=8540 to match -Wa, e500
  2013-01-19  1:38 ` [U-Boot] [PATCH v2] " Scott Wood
@ 2013-01-24  8:07   ` Andy Fleming
  2013-01-25  0:21     ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Fleming @ 2013-01-24  8:07 UTC (permalink / raw)
  To: u-boot

Scott, I reverted this patch, and it fixed some build errors:

20001122-1.c:1:0: error: E500 and FPRs not supported
20010114-2.c:1:0: error: E500 and FPRs not supported
make[2]: ***
[/local/afleming/u-boot/build/P2020DS/post/lib_powerpc/fpu/20001122-1.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: ***
[/local/afleming/u-boot/build/P2020DS/post/lib_powerpc/fpu/20010114-2.o]
Error 1
make[1]: *** [postdeps] Error 2
make: *** [/local/afleming/u-boot/build/P2020DS/post/libpost.o] Error 2
make: INTERNAL: Exiting with 4 jobserver tokens available; should be 3!

Similar errors were seen on all these boards:

P2041RDB_SRIO_PCIE_BOOT  P5020DS
P3041DS                  P5020DS_NAND
P2020DS               P3041DS_NAND             P5020DS_SDCARD
P2020DS_36BIT         P3041DS_SDCARD           P5020DS_SECURE_BOOT
P2020DS_DDR2          P3041DS_SECURE_BOOT      P5020DS_SPIFLASH
P2020DS_SDCARD        P3041DS_SPIFLASH         P5020DS_SRIO_PCIE_BOOT
P2020DS_SPIFLASH      P3041DS_SRIO_PCIE_BOOT   P5040DS
P2041RDB              P4080DS                  xpedite520x
P2041RDB_NAND         P4080DS_SDCARD           xpedite537x
P2041RDB_SDCARD       P4080DS_SECURE_BOOT      xpedite550x
P2041RDB_SECURE_BOOT  P4080DS_SPIFLASH
P2041RDB_SPIFLASH     P4080DS_SRIO_PCIE_BOOT



On Fri, Jan 18, 2013 at 7:38 PM, Scott Wood <scottwood@freescale.com> wrote:

> This allows building with toolchains that by default target e6500.
>
> When targetting e6500, GCC generates a two-operand form of mfcr which gas
> normally maps to mfocr.  However, when we tell gas to target e500 rather
> than e6500, it rejects two-operand mfcr.  Tell GCC to target a
> least-common-denominator e500 to match what we tell the assembler.
>
> -misel and -mno-strict-align are added to keep the code size from growing
> (it actually ends up shrinking a bit compared to -mcpu=603e, which was
> the default on my old toolchain).
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> v2: add -misel and -mno-strict-align
>
>  arch/powerpc/cpu/mpc85xx/config.mk |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/cpu/mpc85xx/config.mkb/arch/powerpc/cpu/mpc85xx/
> config.mk
> index f36d823..450d511 100644
> --- a/arch/powerpc/cpu/mpc85xx/config.mk
> +++ b/arch/powerpc/cpu/mpc85xx/config.mk
> @@ -23,7 +23,8 @@
>
>  PLATFORM_RELFLAGS += -meabi
>
> -PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string
> +PLATFORM_CPPFLAGS += -ffixed-r2 -mcpu=8540 -misel -mno-strict-align \
> +       -Wa,-me500 -msoft-float -mno-string
>
>  # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
>  # see "[PATCH,rs6000] make -mno-spe work as expected" on
> --
> 1.7.9.5
>
>

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

* [U-Boot] [PATCH v2] powerpc/85xx: select -mcpu=8540 to match -Wa, e500
  2013-01-24  8:07   ` Andy Fleming
@ 2013-01-25  0:21     ` Scott Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Wood @ 2013-01-25  0:21 UTC (permalink / raw)
  To: u-boot

On 01/24/2013 02:07:29 AM, Andy Fleming wrote:
> Scott, I reverted this patch, and it fixed some build errors:
> 
> 20001122-1.c:1:0: error: E500 and FPRs not supported
> 20010114-2.c:1:0: error: E500 and FPRs not supported
> make[2]: ***
> [/local/afleming/u-boot/build/P2020DS/post/lib_powerpc/fpu/20001122-1.o]
> Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[2]: ***
> [/local/afleming/u-boot/build/P2020DS/post/lib_powerpc/fpu/20010114-2.o]
> Error 1
> make[1]: *** [postdeps] Error 2
> make: *** [/local/afleming/u-boot/build/P2020DS/post/libpost.o] Error  
> 2
> make: INTERNAL: Exiting with 4 jobserver tokens available; should be  
> 3!

Sigh.  Patch coming to use -mcpu=e500mc when appropriate, but...

> Similar errors were seen on all these boards:
> 
> P2041RDB_SRIO_PCIE_BOOT  P5020DS
> P3041DS                  P5020DS_NAND
> P2020DS               P3041DS_NAND             P5020DS_SDCARD
> P2020DS_36BIT         P3041DS_SDCARD           P5020DS_SECURE_BOOT
> P2020DS_DDR2          P3041DS_SECURE_BOOT      P5020DS_SPIFLASH
> P2020DS_SDCARD        P3041DS_SPIFLASH         P5020DS_SRIO_PCIE_BOOT
> P2020DS_SPIFLASH      P3041DS_SRIO_PCIE_BOOT   P5040DS
> P2041RDB              P4080DS                  xpedite520x
> P2041RDB_NAND         P4080DS_SDCARD           xpedite537x
> P2041RDB_SDCARD       P4080DS_SECURE_BOOT      xpedite550x
> P2041RDB_SECURE_BOOT  P4080DS_SPIFLASH
> P2041RDB_SPIFLASH     P4080DS_SRIO_PCIE_BOOT

...not all of these are e500mc derivatives (P2020DS and xpedite).  So  
it seems this patch found a bug in that some e500v2 boards are building  
normal FP code.

-Scott

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

end of thread, other threads:[~2013-01-25  0:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09  1:43 [U-Boot] [PATCH] powerpc/85xx: select -mcpu=8540 to match -Wa, e500 Scott Wood
2013-01-19  1:38 ` [U-Boot] [PATCH v2] " Scott Wood
2013-01-24  8:07   ` Andy Fleming
2013-01-25  0:21     ` Scott Wood

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