problem while building arm-linux-gcc using with-cpu=iwmmxt

Dan Kegel dank@kegel.com
Thu Feb 26 15:35:00 GMT 2004


add wrote:
> Has anybody here before buiding gcc-3.4 cvs version using --with-cpu=iwmmxt
> option?
> I'm doing this based on dan's crosstool-0.27.
> Finally I found out the bootstrap gcc has problem to build glibc-2.3.2 while
> processing glibc/locale/ld-callob.c
> it will say:
> /tmp/ccWwfxuD.s: Assembler messages:
> /tmp/ccWwfxuD.s:6430: Error: bad immediate value for offset (4128)
> /tmp/ccWwfxuD.s:6435: Error: bad immediate value for offset (4112)
> 
> while using option --with-cpu=xscale, it will be ok. So I think this is
> related to iwmmxt specific codes in gcc-3.4-cvs.
> 
> Who succeeded to build iwmmxt gcc-3.4, pls raise your hand ok? thanks!

gcc-3.4-20040225 builds fine for me here, though I haven't tried
testing the resulting toolchain.
Here is a patch to crosstool to add the needed files.

You might also need to give crosstool an arm-iwmmxt.config for
the kernel, and change arm-iwmmxt.dat to reference that instead
of arm.config.  If you find this is the case, please send me the
kernel config file you end up using.


diff -Naur crosstool-0.28-pre2/arm-iwmmxt.dat crosstool-cur/arm-iwmmxt.dat
--- crosstool-0.28-pre2/arm-iwmmxt.dat  1969-12-31 16:00:00.000000000 -0800
+++ crosstool-cur/arm-iwmmxt.dat        2004-02-23 17:40:04.000000000 -0800
@@ -0,0 +1,4 @@
+KERNELCONFIG=$PWD/arm.config
+TARGET=arm-iwmmxt-linux-gnu
+TARGET_CFLAGS="-O"
+GCC_EXTRA_CONFIG="--with-cpu=iwmmxt --enable-cxx-flags=-mcpu=iwmmxt"
diff -Naur crosstool-0.28-pre2/demo-arm-iwmmxt.sh crosstool-cur/demo-arm-iwmmxt.sh
--- crosstool-0.28-pre2/demo-arm-iwmmxt.sh      1969-12-31 16:00:00.000000000 -0800
+++ crosstool-cur/demo-arm-iwmmxt.sh    2004-02-25 22:56:06.000000000 -0800
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -ex
+export TARBALLS_DIR=~/downloads
+export RESULT_TOP=/opt/crosstool
+
+# 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 /opt/crosstool
+
+# Build the toolchain.  Takes a couple hours and a couple gigabytes.
+
+eval `cat arm-iwmmxt.dat gcc-3.4-20040225-glibc-2.3.2.dat` sh all.sh --notest
+
+echo Done.
diff -Naur crosstool-0.28-pre2/gcc-3.4-20040225-glibc-2.3.2.dat crosstool-cur/gcc-3.4-20040225-glibc-2.3.2.dat
--- crosstool-0.28-pre2/gcc-3.4-20040225-glibc-2.3.2.dat        1969-12-31 16:00:00.000000000 -0800
+++ crosstool-cur/gcc-3.4-20040225-glibc-2.3.2.dat      2004-02-25 22:56:31.000000000 -0800
@@ -0,0 +1,6 @@
+BINUTILS_DIR=binutils-2.14.90.0.5
+BINUTILS_URL=http://www.kernel.org/pub/linux/devel/binutils
+GCC_DIR=gcc-3.4-20040225
+GLIBC_DIR=glibc-2.3.2
+LINUX_DIR=linux-2.4.21
+GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.2


- Dan

-- 
US citizens: if you're considering voting for Bush, look at these first:
http://www.misleader.org/
http://www.cbc.ca/news/background/arar/
http://www.house.gov/reform/min/politicsandscience/



More information about the Gcc-help mailing list