Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- export TARGET=arm-linux-gnueabihf
- export PREFIX=/opt/crosstool/gcc-4.6.3-eglibc-2.13/$TARGET
- export PATH=$PATH:$PREFIX/bin
- cd /opt/crosstool/src/build-eglibc
- find . -delete
- BUILD_CC=gcc \
- CC=$PREFIX/bin/$TARGET-gcc \
- CXX=$PREFIX/bin/$TARGET-g++ \
- AR=$PREFIX/bin/$TARGET-ar \
- RANLIB=$PREFIX/bin/$TARGET-ranlib \
- MAKEINFO=: \
- ../eglibc-2.13/configure \
- --prefix=/usr \
- --with-headers=$PREFIX/usr/include \
- --build=i686-pc-cygwin \
- --host=$TARGET \
- --enable-kernel=3.0.0 \
- --disable-profile --without-gd \
- --without-cvs --enable-add-ons
- if [ "$?" -ne "0" ]; then
- echo "=== build script: failed to configure eglibc ==="
- exit 1
- fi
- make install_root=$PREFIX \
- install-headers install-bootstrap-headers=yes
- if [ "$?" -ne "0" ]; then
- echo -n "=== build script: "
- echo "failed to make eglibc headers ==="
- exit 1
- fi
- mkdir -p $PREFIX/usr/lib
- make csu/subdir_lib
- if [ "$?" -ne "0" ]; then
- echo -n "=== build script: "
- echo "failed to make eglibc csu subdir_lib ==="
- exit 1
- fi
- cp csu/crt1.o csu/crti.o csu/crtn.o $PREFIX/usr/lib
- if [ "$?" -ne "0" ]; then
- echo -n "=== build script: "
- echo "failed to install eglibc csu subdir_lib ==="
- exit 1
- fi
- $PREFIX/bin/$TARGET-gcc -nostdlib -nostartfiles \
- -shared -x c /dev/null -o $PREFIX/usr/lib/libc.so
- if [ "$?" -ne "0" ]; then
- echo -n "=== build script: "
- echo "failed to install eglibc fake libc.so ==="
- exit 1
- fi
- cd /opt/crosstool/src/build-gcc
- find . -delete
- ../gcc-4.6.3/configure --target=$TARGET --prefix=$PREFIX \
- --with-sysroot=$PREFIX --disable-libquadmath \
- --with-arch=armv6 --with-fpu=vfp --with-float=hard \
- --disable-sjlj-exceptions --enable-checking=release \
- --enable-linker-build-id --enable-gnu-unique-object \
- --disable-nls --enable-languages=c --with-headers \
- --disable-multilib --disable-libmudflap --disable-libssp \
- --disable-libgomp --without-ppl --without-cloog \
- --with-gmp=/usr/local --with-mpfr=/usr/local \
- --with-mpc=/usr/local
- if [ "$?" -ne "0" ]; then
- echo "=== build script: failed to configure gcc ==="
- exit 1
- fi
- make
- if [ "$?" -ne "0" ]; then
- echo "=== build script: failed to make gcc ==="
- exit 1
- fi
- make install
- if [ "$?" -ne "0" ]; then
- echo "=== build script: failed to install gcc ==="
- exit 1
- fi
- echo "=== build script: OK ==="
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement