Changeset 0b749a3 in mainline for tools/toolchain.sh
- Timestamp:
- 2010-11-22T15:39:53Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0eddb76, aae339e9
- Parents:
- 9a1d8ab (diff), 8cd1aa5e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/toolchain.sh
r9a1d8ab r0b749a3 1 #! /bin/bash1 #! /bin/bash 2 2 3 3 # … … 33 33 echo 34 34 echo "Script failed: $2" 35 35 36 exit 1 36 37 fi … … 45 46 echo 46 47 echo "Checksum of ${FILE} does not match." 48 47 49 exit 2 48 50 fi … … 60 62 echo " ia32 IA-32 (x86, i386)" 61 63 echo " ia64 IA-64 (Itanium)" 62 echo " mips32 MIPS little-endian" 63 echo " mips32eb MIPS big-endian" 64 echo " mips32 MIPS little-endian 32b" 65 echo " mips32eb MIPS big-endian 32b" 66 echo " mips64 MIPS little-endian 64b" 64 67 echo " ppc32 32-bit PowerPC" 65 68 echo " ppc64 64-bit PowerPC" … … 71 74 } 72 75 76 change_title() { 77 echo -en "\e]0;$1\a" 78 } 79 80 show_countdown() { 81 TM="$1" 82 83 if [ "${TM}" -eq 0 ] ; then 84 echo 85 return 0 86 fi 87 88 echo -n "${TM} " 89 change_title "${TM}" 90 sleep 1 91 92 TM="`expr "${TM}" - 1`" 93 show_countdown "${TM}" 94 } 95 96 show_dependencies() { 97 echo "IMPORTANT NOTICE:" 98 echo 99 echo "For a successful compilation and use of the cross-compiler" 100 echo "toolchain you need at least the following dependencies." 101 echo 102 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 echo 106 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 echo 120 121 show_countdown 10 122 } 123 73 124 download_check() { 74 125 SOURCE="$1" … … 77 128 78 129 if [ ! -f "${FILE}" ]; then 130 change_title "Downloading ${FILE}" 79 131 wget -c "${SOURCE}${FILE}" 80 132 check_error $? "Error downloading ${FILE}." … … 88 140 89 141 if [ -d "${DIR}" ]; then 142 change_title "Removing ${DIR}" 90 143 echo " >>> Removing ${DIR}" 91 144 rm -fr "${DIR}" … … 97 150 DESC="$2" 98 151 152 change_title "Creating ${DESC}" 99 153 echo ">>> Creating ${DESC}" 100 154 … … 108 162 DESC="$2" 109 163 110 echo " >>> ${DESC}" 164 change_title "Unpacking ${DESC}" 165 echo " >>> Unpacking ${DESC}" 111 166 112 167 tar -xjf "${FILE}" … … 142 197 143 198 BINUTILS_VERSION="2.20" 144 GCC_VERSION="4.5. 0"199 GCC_VERSION="4.5.1" 145 200 146 201 BINUTILS="binutils-${BINUTILS_VERSION}.tar.bz2" … … 165 220 echo ">>> Downloading tarballs" 166 221 download_check "${BINUTILS_SOURCE}" "${BINUTILS}" "ee2d3e996e9a2d669808713360fa96f8" 167 download_check "${GCC_SOURCE}" "${GCC_CORE}" " 58eda33c3184303628f91c42a7ab15b5"168 download_check "${GCC_SOURCE}" "${GCC_OBJC}" " 8d8c01b6631b020cc6c167860fde2398"169 download_check "${GCC_SOURCE}" "${GCC_CPP}" " 5ab93605af40def4844eda09ca769c2d"222 download_check "${GCC_SOURCE}" "${GCC_CORE}" "dc8959e31b01a65ce10d269614815054" 223 download_check "${GCC_SOURCE}" "${GCC_OBJC}" "3c11b7037896e967eddf8178af2ddd98" 224 download_check "${GCC_SOURCE}" "${GCC_CPP}" "b294953ff0bb2f20c7acb2bf005d832a" 170 225 171 226 echo ">>> Removing previous content" … … 184 239 unpack_tarball "${GCC_CPP}" "C++" 185 240 186 echo ">>> Compiling and installing binutils"241 echo ">>> Processing binutils (${PLATFORM})" 187 242 cd "${BINUTILSDIR}" 188 243 check_error $? "Change directory failed." 189 244 patch_binutils "${PLATFORM}" 190 ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls" 245 246 change_title "binutils: configure (${PLATFORM})" 247 ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" --disable-nls 191 248 check_error $? "Error configuring binutils." 249 250 change_title "binutils: make (${PLATFORM})" 192 251 make all install 193 252 check_error $? "Error compiling/installing binutils." 194 253 195 echo ">>> Compiling and installing GCC"254 echo ">>> Processing GCC (${PLATFORM})" 196 255 cd "${OBJDIR}" 197 256 check_error $? "Change directory failed." 257 258 change_title "GCC: configure (${PLATFORM})" 198 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 199 260 check_error $? "Error configuring GCC." 261 262 change_title "GCC: make (${PLATFORM})" 200 263 PATH="${PATH}:${PREFIX}/bin" make all-gcc install-gcc 201 264 check_error $? "Error compiling/installing GCC." … … 217 280 fi 218 281 282 show_dependencies 283 219 284 case "$1" in 220 285 "amd64") … … 238 303 "mips32eb") 239 304 build_target "mips32eb" "mips-linux-gnu" 305 ;; 306 "mips64") 307 build_target "mips64" "mips64el-linux-gnu" 240 308 ;; 241 309 "ppc32") … … 256 324 build_target "mips32" "mipsel-linux-gnu" 257 325 build_target "mips32eb" "mips-linux-gnu" 326 build_target "mips64" "mips64el-linux-gnu" 258 327 build_target "ppc32" "ppc-linux-gnu" 259 328 build_target "ppc64" "ppc64-linux-gnu"
Note:
See TracChangeset
for help on using the changeset viewer.