Author: mcayland Date: Wed Feb 3 21:46:31 2016 New Revision: 1378 URL: http://tracker.coreboot.org/trac/openbios/changeset/1378
Log: ppc: force target cpu
With gcc-5.2 default target is power7.
- For 32-bit PPC builds set the target cpu to 604 in order to support PReP as well as Macs in the future.
- For 64-bit PPC builds set the target cpu to 970 as used in 64-bit Macs but disable altivec.
Based on an original patch by Laurent Vivier laurent@vivier.eu.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/config/scripts/switch-arch
Modified: trunk/openbios-devel/config/scripts/switch-arch ============================================================================== --- trunk/openbios-devel/config/scripts/switch-arch Fri Jan 8 13:09:48 2016 (r1377) +++ trunk/openbios-devel/config/scripts/switch-arch Wed Feb 3 21:46:31 2016 (r1378) @@ -265,7 +265,8 @@ ppc) select_prefix powerpc powerpc64 if [ "$unix" = "no" ]; then - CFLAGS="-m32 -msoft-float -fno-builtin-bcopy -fno-builtin-log2" + # 604 cpu includes support for PReP as well as Mac + CFLAGS="-m32 -mcpu=604 -msoft-float -fno-builtin-bcopy -fno-builtin-log2" AS_FLAGS="-m32" else CFLAGS="-fno-builtin" @@ -275,7 +276,9 @@
ppc64) select_prefix powerpc64 - CFLAGS="-Wa,-a64 -m64 -msoft-float -fno-builtin" + + # 970 cpu is used in all 64-bit Macs but disable altivec + CFLAGS="-mcpu=970 -mno-altivec -Wa,-a64 -m64 -msoft-float -fno-builtin" AS_FLAGS="-Wa,-a64" ;;