I took last avail. toolchain (1.2.2) sources and going to compile it from scratch. I read toolchain compilation how-to and was successed on first steps, but failed on uClibc compilation.
I'm installing toolchain into /opt/avr32 dir, which is owned by my unpriv. user, so i can run 'make install' without root. I modify some stuff in the original toolchain: 2.6.22-atmel3 kernel, patched binutils for successfull fftw compilation, also custom configs for linxu kernel and uClibc.
Binutils:
Code:
rm -rf ./build-avr32-linux-binutils &&
rm -rf ./binutils-2.17.atmel.1.1.1 &&
tar xzvf ./binutils-avr32-2.17.atmel.1.1.1.tar.gz &&
mkdir ./build-avr32-linux-binutils &&
cd ./binutils-2.17.atmel.1.1.1 &&
cat ../elf32-avr32.diff | patch -p2 &&
autoconf &&
cd bfd && aclocal && autoconf && automake && autoheader && cd ../ &&
cd opcodes && aclocal && autoconf && automake && autoheader && cd ../ &&
cd binutils && aclocal && autoconf && automake && autoheader && cd ../ &&
cd ld && aclocal && autoconf && automake && autoheader && cd ../ &&
cd ../build-avr32-linux-binutils &&
../binutils-2.17.atmel.1.1.1/configure --target=avr32-linux --prefix=/opt/avr32/usr --disable-libssp --disable-libada &&
make configure-bfd && cd bfd && make headers && cd ../ &&
make &&
make install &&
export PATH=/opt/avr32/usr/bin:$PATH
gcc bootstrapped version:
Code:
rm -rf ./build-avr32-linux-gcc &&
rm -rf ./gcc-4.1.2 &&
tar xzvf gcc-4.1.2-atmel.1.1.0.tar.gz &&
mkdir build-avr32-linux-gcc &&
cd build-avr32-linux-gcc &&
../gcc-4.1.2/configure --target=avr32-linux --prefix=/opt/avr32/usr --enable-languages=c --disable-threads --disable-libmudflap --disable-libssp --disable-libada --with-build-sysroot=/opt/avr32 &&
make &&
make install
Kernel headers
Code:
rm -rf ./linux-2.6.22.atmel.3 &&
tar xjvf linux-2.6.22.atmel.3.tar.bz2 &&
cd ./linux-2.6.22.atmel.3 &&
cp ../kernel-dot-config .config &&
CROSS_COMPILE=avr32-linux- ARCH=avr32 make oldconfig &&
CROSS_COMPILE=avr32-linux- ARCH=avr32 make headers_install INSTALL_HDR_PATH=/opt/avr32/usr
uClibc
Code:
rm -rf ./uclibc-0.9.28.atmel.0.0.20070516 &&
tar xzvf uclibc-0.9.28.atmel.0.0.20070516.tar.gz &&
cd uclibc-0.9.28.atmel.0.0.20070516 &&
tar xjvf uClibc-0.9.28.tar.bz2 &&
cd uClibc-0.9.28 &&
for i in `cat ../series `; do patch -p1 < ../$i; done &&
cp ../../uclibc-dot-config .config &&
make oldconfig &&
make &&
make install &&
cd utils &&
make &&
make install
My error:
Code:
avr32-linux-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mcpu=ap7000 -masm-addr-pseudos -Wa,--pic,--linkrelax -msoft-float -fno-stack-protector -fno-builtin -nostdinc -D_LIBC -I../include -I. -Os -funit-at-a-time -isystem /opt/avr32/usr/lib/gcc/avr32-linux/4.1.2/include -DNDEBUG -fPIC \
-DUCLIBC_RUNTIME_PREFIX=\"/opt/avr32/\" \
-DUCLIBC_LDSO=ld-uClibc.so.0 -I. -I../ldso/include \
ldd.c -o ldd
In file included from ldd.c:31:
../include/stdlib.h:494: warning: '__malloc__' attribute ignored
/opt/avr32/usr/lib/gcc/avr32-linux/4.1.2/../../../../avr32-linux/bin/ld: warning: ld-uClibc.so.0, needed by /opt/avr32/usr/lib/gcc/avr32-linux/4.1.2/../../../../avr32-linux/lib/libc.so, not found (try using -rpath or -rpath-link)
/opt/avr32/usr/lib/gcc/avr32-linux/4.1.2/../../../../avr32-linux/lib/libc.so: undefined reference to `__libc_stack_end'
collect2: ld returned 1 exit status
make: *** [ldd] Error 1
It happends in uClibc/utils directory
P.S. Sorry for spamming this forum - i just tyring to compile my C++-written mp3 player which uses fftw library for some kind of visualisation.
fftw cant be copmiled on default bintuils --> recompile binutils --> <seems like gcc depends on bintuils> --> <seems like uClibc depends on gcc> --> <i have to compile my own toolchain just because of this +1/-1 line patch to binutils. *HORROR*> |