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 --- openbios-devel/config/scripts/switch-arch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/openbios-devel/config/scripts/switch-arch b/openbios-devel/config/scripts/switch-arch index 38d263d..ab3b4ce 100755 --- a/openbios-devel/config/scripts/switch-arch +++ b/openbios-devel/config/scripts/switch-arch @@ -265,7 +265,8 @@ for ARCH in $arch_list; do 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 @@ for ARCH in $arch_list; do
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" ;;