This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crosstool for MPC823


el_gast wrote:
I've modified crosstool-0.38 to work with MPC823.
Here is the patch. It's tested and working.

Thanks! Four questions:


1) What was the symptom with the bad memset.S?
How did you know it was bad?

2) Your comment says that memset.S is wrong for ppc403, too,
is that right?  Should we remove it there, too?

3) Which versions of glibc have you tested?
Does glibc in cvs have the same bug?
Perhaps you should submit a bug report against
glibc so we can get this fixed upstream!
I really prefer to fix this kind of problem without
cpu-specific source tree modifications in crosstool.sh.

4) did you intend to change testhello.sh with
your patch, or was that an accident?
- Dan


diff -rNu crosstool-0.38/crosstool.sh crosstool-0.38-orig/crosstool.sh
--- crosstool-0.38/crosstool.sh 2005-07-21 17:58:19.000000000 +0000
+++ crosstool-0.38-orig/crosstool.sh 2005-10-05 11:39:56.000000000 +0000
@@ -502,6 +502,12 @@
# Set BUILD_CC, or you won't be able to build datafiles
# Set --build, else glibc-2.3.2 will think you're not cross-compiling, and try to run the test programs
+ # Remove broken memset.S for 8xx and 403 (they have cachesize=4)
+ # This file assumes an 8 word wide cache apparently!
+ if test ${TARGET} = powerpc-823-linux-gnu; then
+ rm ${GLIBC_DIR}/sysdeps/powerpc/powerpc32/memset.S
+ fi
+ BUILD_CC=gcc CFLAGS="$TARGET_CFLAGS $EXTRA_TARGET_CFLAGS" CC="${TARGET}-gcc $GLIBC_EXTRA_CC_ARGS" \
AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
${GLIBC_DIR}/configure --prefix=/usr \
diff -rNu crosstool-0.38/demo-ppc823.sh crosstool-0.38-orig/demo-ppc823.sh
--- crosstool-0.38/demo-ppc823.sh 1970-01-01 00:00:00.000000000 +0000
+++ crosstool-0.38-orig/demo-ppc823.sh 2005-10-05 11:45:56.000000000 +0000
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -ex
+TARBALLS_DIR=$HOME/downloads
+RESULT_TOP=/opt/crosstool
+export TARBALLS_DIR RESULT_TOP
+GCC_LANGUAGES="c,c++"
+export GCC_LANGUAGES
+
+# Really, you should do the mkdir before running this,
+# and chown /opt/crosstool to yourself so you don't need to run as root.
+mkdir -p $RESULT_TOP
+
+# Build the toolchain. Takes a couple hours and a couple gigabytes.
+#eval `cat powerpc-860.dat gcc-3.3.2-glibc-2.3.2.dat` sh all.sh --notest
+#eval `cat powerpc-860.dat gcc-3.3.3-glibc-2.3.2.dat` sh all.sh --notest
+#eval `cat powerpc-860.dat gcc-3.4.0-glibc-2.3.2.dat` sh all.sh --notest
+ eval `cat powerpc-823.dat gcc-3.4.1-glibc-2.3.3.dat` sh all.sh --notest +#eval `cat powerpc-860.dat gcc-3.4.1-glibc-20040827.dat` sh all.sh --notest
+
+echo Done.
diff -rNu crosstool-0.38/powerpc-823.dat crosstool-0.38-orig/powerpc-823.dat
--- crosstool-0.38/powerpc-823.dat 1970-01-01 00:00:00.000000000 +0000
+++ crosstool-0.38-orig/powerpc-823.dat 2005-10-05 11:33:13.000000000 +0000
@@ -0,0 +1,4 @@
+TARGET=powerpc-823-linux-gnu
+TARGET_CFLAGS="-O"
+GCC_EXTRA_CONFIG="--with-cpu=823 --enable-cxx-flags=-mcpu=823"
+GLIBC_EXTRA_CONFIG="--without-fp"
diff -rNu crosstool-0.38/testhello.sh crosstool-0.38-orig/testhello.sh
--- crosstool-0.38/testhello.sh 2005-07-12 18:06:57.000000000 +0000
+++ crosstool-0.38-orig/testhello.sh 2005-10-05 13:44:20.000000000 +0000
@@ -21,8 +21,7 @@
cat > hello.c <<_eof_
#include <stdio.h>
#include <limits.h>
-static long x = LONG_MIN;
-int main() { printf("Hello, world! LONG_MIN is %ld, PATH_MAX is %d\n", x, PATH_MAX); return 0; }
+int main() { printf("Hello, world!"); return 0; }
_eof_
$PREFIX/bin/$TARGET-gcc -static hello.c -o $TARGET-hello-static


--
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]