Finally enable the PPC-8xx memset workaround, by Nye Liu.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Oct 29 21:20:23 2008 +0000 (2008-10-29)
changeset 1016a059741f7bd4
parent 1015 d9a132dcd329
child 1017 34267fb0912e
Finally enable the PPC-8xx memset workaround, by Nye Liu.
http://sourceware.org/ml/crossgcc/2008-10/msg00094.html

/trunk/scripts/build/libc/glibc.sh | 9 9 0 0 +
/trunk/patches/glibc/2.7/290-powerpc-8xx-CPU15-errata.patch | 22 19 3 0 +
/trunk/samples/powerpc-860-linux-gnu/crosstool.config | 344 344 0 0 +++++++++++++++++++
/trunk/samples/powerpc-860-linux-gnu/reported.by | 3 3 0 0 +
4 files changed, 375 insertions(+), 3 deletions(-)
patches/glibc/2.7/290-powerpc-8xx-CPU15-errata.patch
samples/powerpc-860-linux-gnu/crosstool.config
samples/powerpc-860-linux-gnu/reported.by
scripts/build/libc/glibc.sh
     1.1 --- a/patches/glibc/2.7/290-powerpc-8xx-CPU15-errata.patch	Wed Oct 29 18:34:14 2008 +0000
     1.2 +++ b/patches/glibc/2.7/290-powerpc-8xx-CPU15-errata.patch	Wed Oct 29 21:20:23 2008 +0000
     1.3 @@ -7,7 +7,7 @@
     1.4   dcbX bug). The source of the problem is sysdeps/powerpc/power3/memset.S
     1.5  
     1.6  --- glibc-2.7/sysdeps/powerpc/powerpc32/memset.S	2007-03-26 13:09:07.000000000 -0700
     1.7 -+++ glibc-2.7/sysdeps/powerpc/powerpc32/memset.S.new	2008-10-23 12:20:04.000000000 -0700
     1.8 ++++ glibc-2.7/sysdeps/powerpc/powerpc32/memset.S.new	2008-10-23 20:28:52.000000000 -0700
     1.9  @@ -112,11 +112,13 @@
    1.10   	clrrwi.	rALIGN, rLEN, 5
    1.11   	mtcrf	0x01, rLEN	/* 40th instruction from .align */
    1.12 @@ -22,7 +22,23 @@
    1.13   
    1.14   /* Store blocks of 32-bytes (256-bits) starting on a 32-byte boundary.
    1.15      Can't assume that rCHR is zero or that the cache line size is either
    1.16 -@@ -248,6 +250,7 @@
    1.17 +@@ -158,6 +160,7 @@
    1.18 + 	add	rMEMP, rMEMP, rALIGN
    1.19 + 	b	L(medium_tail2)	/* 72nd instruction from .align */
    1.20 + 
    1.21 ++#ifndef BROKEN_PPC_8xx_CPU15
    1.22 + 	.align	5
    1.23 + 	nop
    1.24 + /* Clear cache lines of memory in 128-byte chunks.
    1.25 +@@ -191,6 +194,7 @@
    1.26 + 	bdnz	L(zloop)
    1.27 + 	beqlr	cr5
    1.28 + 	b	L(medium_tail2)
    1.29 ++#endif /* ! BROKEN_PPC_8xx_CPU15 */
    1.30 + 
    1.31 + 	.align	5
    1.32 + L(small):
    1.33 +@@ -248,6 +252,7 @@
    1.34   	stw	rCHR, -8(rMEMP)
    1.35   	blr
    1.36   
    1.37 @@ -30,7 +46,7 @@
    1.38   L(checklinesize):
    1.39   #ifdef SHARED
    1.40   	mflr	rTMP
    1.41 -@@ -329,6 +332,7 @@
    1.42 +@@ -329,6 +334,7 @@
    1.43   L(handletail32):
    1.44   	clrrwi.	rALIGN, rLEN, 5
    1.45   	b	L(nondcbz)
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/samples/powerpc-860-linux-gnu/crosstool.config	Wed Oct 29 21:20:23 2008 +0000
     2.3 @@ -0,0 +1,344 @@
     2.4 +#
     2.5 +# Automatically generated make config: don't edit
     2.6 +# crosstool-NG version: 1.2.0+svn_trunk@1158M
     2.7 +# Mon Oct 27 12:31:20 2008
     2.8 +#
     2.9 +
    2.10 +#
    2.11 +# Paths and misc options
    2.12 +#
    2.13 +
    2.14 +#
    2.15 +# crosstool-NG behavior
    2.16 +#
    2.17 +# CT_OBSOLETE is not set
    2.18 +CT_EXPERIMENTAL=y
    2.19 +CT_DEBUG_CT=y
    2.20 +# CT_DEBUG_PAUSE_STEPS is not set
    2.21 +CT_DEBUG_CT_SAVE_STEPS=y
    2.22 +CT_DEBUG_CT_SAVE_STEPS_GZIP=y
    2.23 +
    2.24 +#
    2.25 +# Paths
    2.26 +#
    2.27 +CT_LOCAL_TARBALLS_DIR="${HOME}/src"
    2.28 +CT_SAVE_TARBALLS=y
    2.29 +CT_WORK_DIR="${CT_TOP_DIR}/targets"
    2.30 +CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
    2.31 +CT_INSTALL_DIR="${CT_PREFIX_DIR}"
    2.32 +# CT_CUSTOM_PATCH is not set
    2.33 +CT_REMOVE_DOCS=y
    2.34 +# CT_INSTALL_DIR_RO is not set
    2.35 +
    2.36 +#
    2.37 +# Downloading
    2.38 +#
    2.39 +# CT_FORCE_DOWNLOAD is not set
    2.40 +# CT_USE_PROXY is not set
    2.41 +CT_PROXY_TYPE="none"
    2.42 +# CT_USE_LAN_MIRROR is not set
    2.43 +CT_CONNECT_TIMEOUT=10
    2.44 +# CT_ONLY_DOWNLOAD is not set
    2.45 +
    2.46 +#
    2.47 +# Extracting
    2.48 +#
    2.49 +# CT_FORCE_EXTRACT is not set
    2.50 +CT_OVERIDE_CONFIG_GUESS_SUB=y
    2.51 +# CT_ONLY_EXTRACT is not set
    2.52 +
    2.53 +#
    2.54 +# Build behavior
    2.55 +#
    2.56 +CT_PARALLEL_JOBS=1
    2.57 +CT_LOAD=0
    2.58 +CT_NICE=0
    2.59 +CT_USE_PIPES=y
    2.60 +# CT_CONFIG_SHELL_ASH is not set
    2.61 +
    2.62 +#
    2.63 +# Logging
    2.64 +#
    2.65 +# CT_LOG_ERROR is not set
    2.66 +# CT_LOG_WARN is not set
    2.67 +# CT_LOG_INFO is not set
    2.68 +CT_LOG_EXTRA=y
    2.69 +# CT_LOG_DEBUG is not set
    2.70 +# CT_LOG_ALL is not set
    2.71 +CT_LOG_LEVEL_MAX="EXTRA"
    2.72 +# CT_LOG_SEE_TOOLS_WARN is not set
    2.73 +CT_LOG_PROGRESS_BAR=y
    2.74 +CT_LOG_TO_FILE=y
    2.75 +CT_LOG_FILE_COMPRESS=y
    2.76 +
    2.77 +#
    2.78 +# Target options
    2.79 +#
    2.80 +CT_ARCH="powerpc"
    2.81 +# CT_ARCH_SUPPORT_ARCH is not set
    2.82 +CT_ARCH_SUPPORT_ABI=y
    2.83 +CT_ARCH_SUPPORT_CPU=y
    2.84 +CT_ARCH_SUPPORT_TUNE=y
    2.85 +# CT_ARCH_SUPPORT_FPU is not set
    2.86 +# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
    2.87 +# CT_ARCH_DEFAULT_BE is not set
    2.88 +# CT_ARCH_DEFAULT_LE is not set
    2.89 +CT_ARCH_ABI=""
    2.90 +CT_ARCH_CPU="860"
    2.91 +CT_ARCH_TUNE=""
    2.92 +# CT_ARCH_FLOAT_HW is not set
    2.93 +CT_ARCH_FLOAT_SW=y
    2.94 +CT_TARGET_CFLAGS=""
    2.95 +CT_TARGET_LDFLAGS=""
    2.96 +
    2.97 +#
    2.98 +# General target options
    2.99 +#
   2.100 +# CT_ARCH_alpha is not set
   2.101 +# CT_ARCH_arm is not set
   2.102 +# CT_ARCH_ia64 is not set
   2.103 +# CT_ARCH_mips is not set
   2.104 +CT_ARCH_powerpc=y
   2.105 +# CT_ARCH_sh is not set
   2.106 +# CT_ARCH_x86 is not set
   2.107 +# CT_ARCH_x86_64 is not set
   2.108 +# CT_ARCH_POWERPC_SPE is not set
   2.109 +
   2.110 +#
   2.111 +# Target optimisations
   2.112 +#
   2.113 +
   2.114 +#
   2.115 +# Toolchain options
   2.116 +#
   2.117 +
   2.118 +#
   2.119 +# General toolchain options
   2.120 +#
   2.121 +CT_USE_SYSROOT=y
   2.122 +CT_SHARED_LIBS=y
   2.123 +CT_TARGET_VENDOR="860"
   2.124 +CT_TARGET_ALIAS_SED_EXPR=""
   2.125 +CT_TARGET_ALIAS=""
   2.126 +
   2.127 +#
   2.128 +# Toolchain type
   2.129 +#
   2.130 +# CT_NATIVE is not set
   2.131 +CT_CROSS=y
   2.132 +# CT_CROSS_NATIVE is not set
   2.133 +# CT_CANADIAN is not set
   2.134 +CT_TOOLCHAIN_TYPE="cross"
   2.135 +CT_BUILD=""
   2.136 +CT_CC_NATIVE="gcc"
   2.137 +
   2.138 +#
   2.139 +# Operating System
   2.140 +#
   2.141 +# CT_BARE_METAL is not set
   2.142 +CT_KERNEL="linux"
   2.143 +CT_KERNEL_VERSION="2.6.26"
   2.144 +# CT_KERNEL_bare_metal is not set
   2.145 +CT_KERNEL_linux=y
   2.146 +CT_KERNEL_LINUX_INSTALL=y
   2.147 +CT_KERNEL_LINUX_INSTALL_CHECK=y
   2.148 +# CT_KERNEL_V_2_6_18_8 is not set
   2.149 +# CT_KERNEL_V_2_6_19_7 is not set
   2.150 +# CT_KERNEL_V_2_6_20_21 is not set
   2.151 +# CT_KERNEL_V_2_6_21_7 is not set
   2.152 +# CT_KERNEL_V_2_6_22_19 is not set
   2.153 +# CT_KERNEL_V_2_6_23_17 is not set
   2.154 +# CT_KERNEL_V_2_6_24_7 is not set
   2.155 +# CT_KERNEL_V_2_6_25_19 is not set
   2.156 +CT_KERNEL_V_2_6_26=y
   2.157 +# CT_KERNEL_V_2_6_26_1 is not set
   2.158 +# CT_KERNEL_V_2_6_26_2 is not set
   2.159 +# CT_KERNEL_V_2_6_26_3 is not set
   2.160 +# CT_KERNEL_V_2_6_26_4 is not set
   2.161 +# CT_KERNEL_V_2_6_26_5 is not set
   2.162 +# CT_KERNEL_V_2_6_26_6 is not set
   2.163 +# CT_KERNEL_V_2_6_26_7 is not set
   2.164 +# CT_KERNEL_V_2_6_27 is not set
   2.165 +# CT_KERNEL_V_2_6_27_1 is not set
   2.166 +# CT_KERNEL_V_2_6_27_2 is not set
   2.167 +# CT_KERNEL_V_2_6_27_3 is not set
   2.168 +CT_KERNEL_LINUX_VERBOSITY_0=y
   2.169 +# CT_KERNEL_LINUX_VERBOSITY_1 is not set
   2.170 +# CT_KERNEL_LINUX_VERBOSITY_2 is not set
   2.171 +CT_KERNEL_LINUX_VERBOSE_LEVEL=0
   2.172 +# CT_KERNEL_LINUX_USE_CUSTOM_DIR is not set
   2.173 +
   2.174 +#
   2.175 +# GMP and MPFR
   2.176 +#
   2.177 +CT_GMP_MPFR=y
   2.178 +CT_GMP_MPFR_TARGET=y
   2.179 +# CT_GMP_V_4_2_2 is not set
   2.180 +CT_GMP_V_4_2_4=y
   2.181 +CT_GMP_VERSION="4.2.4"
   2.182 +CT_GMP_CHECK=y
   2.183 +# CT_MPFR_V_2_3_1 is not set
   2.184 +CT_MPFR_V_2_3_2=y
   2.185 +CT_MPFR_VERSION="2.3.2"
   2.186 +CT_MPFR_CHECK=y
   2.187 +
   2.188 +#
   2.189 +# binutils
   2.190 +#
   2.191 +CT_BINUTILS_VERSION="2.19.50.0.1"
   2.192 +# CT_BINUTILS_V_2_14 is not set
   2.193 +# CT_BINUTILS_V_2_15 is not set
   2.194 +# CT_BINUTILS_V_2_16_1 is not set
   2.195 +# CT_BINUTILS_V_2_17 is not set
   2.196 +# CT_BINUTILS_V_2_18 is not set
   2.197 +# CT_BINUTILS_V_2_18_50_0_4 is not set
   2.198 +# CT_BINUTILS_V_2_18_50_0_6 is not set
   2.199 +# CT_BINUTILS_V_2_18_50_0_7 is not set
   2.200 +# CT_BINUTILS_V_2_18_50_0_8 is not set
   2.201 +# CT_BINUTILS_V_2_18_50_0_9 is not set
   2.202 +# CT_BINUTILS_V_2_18_90 is not set
   2.203 +# CT_BINUTILS_V_2_18_91 is not set
   2.204 +# CT_BINUTILS_V_2_18_92 is not set
   2.205 +# CT_BINUTILS_V_2_18_93 is not set
   2.206 +CT_BINUTILS_V_2_19_50_0_1=y
   2.207 +CT_BINUTILS_EXTRA_CONFIG=""
   2.208 +CT_BINUTILS_FOR_TARGET=y
   2.209 +CT_BINUTILS_FOR_TARGET_IBERTY=y
   2.210 +CT_BINUTILS_FOR_TARGET_BFD=y
   2.211 +
   2.212 +#
   2.213 +# C compiler
   2.214 +#
   2.215 +CT_CC="gcc"
   2.216 +CT_CC_VERSION="4.3.2"
   2.217 +CT_CC_gcc=y
   2.218 +# CT_CC_V_2_95_3 is not set
   2.219 +# CT_CC_V_3_2_3 is not set
   2.220 +# CT_CC_V_3_3_6 is not set
   2.221 +# CT_CC_V_3_4_6 is not set
   2.222 +# CT_CC_V_4_0_0 is not set
   2.223 +# CT_CC_V_4_0_1 is not set
   2.224 +# CT_CC_V_4_0_2 is not set
   2.225 +# CT_CC_V_4_0_3 is not set
   2.226 +# CT_CC_V_4_0_4 is not set
   2.227 +# CT_CC_V_4_1_0 is not set
   2.228 +# CT_CC_V_4_1_1 is not set
   2.229 +# CT_CC_V_4_1_2 is not set
   2.230 +# CT_CC_V_4_2_0 is not set
   2.231 +# CT_CC_V_4_2_1 is not set
   2.232 +# CT_CC_V_4_2_2 is not set
   2.233 +# CT_CC_V_4_2_3 is not set
   2.234 +# CT_CC_V_4_2_4 is not set
   2.235 +# CT_CC_V_4_3_0 is not set
   2.236 +# CT_CC_V_4_3_1 is not set
   2.237 +CT_CC_V_4_3_2=y
   2.238 +CT_CC_GCC_4_3_or_later=y
   2.239 +CT_CC_CXA_ATEXIT=y
   2.240 +CT_CC_SJLJ_EXCEPTIONS_CONFIGURE=y
   2.241 +# CT_CC_SJLJ_EXCEPTIONS_USE is not set
   2.242 +# CT_CC_SJLJ_EXCEPTIONS_DONT_USE is not set
   2.243 +CT_CC_CORE_EXTRA_CONFIG=""
   2.244 +CT_CC_EXTRA_CONFIG="--with-cpu=860 --enable-cxx-flags=-mcpu=860 --with-float=soft --enable-cxx-flags=-msoft-float"
   2.245 +CT_CC_PKGVERSION="crosstool-NG-${CT_VERSION}"
   2.246 +CT_CC_BUGURL=""
   2.247 +CT_CC_SUPPORT_CXX=y
   2.248 +CT_CC_SUPPORT_FORTRAN=y
   2.249 +CT_CC_SUPPORT_JAVA=y
   2.250 +CT_CC_SUPPORT_ADA=y
   2.251 +CT_CC_SUPPORT_OBJC=y
   2.252 +CT_CC_SUPPORT_OBJCXX=y
   2.253 +
   2.254 +#
   2.255 +# Additional supported languages:
   2.256 +#
   2.257 +CT_CC_LANG_CXX=y
   2.258 +CT_CC_LANG_FORTRAN=y
   2.259 +# CT_CC_LANG_JAVA is not set
   2.260 +# CT_CC_LANG_ADA is not set
   2.261 +# CT_CC_LANG_OBJC is not set
   2.262 +# CT_CC_LANG_OBJCXX is not set
   2.263 +CT_CC_LANG_OTHERS=""
   2.264 +CT_LIBC="glibc"
   2.265 +
   2.266 +#
   2.267 +# C-library
   2.268 +#
   2.269 +CT_LIBC_VERSION="2.7"
   2.270 +# CT_LIBC_eglibc is not set
   2.271 +CT_LIBC_glibc=y
   2.272 +# CT_LIBC_uClibc is not set
   2.273 +# CT_LIBC_V_2_3_6 is not set
   2.274 +# CT_LIBC_V_2_5 is not set
   2.275 +# CT_LIBC_V_2_5_1 is not set
   2.276 +# CT_LIBC_V_2_6 is not set
   2.277 +# CT_LIBC_V_2_6_1 is not set
   2.278 +CT_LIBC_V_2_7=y
   2.279 +# CT_LIBC_V_LATEST is not set
   2.280 +# CT_LIBC_V_date is not set
   2.281 +
   2.282 +#
   2.283 +# Common C library options
   2.284 +#
   2.285 +CT_LIBC_SUPPORT_NPTL=y
   2.286 +CT_LIBC_SUPPORT_LINUXTHREADS=y
   2.287 +CT_THREADS="nptl"
   2.288 +CT_THREADS_NPTL=y
   2.289 +# CT_THREADS_LINUXTHREADS is not set
   2.290 +# CT_THREADS_NONE is not set
   2.291 +
   2.292 +#
   2.293 +# glibc/eglibc common options
   2.294 +#
   2.295 +CT_LIBC_GLIBC_EXTRA_CONFIG="--without-fp"
   2.296 +CT_LIBC_GLIBC_EXTRA_CFLAGS=""
   2.297 +CT_LIBC_EXTRA_CC_ARGS=""
   2.298 +CT_LIBC_GLIBC_USE_PORTS=y
   2.299 +CT_LIBC_ADDONS_LIST=""
   2.300 +# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set
   2.301 +CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
   2.302 +# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
   2.303 +CT_LIBC_GLIBC_MIN_KERNEL="2.6.26"
   2.304 +
   2.305 +#
   2.306 +# Tools facilities
   2.307 +#
   2.308 +# CT_TOOL_libelf is not set
   2.309 +# CT_TOOL_sstrip is not set
   2.310 +
   2.311 +#
   2.312 +# Debug facilities
   2.313 +#
   2.314 +# CT_DEBUG_dmalloc is not set
   2.315 +# CT_DEBUG_duma is not set
   2.316 +CT_DEBUG_gdb=y
   2.317 +CT_GDB_CROSS=y
   2.318 +# CT_GDB_CROSS_STATIC is not set
   2.319 +# CT_GDB_CROSS_INSIGHT is not set
   2.320 +CT_GDB_NATIVE=y
   2.321 +# CT_GDB_NATIVE_STATIC is not set
   2.322 +CT_GDB_NATIVE_USE_GMP_MPFR=y
   2.323 +CT_GDB_GDBSERVER=y
   2.324 +# CT_GDB_GDBSERVER_STATIC is not set
   2.325 +# CT_GDB_V_6_4 is not set
   2.326 +# CT_GDB_V_6_5 is not set
   2.327 +# CT_GDB_V_6_6 is not set
   2.328 +# CT_GDB_V_6_7 is not set
   2.329 +# CT_GDB_V_6_7_1 is not set
   2.330 +CT_GDB_V_6_8=y
   2.331 +# CT_GDB_V_snapshot is not set
   2.332 +CT_GDB_VERSION="6.8"
   2.333 +
   2.334 +#
   2.335 +# Native gdb needs the ncurses library on the target
   2.336 +#
   2.337 +CT_NCURSES_V_5_6=y
   2.338 +CT_NCURSES_VERSION="5.6"
   2.339 +# CT_DEBUG_ltrace is not set
   2.340 +CT_DEBUG_strace=y
   2.341 +# CT_STRACE_V_4_5 is not set
   2.342 +# CT_STRACE_V_4_5_14 is not set
   2.343 +# CT_STRACE_V_4_5_15 is not set
   2.344 +# CT_STRACE_V_4_5_16 is not set
   2.345 +CT_STRACE_V_4_5_17=y
   2.346 +# CT_STRACE_V_4_5_18 is not set
   2.347 +CT_STRACE_VERSION="4.5.17"
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/samples/powerpc-860-linux-gnu/reported.by	Wed Oct 29 21:20:23 2008 +0000
     3.3 @@ -0,0 +1,3 @@
     3.4 +reporter_name="Nye Liu"
     3.5 +reporter_url="http://sourceware.org/ml/crossgcc/2008-10/msg00046.html"
     3.6 +reporter_comment=""
     4.1 --- a/scripts/build/libc/glibc.sh	Wed Oct 29 18:34:14 2008 +0000
     4.2 +++ b/scripts/build/libc/glibc.sh	Wed Oct 29 21:20:23 2008 +0000
     4.3 @@ -443,6 +443,14 @@
     4.4          GLIBC_INSTALL_APPS_LATER=no
     4.5      fi
     4.6  
     4.7 +    # glibc initial build hacks
     4.8 +    # http://sourceware.org/ml/crossgcc/2008-10/msg00068.html
     4.9 +    case "${CT_ARCH},${CT_ARCH_CPU}" in
    4.10 +	powerpc,8??)
    4.11 +	    CT_DoLog DEBUG "Activating support for memset on broken ppc-8xx (CPU15 erratum)"
    4.12 +	    GLIBC_INITIAL_BUILD_ASFLAGS="-DBROKEN_PPC_8xx_CPU15";;
    4.13 +    esac
    4.14 +
    4.15      # If this fails with an error like this:
    4.16      # ...  linux/autoconf.h: No such file or directory 
    4.17      # then you need to set the KERNELCONFIG variable to point to a .config file for this arch.
    4.18 @@ -453,6 +461,7 @@
    4.19      CT_DoExecLog ALL make LD=${CT_TARGET}-ld                        \
    4.20                             RANLIB=${CT_TARGET}-ranlib               \
    4.21                             OBJDUMP_FOR_HOST="${CT_TARGET}-objdump"  \
    4.22 +                           ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
    4.23                             ${GLIBC_INITIAL_BUILD_RULE}
    4.24  
    4.25      CT_DoLog EXTRA "Installing C library"