Subversion Repositories HelenOS

Rev

Rev 2077 | Rev 2139 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2077 Rev 2084
Line 16... Line 16...
16
}
16
}
17
 
17
 
18
BINUTILS_VERSION="2.17"
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"
21
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz"
22
BINUTILS="binutils-${BINUTILS_VERSION}.tar.gz"
22
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2"
23
GCC_CORE="gcc-core-${GCC_VERSION}.tar.bz2"
23
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2"
24
GCC_OBJC="gcc-objc-${GCC_VERSION}.tar.bz2"
24
GCC_CPP="gcc-g++-${GCC_VERSION}.tar.bz2"
25
GCC_CPP="gcc-g++-${GCC_VERSION}.tar.bz2"
25
 
26
 
-
 
27
INCLUDES_SOURCE="http://download.decky.cz/"
26
BINUTILS_SOURCE="ftp://ftp.gnu.org/gnu/binutils/"
28
BINUTILS_SOURCE="ftp://ftp.gnu.org/gnu/binutils/"
27
GCC_SOURCE="ftp://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/"
29
GCC_SOURCE="ftp://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/"
28
 
30
 
29
PLATFORM="ia64"
31
PLATFORM="ia64"
30
WORKDIR=`pwd`
32
WORKDIR=`pwd`
31
TARGET="${PLATFORM}-pc-linux-gnu"
33
TARGET="${PLATFORM}-pc-linux-gnu"
32
HOST="i686-pc-linux-gnu"
34
HOST="i686-pc-linux-gnu"
33
PREFIX="/usr/local/${PLATFORM}"
35
PREFIX="/usr/local/${PLATFORM}"
-
 
36
INCLUDESDIR="${WORKDIR}/include"
34
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}"
37
BINUTILSDIR="${WORKDIR}/binutils-${BINUTILS_VERSION}"
35
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}"
38
GCCDIR="${WORKDIR}/gcc-${GCC_VERSION}"
36
OBJDIR="${WORKDIR}/gcc-obj"
39
OBJDIR="${WORKDIR}/gcc-obj"
37
 
40
 
38
echo ">>> Downloading tarballs"
41
echo ">>> Downloading tarballs"
39
 
42
 
-
 
43
if [ ! -f "${INCLUDES}" ]; then
-
 
44
    wget -c "${INCLUDES_SOURCE}${INCLUDES}"
-
 
45
    check_error $? "Error downloading includes."
-
 
46
fi
40
if [ ! -f "${BINUTILS}" ]; then
47
if [ ! -f "${BINUTILS}" ]; then
41
    wget -c "${BINUTILS_SOURCE}${BINUTILS}"
48
    wget -c "${BINUTILS_SOURCE}${BINUTILS}"
42
    check_error $? "Error downloading binutils."
49
    check_error $? "Error downloading binutils."
43
fi
50
fi
44
if [ ! -f "${GCC_CORE}" ]; then
51
if [ ! -f "${GCC_CORE}" ]; then
Line 67... Line 74...
67
    test -d "${OBJDIR}"
74
    test -d "${OBJDIR}"
68
    check_error $? "Unable to create ${OBJDIR}."
75
    check_error $? "Unable to create ${OBJDIR}."
69
fi
76
fi
70
 
77
 
71
echo ">>> Unpacking tarballs"
78
echo ">>> Unpacking tarballs"
-
 
79
tar -xvjf "${INCLUDES}"
-
 
80
check_error $? "Error unpacking includes."
72
tar -xvzf "${BINUTILS}"
81
tar -xvzf "${BINUTILS}"
73
check_error $? "Error unpacking binutils."
82
check_error $? "Error unpacking binutils."
74
tar -xvjf "${GCC_CORE}"
83
tar -xvjf "${GCC_CORE}"
75
check_error $? "Error unpacking GCC Core."
84
check_error $? "Error unpacking GCC Core."
76
tar -xvjf "${GCC_OBJC}"
85
tar -xvjf "${GCC_OBJC}"
Line 87... Line 96...
87
check_error $? "Error compiling/installing binutils."
96
check_error $? "Error compiling/installing binutils."
88
 
97
 
89
echo ">>> Compiling and installing GCC"
98
echo ">>> Compiling and installing GCC"
90
cd "${OBJDIR}"
99
cd "${OBJDIR}"
91
check_error $? "Change directory failed."
100
check_error $? "Change directory failed."
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
101
"${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 "--with-headers=${INCLUDESDIR}" --disable-shared
93
check_error $? "Error configuring GCC."
102
check_error $? "Error configuring GCC."
94
PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc
103
PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc
95
check_error $? "Error compiling/installing GCC."
104
check_error $? "Error compiling/installing GCC."
96
 
105
 
97
echo
106
echo