1.1 --- a/config/arch/powerpc.in.2 Fri Sep 16 17:49:28 2011 +0200
1.2 +++ b/config/arch/powerpc.in.2 Sat Sep 17 14:30:52 2011 +0200
1.3 @@ -1,8 +1,32 @@
1.4 # powerpc specific configuration file
1.5
1.6 -config ARCH_POWERPC_SPE
1.7 +config ARCH_powerpc_ABI
1.8 + string
1.9 + default "" if ARCH_powerpc_ABI_DEFAULT
1.10 + default "eabi" if ARCH_powerpc_ABI_EABI
1.11 + default "spe" if ARCH_powerpc_ABI_SPE
1.12 +
1.13 +choice
1.14 bool
1.15 - prompt "Enable SPE support"
1.16 + prompt "ABI"
1.17 + default ARCH_powerpc_ABI_DEFAULT
1.18 +
1.19 +config ARCH_powerpc_ABI_DEFAULT
1.20 + bool
1.21 + prompt "default"
1.22 + help
1.23 + The default ABI (System V.4).
1.24 +
1.25 +config ARCH_powerpc_ABI_EABI
1.26 + bool
1.27 + prompt "EABI"
1.28 + depends on BARE_METAL
1.29 + help
1.30 + The Embedded ABI (stack alignment of 8 bytes, etc).
1.31 +
1.32 +config ARCH_powerpc_ABI_SPE
1.33 + bool
1.34 + prompt "SPE"
1.35 help
1.36 Add support for the Signal Processing Engine. This will set up
1.37 the toolchain so that it supports the SPE ABI extensions. This
1.38 @@ -14,3 +38,5 @@
1.39 will also automatically add "-mabi=spe -mspe" to your TARGET_CFLAGS,
1.40 and "--enable-e500_double" to your CC_EXTRA_CONFIG_ARRAY, so you
1.41 do not need to explicitly add them.
1.42 +
1.43 +endchoice
2.1 --- a/scripts/build/arch/powerpc.sh Fri Sep 16 17:49:28 2011 +0200
2.2 +++ b/scripts/build/arch/powerpc.sh Sat Sep 17 14:30:52 2011 +0200
2.3 @@ -6,14 +6,20 @@
2.4 CT_TARGET_ARCH="powerpc64"
2.5 fi
2.6
2.7 - # Add spe in the tuple if needed
2.8 - case "${CT_LIBC},${CT_ARCH_POWERPC_SPE}" in
2.9 - glibc,|eglibc,) CT_TARGET_SYS=gnu;;
2.10 - glibc,y|eglibc,y) CT_TARGET_SYS=gnuspe;;
2.11 + CT_TARGET_SYS="gnu"
2.12 + case "${CT_ARCH_powerpc_ABI}" in
2.13 + "") ;;
2.14 + eabi) CT_TARGET_SYS="eabi";;
2.15 + spe)
2.16 + case "${CT_LIBC}" in
2.17 + glibc|eglibc) CT_TARGET_SYS="gnuspe";;
2.18 + *) CT_TARGET_SYS="spe";
2.19 + esac
2.20 + ;;
2.21 esac
2.22
2.23 # Add extra flags for SPE if needed
2.24 - if [ "${CT_ARCH_POWERPC_SPE}" = "y" ]; then
2.25 + if [ "${CT_ARCH_powerpc_ABI_SPE}" = "y" ]; then
2.26 CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe"
2.27 CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double"
2.28 CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double"