forked from BobSteagall/gcc-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetch-gcc.sh
More file actions
executable file
·56 lines (48 loc) · 1.25 KB
/
Copy pathfetch-gcc.sh
File metadata and controls
executable file
·56 lines (48 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
##
## Script: fetch-gcc.sh
##
## This second-level script downloads the GCC sources, as well as any other
## sources needed to build GCC.
##
##- Make sure we're in the same directory as this script.
##
export TOP_DIR="$(cd "$(dirname "$0")" && pwd)"
cd $TOP_DIR
##- Get the GCC-related variables for this build.
##
source ./gcc-build-vars.sh
mkdir -p ./tarballs
cd ./tarballs
echo "Checking for required tarballs... "
if [ "$GCC_PLATFORM" == "Linux" ]
then
if [ ! -e $GMP_TARBALL ]
then
echo "Downloading $GMP_TARBALL... "
wget http://ftp.gnu.org/gnu/gmp/$GMP_TARBALL
fi
if [ ! -e $MPC_TARBALL ]
then
echo "Downloading $MPC_TARBALL... "
wget http://ftp.gnu.org/gnu/mpc/$MPC_TARBALL
fi
if [ ! -e $MPFR_TARBALL ]
then
echo "Downloading $MPFR_TARBALL... "
wget http://ftp.gnu.org/gnu/mpfr/$MPFR_TARBALL
fi
fi
if [ "$GCC_PLATFORM" == "Linux" ] && [ "$GCC_USE_CUSTOM_BINUTILS" == "YES" ]
then
if [ ! -e $BU_TARBALL ]
then
echo "Downloading $BU_TARBALL... "
wget http://ftp.gnu.org/gnu/binutils/$BU_TARBALL
fi
fi
if [ ! -e $GCC_TARBALL ]
then
echo "Downloading $GCC_TARBALL... "
wget http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/$GCC_TARBALL
fi