Subversion Repositories HelenOS

Rev

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

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