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