Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.85 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.  
  5. cd /opt/crosstool/src/build-binutils
  6. find . -delete
  7. ../binutils-2.22/configure --target=$TARGET \
  8.     --prefix=$PREFIX --with-sysroot=$TARGET \
  9.     --disable-nls --with-arch=armv6
  10. if [ "$?" -ne "0" ]; then
  11.     echo "=== build script: failed to configure binutils ==="
  12.     exit 1
  13. fi
  14. make all
  15. if [ "$?" -ne "0" ]; then
  16.     echo "=== build script: failed to make binutils ==="
  17.     exit 1
  18. fi
  19. make install
  20. if [ "$?" -ne "0" ]; then
  21.     echo "=== build script: failed to install binutils ==="
  22.     exit 1
  23. fi
  24.  
  25.  
  26. export PATH=$PATH:$PREFIX/bin
  27. cd /opt/crosstool/src/build-gcc
  28. find . -delete
  29. ../gcc-4.6.3/configure --target=$TARGET --prefix=$PREFIX \
  30.     --with-arch=armv6 --with-fpu=vfp --with-float=hard \
  31.     --disable-sjlj-exceptions --enable-checking=release \
  32.     --enable-linker-build-id --enable-gnu-unique-object \
  33.     --disable-nls --enable-languages=c \
  34.     --without-headers --disable-shared --disable-threads \
  35.     --disable-multilib --disable-decimal-float \
  36.     --disable-libmudflap --disable-libssp \
  37.     --disable-libgomp --without-ppl --without-cloog \
  38.     --with-gmp=/usr/local --with-mpfr=/usr/local \
  39.     --with-mpc=/usr/local
  40. if [ "$?" -ne "0" ]; then
  41.     echo "=== build script: failed to configure gcc ==="
  42.     exit 1
  43. fi
  44. make all-gcc
  45. if [ "$?" -ne "0" ]; then
  46.     echo "=== build script: failed to make gcc ==="
  47.     exit 1
  48. fi
  49. make install-gcc
  50. if [ "$?" -ne "0" ]; then
  51.     echo "=== build script: failed to install gcc ==="
  52.     exit 1
  53. fi
  54. make all-target-libgcc
  55. if [ "$?" -ne "0" ]; then
  56.     echo "=== build script: failed to make libgcc ==="
  57.     exit 1
  58. fi
  59. make install-target-libgcc
  60. if [ "$?" -ne "0" ]; then
  61.     echo "=== build script: failed to install libgcc ==="
  62.     exit 1
  63. fi
  64.  
  65.  
  66. echo "=== build script: OK ==="
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement