From patchwork Sat Jan 19 01:38:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v2] powerpc/85xx: select -mcpu=8540 to match -Wa, e500 Date: Fri, 18 Jan 2013 15:38:16 -0000 From: Scott Wood X-Patchwork-Id: 213770 Message-Id: <20130119013816.GA10517@buserror.net> To: Cc: u-boot@lists.denx.de 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 --- 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