Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.39 KB | None | 0 0
  1. #!/bin/bash
  2. export TARGET=arm-linux-gnueabihf
  3. export PREFIX=/opt/crosstool/gcc-4.6.3-eglibc-2.13/$TARGET
  4. export PATH=$PATH:$PREFIX/bin
  5.  
  6. cd /opt/crosstool/src/build-eglibc
  7. find . -delete
  8. BUILD_CC=gcc \
  9. CC=$PREFIX/bin/$TARGET-gcc \
  10. CXX=$PREFIX/bin/$TARGET-g++ \
  11. AR=$PREFIX/bin/$TARGET-ar \
  12. RANLIB=$PREFIX/bin/$TARGET-ranlib \
  13. MAKEINFO=: \
  14. ../eglibc-2.13/configure \
  15.     --prefix=/usr \
  16.     --with-headers=$PREFIX/usr/include \
  17.     --build=i686-pc-cygwin \
  18.     --host=$TARGET \
  19.     --enable-kernel=3.0.0 \
  20.     --disable-profile --without-gd \
  21.     --without-cvs --enable-add-ons
  22. if [ "$?" -ne "0" ]; then
  23.     echo "=== build script: failed to configure eglibc ==="
  24.     exit 1
  25. fi
  26. make install_root=$PREFIX \
  27.     install-headers install-bootstrap-headers=yes
  28. if [ "$?" -ne "0" ]; then
  29.     echo -n "=== build script: "
  30.     echo "failed to make eglibc headers ==="
  31.     exit 1
  32. fi
  33. mkdir -p $PREFIX/usr/lib
  34. make csu/subdir_lib
  35. if [ "$?" -ne "0" ]; then
  36.     echo -n "=== build script: "
  37.     echo "failed to make eglibc csu subdir_lib ==="
  38.     exit 1
  39. fi
  40. cp csu/crt1.o csu/crti.o csu/crtn.o $PREFIX/usr/lib
  41. if [ "$?" -ne "0" ]; then
  42.     echo -n "=== build script: "
  43.     echo "failed to install eglibc csu subdir_lib ==="
  44.     exit 1
  45. fi
  46. $PREFIX/bin/$TARGET-gcc -nostdlib -nostartfiles \
  47.     -shared -x c /dev/null -o $PREFIX/usr/lib/libc.so
  48. if [ "$?" -ne "0" ]; then
  49.     echo -n "=== build script: "
  50.     echo "failed to install eglibc fake libc.so ==="
  51.     exit 1
  52. fi
  53.  
  54. cd /opt/crosstool/src/build-gcc
  55. find . -delete
  56. ../gcc-4.6.3/configure --target=$TARGET --prefix=$PREFIX \
  57.     --with-sysroot=$PREFIX --disable-libquadmath \
  58.     --with-arch=armv6 --with-fpu=vfp --with-float=hard \
  59.     --disable-sjlj-exceptions --enable-checking=release \
  60.     --enable-linker-build-id --enable-gnu-unique-object \
  61.     --disable-nls --enable-languages=c --with-headers \
  62.     --disable-multilib --disable-libmudflap --disable-libssp \
  63.     --disable-libgomp --without-ppl --without-cloog \
  64.     --with-gmp=/usr/local --with-mpfr=/usr/local \
  65.     --with-mpc=/usr/local
  66. if [ "$?" -ne "0" ]; then
  67.     echo "=== build script: failed to configure gcc ==="
  68.     exit 1
  69. fi
  70. make
  71. if [ "$?" -ne "0" ]; then
  72.     echo "=== build script: failed to make gcc ==="
  73.     exit 1
  74. fi
  75. make install
  76. if [ "$?" -ne "0" ]; then
  77.     echo "=== build script: failed to install gcc ==="
  78.     exit 1
  79. fi
  80.  
  81. echo "=== build script: OK ==="
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement