download_prerequisites 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #! /bin/sh
  2. # Download some prerequisites needed by gcc.
  3. # Run this from the top level of the gcc source tree and the gcc
  4. # build will do the right thing.
  5. #
  6. # (C) 2010 Free Software Foundation
  7. #
  8. # This program is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation, either version 3 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. # General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program. If not, see http://www.gnu.org/licenses/.
  20. # If you want to disable Graphite loop optimizations while building GCC,
  21. # DO NOT set GRAPHITE_LOOP_OPT as yes so that the ISL package will not
  22. # be downloaded.
  23. GRAPHITE_LOOP_OPT=yes
  24. # Necessary to build GCC.
  25. MPFR=mpfr-2.4.2
  26. GMP=gmp-4.3.2
  27. MPC=mpc-0.8.1
  28. wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPFR.tar.bz2 || exit 1
  29. tar xjf $MPFR.tar.bz2 || exit 1
  30. ln -sf $MPFR mpfr || exit 1
  31. wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$GMP.tar.bz2 || exit 1
  32. tar xjf $GMP.tar.bz2 || exit 1
  33. ln -sf $GMP gmp || exit 1
  34. wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPC.tar.gz || exit 1
  35. tar xzf $MPC.tar.gz || exit 1
  36. ln -sf $MPC mpc || exit 1
  37. # Necessary to build GCC with the Graphite loop optimizations.
  38. if [ "$GRAPHITE_LOOP_OPT" = "yes" ] ; then
  39. ISL=isl-0.14
  40. wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$ISL.tar.bz2 || exit 1
  41. tar xjf $ISL.tar.bz2 || exit 1
  42. ln -sf $ISL isl || exit 1
  43. fi