mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-20 11:39:25 +00:00
Add SPE extensions support for PowerPC (after a work by Thomas JOURDAN).
Add a PowerPC sample that supports SPE extensions. /trunk/arch/powerpc/functions | 13 13 0 0 + /trunk/arch/powerpc/config.in | 8 8 0 0 + /trunk/patches/gcc/4.3.1/340-make-mno-spe-work-as-expected.patch | 90 90 0 0 ++++ /trunk/samples/powerpc-unknown-linux-gnuspe/crosstool.config | 309 309 0 0 ++++++++++++++ 4 files changed, 420 insertions(+)
This commit is contained in:
parent
ebeba61f44
commit
05781a223c
@ -7,3 +7,11 @@ config ARCH_powerpc
|
||||
help
|
||||
The PowerPC architecture, as defined by:
|
||||
http://www.ibm.com/developerworks/eserver/articles/archguide.html
|
||||
|
||||
config ARCH_POWERPC_SPE
|
||||
bool
|
||||
prompt "Enable SPE support (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
default n
|
||||
help
|
||||
Add support for the Signal Processing Engine.
|
||||
|
@ -6,4 +6,17 @@ CT_DoArchValues () {
|
||||
|
||||
# The kernel ARCH:
|
||||
CT_KERNEL_ARCH=powerpc
|
||||
|
||||
# Add spe in the tuplet if needed
|
||||
case "${CT_LIBC},${CT_ARCH_POWERPC_SPE}" in
|
||||
glibc,|eglibc,) CT_TARGET_SYS=gnu;;
|
||||
glibc,y|eglibc,y) CT_TARGET_SYS=gnuspe;;
|
||||
esac
|
||||
|
||||
# Add extra flags for SPE if needed
|
||||
if [ "${CT_ARCH_POWERPC_SPE}" = "y" ]; then
|
||||
CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe"
|
||||
CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double"
|
||||
CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double"
|
||||
fi
|
||||
}
|
||||
|
15
patches/eglibc/trunk/100-powerpc-private_futex.patch
Normal file
15
patches/eglibc/trunk/100-powerpc-private_futex.patch
Normal file
@ -0,0 +1,15 @@
|
||||
2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
|
||||
|
||||
[BZ 6740]
|
||||
nptl/sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET):
|
||||
Guard sym definition with #ifndef __ASSUME_PRIVATE_FUTEX.
|
||||
|
||||
--- a/nptl/sysdeps/powerpc/tcb-offsets.sym
|
||||
+++ b/nptl/sysdeps/powerpc/tcb-offsets.sym
|
||||
@@ -15,4 +15,6 @@
|
||||
PID thread_offsetof (pid)
|
||||
TID thread_offsetof (tid)
|
||||
POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
|
||||
+#ifndef __ASSUME_PRIVATE_FUTEX
|
||||
PRIVATE_FUTEX_OFFSET thread_offsetof (header.private_futex)
|
||||
+#endif
|
90
patches/gcc/4.3.1/340-make-mno-spe-work-as-expected.patch
Normal file
90
patches/gcc/4.3.1/340-make-mno-spe-work-as-expected.patch
Normal file
@ -0,0 +1,90 @@
|
||||
2008-04-03 Nathan Froyd <froydnj@codesourcery.com>
|
||||
Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* config/rs6000/rs6000.opt (mspe): Remove Var property.
|
||||
(misel): Likewise.
|
||||
* config/rs6000/rs6000.h (rs6000_spe): Declare.
|
||||
(rs6000_isel): Likewise.
|
||||
* config/rs6000/rs6000.c (rs6000_spe): New variable.
|
||||
(rs6000_isel): New variable.
|
||||
(rs6000_handle_option): Handle OPT_mspe and OPT_misel.
|
||||
|
||||
Index: gcc/config/rs6000/rs6000.c
|
||||
===================================================================
|
||||
--- a/gcc/config/rs6000/rs6000.c (revision 134642)
|
||||
+++ b/gcc/config/rs6000/rs6000.c (working copy)
|
||||
@@ -174,9 +174,15 @@ int rs6000_ieeequad;
|
||||
/* Nonzero to use AltiVec ABI. */
|
||||
int rs6000_altivec_abi;
|
||||
|
||||
+/* Nonzero if we want SPE SIMD instructions. */
|
||||
+int rs6000_spe;
|
||||
+
|
||||
/* Nonzero if we want SPE ABI extensions. */
|
||||
int rs6000_spe_abi;
|
||||
|
||||
+/* Nonzero to use isel instructions. */
|
||||
+int rs6000_isel;
|
||||
+
|
||||
/* Nonzero if floating point operations are done in the GPRs. */
|
||||
int rs6000_float_gprs = 0;
|
||||
|
||||
@@ -2177,11 +2183,21 @@ rs6000_handle_option (size_t code, const
|
||||
rs6000_parse_yes_no_option ("vrsave", arg, &(TARGET_ALTIVEC_VRSAVE));
|
||||
break;
|
||||
|
||||
+ case OPT_misel:
|
||||
+ rs6000_explicit_options.isel = true;
|
||||
+ rs6000_isel = value;
|
||||
+ break;
|
||||
+
|
||||
case OPT_misel_:
|
||||
rs6000_explicit_options.isel = true;
|
||||
rs6000_parse_yes_no_option ("isel", arg, &(rs6000_isel));
|
||||
break;
|
||||
|
||||
+ case OPT_mspe:
|
||||
+ rs6000_explicit_options.spe = true;
|
||||
+ rs6000_spe = value;
|
||||
+ break;
|
||||
+
|
||||
case OPT_mspe_:
|
||||
rs6000_explicit_options.spe = true;
|
||||
rs6000_parse_yes_no_option ("spe", arg, &(rs6000_spe));
|
||||
Index: gcc/config/rs6000/rs6000.opt
|
||||
===================================================================
|
||||
--- a/gcc/config/rs6000/rs6000.opt (revision 134642)
|
||||
+++ b/gcc/config/rs6000/rs6000.opt (working copy)
|
||||
@@ -190,7 +190,7 @@ Target RejectNegative Joined
|
||||
-mvrsave=yes/no Deprecated option. Use -mvrsave/-mno-vrsave instead
|
||||
|
||||
misel
|
||||
-Target Var(rs6000_isel)
|
||||
+Target
|
||||
Generate isel instructions
|
||||
|
||||
misel=
|
||||
@@ -198,7 +198,7 @@ Target RejectNegative Joined
|
||||
-misel=yes/no Deprecated option. Use -misel/-mno-isel instead
|
||||
|
||||
mspe
|
||||
-Target Var(rs6000_spe)
|
||||
+Target
|
||||
Generate SPE SIMD instructions on E500
|
||||
|
||||
mpaired
|
||||
Index: gcc/config/rs6000/rs6000.h
|
||||
===================================================================
|
||||
--- a/gcc/config/rs6000/rs6000.h (revision 134642)
|
||||
+++ b/gcc/config/rs6000/rs6000.h (working copy)
|
||||
@@ -367,6 +367,8 @@ extern int rs6000_long_double_type_size;
|
||||
extern int rs6000_ieeequad;
|
||||
extern int rs6000_altivec_abi;
|
||||
extern int rs6000_spe_abi;
|
||||
+extern int rs6000_spe;
|
||||
+extern int rs6000_isel;
|
||||
extern int rs6000_float_gprs;
|
||||
extern int rs6000_alignment_flags;
|
||||
extern const char *rs6000_sched_insert_nops_str;
|
||||
|
||||
|
309
samples/powerpc-unknown-linux-gnuspe/crosstool.config
Normal file
309
samples/powerpc-unknown-linux-gnuspe/crosstool.config
Normal file
@ -0,0 +1,309 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# crosstool-NG version: 1.2.0+svn_trunk@939M
|
||||
# Tue Aug 12 10:25:48 2008
|
||||
#
|
||||
|
||||
#
|
||||
# Paths and misc options
|
||||
#
|
||||
|
||||
#
|
||||
# crosstool-NG behavior
|
||||
#
|
||||
# CT_OBSOLETE is not set
|
||||
CT_EXPERIMENTAL=y
|
||||
# CT_BROKEN is not set
|
||||
# CT_DEBUG_CT is not set
|
||||
|
||||
#
|
||||
# Paths
|
||||
#
|
||||
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
|
||||
CT_SAVE_TARBALLS=y
|
||||
CT_WORK_DIR="${CT_TOP_DIR}/targets"
|
||||
CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
|
||||
CT_INSTALL_DIR="${CT_PREFIX_DIR}"
|
||||
# CT_CUSTOM_PATCH is not set
|
||||
CT_REMOVE_DOCS=y
|
||||
CT_INSTALL_DIR_RO=y
|
||||
|
||||
#
|
||||
# Downloading
|
||||
#
|
||||
# CT_FORCE_DOWNLOAD is not set
|
||||
CT_USE_PROXY=y
|
||||
# CT_PROXY_TYPE_HTTP is not set
|
||||
CT_PROXY_TYPE_SOCKS=y
|
||||
CT_PROXY_TYPE_SOCKS_SYS=y
|
||||
# CT_PROXY_TYPE_SOCKS_AUTO is not set
|
||||
# CT_PROXY_TYPE_SOCKS_4 is not set
|
||||
# CT_PROXY_TYPE_SOCKS_5 is not set
|
||||
CT_PROXY_TYPE="sockssys"
|
||||
# CT_USE_LAN_MIRROR is not set
|
||||
CT_CONNECT_TIMEOUT=10
|
||||
# CT_ONLY_DOWNLOAD is not set
|
||||
|
||||
#
|
||||
# Extracting
|
||||
#
|
||||
# CT_FORCE_EXTRACT is not set
|
||||
CT_OVERIDE_CONFIG_GUESS_SUB=y
|
||||
# CT_ONLY_EXTRACT is not set
|
||||
|
||||
#
|
||||
# Build behavior
|
||||
#
|
||||
CT_PARALLEL_JOBS=1
|
||||
CT_LOAD=0
|
||||
CT_NICE=0
|
||||
CT_USE_PIPES=y
|
||||
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
# CT_LOG_ERROR is not set
|
||||
# CT_LOG_WARN is not set
|
||||
# CT_LOG_INFO is not set
|
||||
CT_LOG_EXTRA=y
|
||||
# CT_LOG_DEBUG is not set
|
||||
# CT_LOG_ALL is not set
|
||||
CT_LOG_LEVEL_MAX="EXTRA"
|
||||
# CT_LOG_SEE_TOOLS_WARN is not set
|
||||
CT_LOG_PROGRESS_BAR=y
|
||||
CT_LOG_TO_FILE=y
|
||||
CT_LOG_FILE_COMPRESS=y
|
||||
|
||||
#
|
||||
# Target options
|
||||
#
|
||||
CT_ARCH="powerpc"
|
||||
# CT_ARCH_SUPPORT_ARCH is not set
|
||||
CT_ARCH_SUPPORT_ABI=y
|
||||
CT_ARCH_SUPPORT_CPU=y
|
||||
CT_ARCH_SUPPORT_TUNE=y
|
||||
# CT_ARCH_SUPPORT_FPU is not set
|
||||
# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
|
||||
# CT_ARCH_DEFAULT_BE is not set
|
||||
# CT_ARCH_DEFAULT_LE is not set
|
||||
CT_ARCH_ABI=""
|
||||
CT_ARCH_CPU="8548"
|
||||
CT_ARCH_TUNE="8548"
|
||||
CT_ARCH_FLOAT_HW=y
|
||||
# CT_ARCH_FLOAT_SW is not set
|
||||
CT_TARGET_CFLAGS=""
|
||||
CT_TARGET_LDFLAGS=""
|
||||
|
||||
#
|
||||
# General target options
|
||||
#
|
||||
# CT_ARCH_alpha is not set
|
||||
# CT_ARCH_arm is not set
|
||||
# CT_ARCH_ia64 is not set
|
||||
# CT_ARCH_mips is not set
|
||||
CT_ARCH_powerpc=y
|
||||
CT_ARCH_POWERPC_SPE=y
|
||||
# CT_ARCH_sh is not set
|
||||
# CT_ARCH_x86 is not set
|
||||
# CT_ARCH_x86_64 is not set
|
||||
|
||||
#
|
||||
# Target optimisations
|
||||
#
|
||||
|
||||
#
|
||||
# Toolchain options
|
||||
#
|
||||
|
||||
#
|
||||
# General toolchain options
|
||||
#
|
||||
CT_USE_SYSROOT=y
|
||||
CT_SHARED_LIBS=y
|
||||
CT_THREADS_NPTL=y
|
||||
# CT_THREADS_LINUXTHREADS is not set
|
||||
# CT_THREADS_NONE is not set
|
||||
CT_THREADS="nptl"
|
||||
CT_TARGET_VENDOR="unknown"
|
||||
CT_TARGET_ALIAS_SED_EXPR=""
|
||||
CT_TARGET_ALIAS=""
|
||||
|
||||
#
|
||||
# Toolchain type
|
||||
#
|
||||
# CT_NATIVE is not set
|
||||
CT_CROSS=y
|
||||
# CT_CROSS_NATIVE is not set
|
||||
# CT_CANADIAN is not set
|
||||
CT_TOOLCHAIN_TYPE="cross"
|
||||
CT_BUILD=""
|
||||
CT_CC_NATIVE="gcc"
|
||||
|
||||
#
|
||||
# Kernel
|
||||
#
|
||||
CT_KERNEL_LINUX=y
|
||||
CT_KERNEL_VERSION="2.6.26.2"
|
||||
CT_KERNEL_LINUX_HEADERS_INSTALL=y
|
||||
# CT_KERNEL_LINUX_HEADERS_SANITISED is not set
|
||||
# CT_KERNEL_LINUX_HEADERS_COPY is not set
|
||||
# CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR is not set
|
||||
CT_KERNEL="linux"
|
||||
CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
|
||||
# CT_KERNEL_INSTALL_V_2_6_18_8 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_19_7 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_20_21 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_21_7 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_22_19 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_23_17 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_24 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_24_1 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_24_2 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_24_3 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_24_4 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_24_5 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_24_6 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_24_7 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_1 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_2 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_3 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_4 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_5 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_6 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_7 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_8 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_9 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_10 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_11 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_12 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_13 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_14 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_25_15 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_26 is not set
|
||||
# CT_KERNEL_INSTALL_V_2_6_26_1 is not set
|
||||
CT_KERNEL_INSTALL_V_2_6_26_2=y
|
||||
CT_KERNEL_LINUX_HEADERS_INSTALL_CHECK=y
|
||||
CT_KERNEL_LINUX_VERBOSITY_0=y
|
||||
# CT_KERNEL_LINUX_VERBOSITY_1 is not set
|
||||
# CT_KERNEL_LINUX_VERBOSITY_2 is not set
|
||||
CT_KERNEL_LINUX_VERBOSE_LEVEL=0
|
||||
# CT_KERNEL_LINUX_NEEDS_CONFIG is not set
|
||||
|
||||
#
|
||||
# GMP and MPFR
|
||||
#
|
||||
CT_GMP_MPFR=y
|
||||
CT_GMP_MPFR_TARGET=y
|
||||
CT_GMP_V_4_2_2=y
|
||||
CT_GMP_VERSION="4.2.2"
|
||||
CT_GMP_CHECK=y
|
||||
CT_MPFR_V_2_3_1=y
|
||||
CT_MPFR_VERSION="2.3.1"
|
||||
CT_MPFR_CHECK=y
|
||||
|
||||
#
|
||||
# binutils
|
||||
#
|
||||
CT_BINUTILS_VERSION="2.18.50.0.8"
|
||||
# CT_BINUTILS_V_2_14 is not set
|
||||
# CT_BINUTILS_V_2_15 is not set
|
||||
# CT_BINUTILS_V_2_16_1 is not set
|
||||
# CT_BINUTILS_V_2_17 is not set
|
||||
# CT_BINUTILS_V_2_18 is not set
|
||||
# CT_BINUTILS_V_2_18_50_0_4 is not set
|
||||
# CT_BINUTILS_V_2_18_50_0_6 is not set
|
||||
# CT_BINUTILS_V_2_18_50_0_7 is not set
|
||||
CT_BINUTILS_V_2_18_50_0_8=y
|
||||
CT_BINUTILS_EXTRA_CONFIG=""
|
||||
CT_BINUTILS_FOR_TARGET=y
|
||||
CT_BINUTILS_FOR_TARGET_IBERTY=y
|
||||
CT_BINUTILS_FOR_TARGET_BFD=y
|
||||
|
||||
#
|
||||
# C compiler
|
||||
#
|
||||
CT_CC_GCC=y
|
||||
CT_CC_VERSION="4.3.1"
|
||||
CT_CC="gcc"
|
||||
# CT_CC_V_2_95_3 is not set
|
||||
# CT_CC_V_3_2_3 is not set
|
||||
# CT_CC_V_3_3_6 is not set
|
||||
# CT_CC_V_3_4_6 is not set
|
||||
# CT_CC_V_4_0_0 is not set
|
||||
# CT_CC_V_4_0_1 is not set
|
||||
# CT_CC_V_4_0_2 is not set
|
||||
# CT_CC_V_4_0_3 is not set
|
||||
# CT_CC_V_4_0_4 is not set
|
||||
# CT_CC_V_4_1_0 is not set
|
||||
# CT_CC_V_4_1_1 is not set
|
||||
# CT_CC_V_4_1_2 is not set
|
||||
# CT_CC_V_4_2_0 is not set
|
||||
# CT_CC_V_4_2_1 is not set
|
||||
# CT_CC_V_4_2_2 is not set
|
||||
# CT_CC_V_4_2_3 is not set
|
||||
# CT_CC_V_4_2_4 is not set
|
||||
# CT_CC_V_4_3_0 is not set
|
||||
CT_CC_V_4_3_1=y
|
||||
CT_CC_GCC_4_3_or_later=y
|
||||
CT_CC_CXA_ATEXIT=y
|
||||
CT_CC_SJLJ_EXCEPTIONS_CONFIGURE=y
|
||||
# CT_CC_SJLJ_EXCEPTIONS_USE is not set
|
||||
# CT_CC_SJLJ_EXCEPTIONS_DONT_USE is not set
|
||||
CT_CC_CORE_EXTRA_CONFIG=""
|
||||
CT_CC_EXTRA_CONFIG=""
|
||||
CT_CC_PKGVERSION="crosstool-NG-${CT_VERSION}"
|
||||
CT_CC_BUGURL=""
|
||||
CT_CC_SUPPORT_CXX=y
|
||||
CT_CC_SUPPORT_FORTRAN=y
|
||||
CT_CC_SUPPORT_JAVA=y
|
||||
CT_CC_SUPPORT_ADA=y
|
||||
CT_CC_SUPPORT_OBJC=y
|
||||
CT_CC_SUPPORT_OBJCXX=y
|
||||
|
||||
#
|
||||
# Additional supported languages:
|
||||
#
|
||||
CT_CC_LANG_CXX=y
|
||||
# CT_CC_LANG_FORTRAN is not set
|
||||
# CT_CC_LANG_JAVA is not set
|
||||
# CT_CC_LANG_ADA is not set
|
||||
# CT_CC_LANG_OBJC is not set
|
||||
# CT_CC_LANG_OBJCXX is not set
|
||||
CT_CC_LANG_OTHERS=""
|
||||
|
||||
#
|
||||
# C-library
|
||||
#
|
||||
# CT_LIBC_GLIBC is not set
|
||||
CT_LIBC_EGLIBC=y
|
||||
# CT_LIBC_UCLIBC is not set
|
||||
CT_LIBC_VERSION="trunk"
|
||||
CT_LIBC="eglibc"
|
||||
CT_LIBC_SUPPORT_NPTL=y
|
||||
CT_LIBC_SUPPORT_LINUXTHREADS=y
|
||||
CT_LIBC_EXTRA_CC_ARGS=""
|
||||
# CT_LIBC_ADDONS is not set
|
||||
CT_EGLIBC_V_TRUNK=y
|
||||
# CT_EGLIBC_V_2_5 is not set
|
||||
# CT_EGLIBC_V_2_6 is not set
|
||||
# CT_EGLIBC_V_2_7 is not set
|
||||
# CT_EGLIBC_V_2_8 is not set
|
||||
CT_EGLIBC_REVISION="HEAD"
|
||||
CT_EGLIBC_CHECKOUT=y
|
||||
CT_LIBC_EGLIBC_EXTRA_CONFIG=""
|
||||
CT_LIBC_EGLIBC_EXTRA_CFLAGS=""
|
||||
CT_LIBC_EGLIBC_USE_PORTS=y
|
||||
|
||||
#
|
||||
# Tools facilities
|
||||
#
|
||||
# CT_SSTRIP is not set
|
||||
|
||||
#
|
||||
# Debug facilities
|
||||
#
|
||||
# CT_DMALLOC is not set
|
||||
# CT_DUMA is not set
|
||||
# CT_GDB is not set
|
||||
# CT_STRACE is not set
|
Loading…
Reference in New Issue
Block a user