/* Building cross compiler for Xscale platform(iPAQ H3975) - Installation Log */ /* Author - Adinarayanan Venkatachalam (avenkat2@unity.ncsu.edu)*/ /* Use at your own risk */ 1) Get the latest stable versions of binutils, gcc and glibc from ftp.gnu.org/pub/gnu In my case these are: binutils-2.13.1.tar.gz gcc-3.2.tar.gz glibc-2.3.1.tar.gz 2) Gunzip and untar them to your src/ directory. In my case : cd /root/ipaq/src tar zxvf 3) Create your build directory. mkdir /root/ipaq/build cd /root/ipaq/build mkdir binutils-2.13.1 gcc-3.2 glibc-2.3.1 4) Choose your --prefix, --target and --host and configure binutils. cd binutils-2.13.1 /root/ipaq/src/binutils-2.13.1/configure --target=arm-linux --prefix=/root/ipaq/local --host=i386 make make install 5) Build GCC - first pass. cd /root/ipaq/src/gcc-3.2/gcc/config/arm vi t-linux Add -Dinhibit_libc -D__ghtr_posix_h to TARGET_LIBGCC2_CFLAGS cd /root/ipaq/build/gcc-3.2/ /root/ipaq/src/gcc-3.2/configure --target=arm-linux --host=i386-pc-linux-gnu --prefix=/root/ipaq/local --disable-threads --with-cpu=xscale --enable-languages=c make /* errors and their solutions */ /root/ipaq/local/arm-linux/bin/ld: cannot open crtn.o: No such file or directorycollect2: ld returned 1 exit status /root/ipaq/local/arm-linux/bin/ld: cannot open crti.o: No such file or directorycollect2: ld returned 1 exit status /root/ipaq/local/arm-linux/bin/ld: cannot find -lc solutions: cp /root/skiff/local/arm-linux/lib/crtn.o ../../local/lib/gcc-lib/arm-linux/3.2/ cp /root/skiff/local/arm-linux/lib/crti.o ../../local/lib/gcc-lib/arm-linux/3.2/ cp /root/skiff/local/arm-linux/lib/libc.a ../../local/lib/gcc-lib/arm-linux/3.2/ Comments: You have to install arm-linux-toolchain-current.tar.gz from ftp.handhelds.org in /root. It automatically installs to /skiff/local 6) Building glibc: cd /root/ipaq/build/glibc-2.3.1/ /root/ipaq/src/glibc-2.3.1/configure arm-linux --build=i386-pc-linux-gnu --prefix=/root/ipaq/local/arm-linux --enable-add-ons=linuxthreads /* comment: i guess crypt is in-built, so need for --enable-add-ons option - crypt*/ make /* error */ ../sysdeps/unix/syscall.S: Assembler messages: ../sysdeps/unix/syscall.S:28: Error: cannot represent SWI relocation in this object file format /* comments : maybe it is finding the wrong version of asm/unistd.h */ In /root/ipaq/src/glibc-2.3.1/Makerules line#73 add the following -I/root/ipaq/local/arm-linux/include so that +sysdep-includes becomes +sysdep-includes := $(addprefix -I,$(+sysdep_dirs)) -I/root/ipaq/local/arm-linux/include /* error */ /root/ipaq/local/arm-linux/include/asm/param.h:13:45: asm/arch/param.h: No such file or directory /root/ipaq/local/arm-linux/include/asm/param.h:14:57: asm/proc/page.h: No such file or directory make[2]: *** [/root/ipaq/build/glibc-2.3.1/misc/efgcvt.o] Error 1 /* solution */ cd /root/ipaq/local/arm-linux/include/asm ln -s ./arch-pxa ./arch ln -s ./proc-armv ./proc /* error */ cpp0: warning: changing search order for system directory "/root/ipaq/local/arm-linux/include" cpp0: warning: as it has already been specified as a non-system directory : Assembler messages: :2: Error: cannot represent SWI relocation in this object file format make[2]: *** [/root/ipaq/build/glibc-2.3.1/misc/fgetxattr.o] Error 1 NOTES: I followed the document - HOWTO Build a Cross Toolchain in Brief - that can be found at the handhelds.org wiki page.