Changes in tools/toolchain.sh [71e3289:7d6f7d2b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/toolchain.sh
r71e3289 r7d6f7d2b 1 #! 1 #!/bin/bash 2 2 3 3 # … … 33 33 echo 34 34 echo "Script failed: $2" 35 36 35 exit 1 37 36 fi … … 46 45 echo 47 46 echo "Checksum of ${FILE} does not match." 48 49 47 exit 2 50 48 fi … … 62 60 echo " ia32 IA-32 (x86, i386)" 63 61 echo " ia64 IA-64 (Itanium)" 64 echo " mips32 MIPS little-endian 32b" 65 echo " mips32eb MIPS big-endian 32b" 66 echo " mips64 MIPS little-endian 64b" 62 echo " mips32 MIPS little-endian" 63 echo " mips32eb MIPS big-endian" 67 64 echo " ppc32 32-bit PowerPC" 68 65 echo " ppc64 64-bit PowerPC" … … 74 71 } 75 72 76 change_title() {77 echo -en "\e]0;$1\a"78 }79 80 show_countdown() {81 TM="$1"82 83 if [ "${TM}" -eq 0 ] ; then84 echo85 return 086 fi87 88 echo -n "${TM} "89 change_title "${TM}"90 sleep 191 92 TM="`expr "${TM}" - 1`"93 show_countdown "${TM}"94 }95 96 show_dependencies() {97 echo "IMPORTANT NOTICE:"98 echo99 echo "For a successful compilation and use of the cross-compiler"100 echo "toolchain you need at least the following dependencies."101 echo102 echo "Please make sure that the dependencies are present in your"103 echo "system. Otherwise the compilation process might fail after"104 echo "a few seconds or minutes."105 echo106 echo " - SED, AWK, Flex, Bison, gzip, bzip2, Bourne Shell"107 echo " - gettext, zlib, Texinfo, libelf, libgomp"108 echo " - GNU Multiple Precision Library (GMP)"109 echo " - GNU Make"110 echo " - GNU tar"111 echo " - GNU Coreutils"112 echo " - GNU Sharutils"113 echo " - MPFR"114 echo " - MPC"115 echo " - Parma Polyhedra Library (PPL)"116 echo " - ClooG-PPL"117 echo " - native C compiler, assembler and linker"118 echo " - native C library with headers"119 echo120 121 show_countdown 10122 }123 124 73 download_check() { 125 74 SOURCE="$1" … … 128 77 129 78 if [ ! -f "${FILE}" ]; then 130 change_title "Downloading ${FILE}"131 79 wget -c "${SOURCE}${FILE}" 132 80 check_error $? "Error downloading ${FILE}." … … 140 88 141 89 if [ -d "${DIR}" ]; then 142 change_title "Removing ${DIR}"143 90 echo " >>> Removing ${DIR}" 144 91 rm -fr "${DIR}" … … 150 97 DESC="$2" 151 98 152 change_title "Creating ${DESC}"153 99 echo ">>> Creating ${DESC}" 154 100 … … 162 108 DESC="$2" 163 109 164 change_title "Unpacking ${DESC}" 165 echo " >>> Unpacking ${DESC}" 110 echo " >>> ${DESC}" 166 111 167 112 tar -xjf "${FILE}" … … 197 142 198 143 BINUTILS_VERSION="2.20" 199 GCC_VERSION="4. 5.1"144 GCC_VERSION="4.4.3" 200 145 201 146 BINUTILS="binutils-${BINUTILS_VERSION}.tar.bz2" … … 220 165 echo ">>> Downloading tarballs" 221 166 download_check "${BINUTILS_SOURCE}" "${BINUTILS}" "ee2d3e996e9a2d669808713360fa96f8" 222 download_check "${GCC_SOURCE}" "${GCC_CORE}" " dc8959e31b01a65ce10d269614815054"223 download_check "${GCC_SOURCE}" "${GCC_OBJC}" "3 c11b7037896e967eddf8178af2ddd98"224 download_check "${GCC_SOURCE}" "${GCC_CPP}" " b294953ff0bb2f20c7acb2bf005d832a"167 download_check "${GCC_SOURCE}" "${GCC_CORE}" "054b66f315b3d04ad06544ce26e72365" 168 download_check "${GCC_SOURCE}" "${GCC_OBJC}" "34711c4de46eaf79aa018206dbec4389" 169 download_check "${GCC_SOURCE}" "${GCC_CPP}" "cd179ec4f05ee17ce76464da25a2674c" 225 170 226 171 echo ">>> Removing previous content" … … 239 184 unpack_tarball "${GCC_CPP}" "C++" 240 185 241 echo ">>> Processing binutils (${PLATFORM})"186 echo ">>> Compiling and installing binutils" 242 187 cd "${BINUTILSDIR}" 243 188 check_error $? "Change directory failed." 244 189 patch_binutils "${PLATFORM}" 245 246 change_title "binutils: configure (${PLATFORM})" 247 ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls 190 ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls" 248 191 check_error $? "Error configuring binutils." 249 250 change_title "binutils: make (${PLATFORM})"251 192 make all install 252 193 check_error $? "Error compiling/installing binutils." 253 194 254 echo ">>> Processing GCC (${PLATFORM})"195 echo ">>> Compiling and installing GCC" 255 196 cd "${OBJDIR}" 256 197 check_error $? "Change directory failed." 257 258 change_title "GCC: configure (${PLATFORM})" 259 "${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 --without-headers --disable-shared --enable-lto 198 "${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 --without-headers --disable-shared 260 199 check_error $? "Error configuring GCC." 261 262 change_title "GCC: make (${PLATFORM})"263 200 PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc 264 201 check_error $? "Error compiling/installing GCC." … … 280 217 fi 281 218 282 show_dependencies283 284 219 case "$1" in 285 220 "amd64") … … 303 238 "mips32eb") 304 239 build_target "mips32eb" "mips-linux-gnu" 305 ;;306 "mips64")307 build_target "mips64" "mips64el-linux-gnu"308 240 ;; 309 241 "ppc32") … … 324 256 build_target "mips32" "mipsel-linux-gnu" 325 257 build_target "mips32eb" "mips-linux-gnu" 326 build_target "mips64" "mips64el-linux-gnu"327 258 build_target "ppc32" "ppc-linux-gnu" 328 259 build_target "ppc64" "ppc64-linux-gnu"
Note:
See TracChangeset
for help on using the changeset viewer.