Changeset 985e26d2 in mainline for tools/toolchain.sh


Ignore:
Timestamp:
2010-01-07T19:06:59Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8190e63
Parents:
743e17b (diff), eca2435 (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.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • tools/toolchain.sh

    r743e17b r985e26d2  
    11#!/bin/bash
    22
    3 # Cross-compiler toolchain build script
    4 #  by Martin Decky <martin@decky.cz>
    5 #
    6 #  GPL'ed, copyleft
     3#
     4# Copyright (c) 2009 Martin Decky
     5# All rights reserved.
     6#
     7# Redistribution and use in source and binary forms, with or without
     8# modification, are permitted provided that the following conditions
     9# are met:
     10#
     11# - Redistributions of source code must retain the above copyright
     12#   notice, this list of conditions and the following disclaimer.
     13# - Redistributions in binary form must reproduce the above copyright
     14#   notice, this list of conditions and the following disclaimer in the
     15#   documentation and/or other materials provided with the distribution.
     16# - The name of the author may not be used to endorse or promote products
     17#   derived from this software without specific prior written permission.
     18#
     19# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     20# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     21# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     22# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     23# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     24# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     28# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    729#
    830
     
    92114}
    93115
     116patch_binutils() {
     117        PLATFORM="$1"
     118       
     119        if [ "${PLATFORM}" == "arm32" ] ; then
     120                patch -p1 <<EOF
     121diff -Naur binutils-2.20.orig/gas/config/tc-arm.c binutils-2.20/gas/config/tc-arm.c
     122--- binutils-2.20.orig/gas/config/tc-arm.c      2009-08-30 00:10:59.000000000 +0200
     123+++ binutils-2.20/gas/config/tc-arm.c   2009-11-02 14:25:11.000000000 +0100
     124@@ -2485,8 +2485,9 @@
     125       know (frag->tc_frag_data.first_map == NULL);
     126       frag->tc_frag_data.first_map = symbolP;
     127     }
     128-  if (frag->tc_frag_data.last_map != NULL)
     129+  if (frag->tc_frag_data.last_map != NULL) {
     130     know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));
     131+  }
     132   frag->tc_frag_data.last_map = symbolP;
     133 }
     134EOF
     135                check_error $? "Error patching binutils"
     136        fi
     137}
     138
    94139build_target() {
    95140        PLATFORM="$1"
    96141        TARGET="$2"
    97142       
    98         BINUTILS_VERSION="2.19.1"
    99         GCC_VERSION="4.4.1"
     143        BINUTILS_VERSION="2.20"
     144        GCC_VERSION="4.4.2"
    100145       
    101146        BINUTILS="binutils-${BINUTILS_VERSION}.tar.bz2"
     
    119164       
    120165        echo ">>> Downloading tarballs"
    121         download_check "${BINUTILS_SOURCE}" "${BINUTILS}" "09a8c5821a2dfdbb20665bc0bd680791"
    122         download_check "${GCC_SOURCE}" "${GCC_CORE}" "d19693308aa6b2052e14c071111df59f"
    123         download_check "${GCC_SOURCE}" "${GCC_OBJC}" "f7b2a606394036e81433b2f4c3251cba"
    124         download_check "${GCC_SOURCE}" "${GCC_CPP}" "d449047b5761348ceec23739f5553e0b"
     166        download_check "${BINUTILS_SOURCE}" "${BINUTILS}" "ee2d3e996e9a2d669808713360fa96f8"
     167        download_check "${GCC_SOURCE}" "${GCC_CORE}" "d50ec5af20508974411d0c83c5f4e396"
     168        download_check "${GCC_SOURCE}" "${GCC_OBJC}" "d8d26187d386a0591222a580b5a5b3d3"
     169        download_check "${GCC_SOURCE}" "${GCC_CPP}" "43b1e4879eb282dc4b05e4c016d356d7"
    125170       
    126171        echo ">>> Removing previous content"
     
    142187        cd "${BINUTILSDIR}"
    143188        check_error $? "Change directory failed."
     189        patch_binutils "${PLATFORM}"
    144190        ./configure "--target=${TARGET}" "--prefix=${PREFIX}" "--program-prefix=${TARGET}-" "--disable-nls"
    145191        check_error $? "Error configuring binutils."
Note: See TracChangeset for help on using the changeset viewer.