Rev 1794 | Rev 2084 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1794 | Rev 2077 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | echo "Script failed: $2" |
13 | echo "Script failed: $2" |
14 | exit |
14 | exit |
15 | fi |
15 | fi |
16 | } |
16 | } |
17 | 17 | ||
18 | BINUTILS_VERSION="2.16.1" |
18 | BINUTILS_VERSION="2.17" |
19 | GCC_VERSION="4.1.1" |
19 | GCC_VERSION="4.1.1" |
20 | 20 | ||
21 | INCLUDES="ia64-pc-gnu-linux_includes.tar.bz2" |
- | |
22 | BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
21 | BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz" |
23 | GCC="gcc-core-${GCC_VERSION}.tar.bz2" |
22 | GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2" |
- | 23 | GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2" |
|
- | 24 | GCC_CPP="gcc-g++-${GCC_VERSION}.tar.bz2" |
|
24 | 25 | ||
25 | INCLUDES_SOURCE="http://download.decky.cz/" |
- | |
26 | BINUTILS_SOURCE="ftp://ftp.gnu.org/gnu/binutils/" |
26 | BINUTILS_SOURCE="ftp://ftp.gnu.org/gnu/binutils/" |
27 | GCC_SOURCE="ftp://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/" |
27 | GCC_SOURCE="ftp://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/" |
28 | 28 | ||
29 | PLATFORM="ia64" |
29 | PLATFORM="ia64" |
30 | WORKDIR=`pwd` |
30 | WORKDIR=`pwd` |
31 | TARGET="${PLATFORM}-pc-linux-gnu" |
31 | TARGET="${PLATFORM}-pc-linux-gnu" |
32 | HOST="i686-pc-linux-gnu" |
32 | HOST="i686-pc-linux-gnu" |
33 | PREFIX="/usr/local/${PLATFORM}" |
33 | PREFIX="/usr/local/${PLATFORM}" |
34 | INCLUDESDIR="${WORKDIR}/include" |
- | |
35 | BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
34 | BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}" |
36 | GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
35 | GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}" |
37 | OBJDIR="${WORKDIR}/gcc-obj" |
36 | OBJDIR="${WORKDIR}/gcc-obj" |
38 | 37 | ||
39 | echo ">>> Downloading tarballs" |
38 | echo ">>> Downloading tarballs" |
40 | 39 | ||
41 | if [ ! -f "${INCLUDES}" ]; then |
- | |
42 | wget -c "${INCLUDES_SOURCE}${INCLUDES}" |
- | |
43 | check_error $? "Error downloading includes." |
- | |
44 | fi |
- | |
45 | if [ ! -f "${BINUTILS}" ]; then |
40 | if [ ! -f "${BINUTILS}" ]; then |
46 | wget -c "${BINUTILS_SOURCE}${BINUTILS}" |
41 | wget -c "${BINUTILS_SOURCE}${BINUTILS}" |
47 | check_error $? "Error downloading binutils." |
42 | check_error $? "Error downloading binutils." |
48 | fi |
43 | fi |
- | 44 | if [ ! -f "${GCC_CORE}" ]; then |
|
- | 45 | wget -c "${GCC_SOURCE}${GCC_CORE}" |
|
- | 46 | check_error $? "Error downloading GCC Core." |
|
- | 47 | fi |
|
- | 48 | if [ ! -f "${GCC_OBJC}" ]; then |
|
- | 49 | wget -c "${GCC_SOURCE}${GCC_OBJC}" |
|
- | 50 | check_error $? "Error downloading GCC Objective C." |
|
- | 51 | fi |
|
49 | if [ ! -f "${GCC}" ]; then |
52 | if [ ! -f "${GCC_CPP}" ]; then |
50 | wget -c "${GCC_SOURCE}${GCC}" |
53 | wget -c "${GCC_SOURCE}${GCC_CPP}" |
51 | check_error $? "Error downloading GCC." |
54 | check_error $? "Error downloading GCC C++." |
52 | fi |
55 | fi |
53 | 56 | ||
54 | echo ">>> Creating destionation directory" |
57 | echo ">>> Creating destionation directory" |
55 | if [ ! -d "${PREFIX}" ]; then |
58 | if [ ! -d "${PREFIX}" ]; then |
56 | mkdir -p "${PREFIX}" |
59 | mkdir -p "${PREFIX}" |
Line 64... | Line 67... | ||
64 | test -d "${OBJDIR}" |
67 | test -d "${OBJDIR}" |
65 | check_error $? "Unable to create ${OBJDIR}." |
68 | check_error $? "Unable to create ${OBJDIR}." |
66 | fi |
69 | fi |
67 | 70 | ||
68 | echo ">>> Unpacking tarballs" |
71 | echo ">>> Unpacking tarballs" |
69 | tar -xvjf "${INCLUDES}" |
- | |
70 | check_error $? "Error unpacking includes." |
- | |
71 | tar -xvzf "${BINUTILS}" |
72 | tar -xvzf "${BINUTILS}" |
72 | check_error $? "Error unpacking binutils." |
73 | check_error $? "Error unpacking binutils." |
- | 74 | tar -xvjf "${GCC_CORE}" |
|
- | 75 | check_error $? "Error unpacking GCC Core." |
|
- | 76 | tar -xvjf "${GCC_OBJC}" |
|
- | 77 | check_error $? "Error unpacking GCC Objective C." |
|
73 | tar -xvjf "${GCC}" |
78 | tar -xvjf "${GCC_CPP}" |
74 | check_error $? "Error unpacking GCC." |
79 | check_error $? "Error unpacking GCC C++." |
75 | 80 | ||
76 | echo ">>> Compiling and installing binutils" |
81 | echo ">>> Compiling and installing binutils" |
77 | cd "${BINUTILSDIR}" |
82 | cd "${BINUTILSDIR}" |
78 | check_error $? "Change directory failed." |
83 | check_error $? "Change directory failed." |
79 | ./configure "--host=${HOST}" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls" |
84 | ./configure "--host=${HOST}" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls" |
Line 82... | Line 87... | ||
82 | check_error $? "Error compiling/installing binutils." |
87 | check_error $? "Error compiling/installing binutils." |
83 | 88 | ||
84 | echo ">>> Compiling and installing GCC" |
89 | echo ">>> Compiling and installing GCC" |
85 | cd "${OBJDIR}" |
90 | cd "${OBJDIR}" |
86 | check_error $? "Change directory failed." |
91 | check_error $? "Change directory failed." |
87 | "${GCCDIR}/configure" "--host=${HOST}" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c --disable-multilib --disable-libgcj "--with-headers=${INCLUDESDIR}" --disable-shared |
92 | "${GCCDIR}/configure" "--host=${HOST}" "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --with-gnu-as --with-gnu-ld --disable-nls --disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib --disable-libgcj --without-headers --disable-shared |
88 | check_error $? "Error configuring GCC." |
93 | check_error $? "Error configuring GCC." |
89 | PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc |
94 | PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc |
90 | check_error $? "Error compiling/installing GCC." |
95 | check_error $? "Error compiling/installing GCC." |
91 | 96 | ||
92 | echo |
97 | echo |