scripts/build/arch/x86.sh
author Martin Guy <martinwguy@gmail.com>
Sun Mar 31 04:07:38 2013 +0000 (2013-03-31)
changeset 3203 74fd467be5aa
parent 2759 d063b1ae8c1b
permissions -rw-r--r--
arch/avr32: Fix download of header files

This patch fixes the download of the avr32 headers in crosstool-ng by
fetching them directly from Atmel's web site instead of the now-broken URL
given by the original author of the avr32-header-fetching modification,
who fetched them from a copy on his own, now-defunct server.

It also adds the necessary logic to extract from a zip file, as that is
how the headers are packaged.

To configure it for avr32 after launching ct-ng menuconfig in an empty
directory:

Paths and misc options ->
Shell to use as CONFIG_SHELL = sh
Target options ->
Target Architecture = avr32
Toolchain options ->
Tuple's alias = avr32
Binary utilities ->
binutils version = 2.18a
C compiler
gcc version = 4.2.2
C-library
newlib version = 1.17.0
Enable IOs on long long = yes
Enable IOs on floats and doubles = yes
Disable the syscalls supplied with newlib = yes

CONFIG_SHELL is necessary to get round the "fragment: command not
found" bug when binutils-2.18 is configured using bash.

Prepared against crosstool-ng mercurial trunk on 31 March 2012.

Signed-off-by: Martin Guy <martinwguy@gmail.com>
[yann.morin.1998@free.fr: update bundles sample accordingly]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <CAL4-wQrg_NQ7jm-NCADqeyQr9twyhtx42OUGNThP6gWeqZc=kw@mail.gmail.com>
Patchwork-Id: 232612
yann@383
     1
# Compute x86-specific values
yann@383
     2
yann@1635
     3
# This one really needs a little love! :-(
yann@383
     4
yann@964
     5
CT_DoArchTupleValues() {
yann@1635
     6
    # Override the architecture part of the tuple:
yann@1635
     7
    if [ "${CT_ARCH_64}" = "y" ]; then
yann@1635
     8
        CT_TARGET_ARCH=x86_64
yann@1635
     9
    else
yann@1635
    10
        arch="${CT_ARCH_ARCH}"
yann@1635
    11
        [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
yann@1635
    12
        case "${arch}" in
yann@1635
    13
            "")                           CT_TARGET_ARCH=i386;;
yann@1635
    14
            i386|i486|i586|i686)          CT_TARGET_ARCH="${arch}";;
yann@1635
    15
            winchip*)                     CT_TARGET_ARCH=i486;;
yann@1635
    16
            pentium|pentium-mmx|c3*)      CT_TARGET_ARCH=i586;;
yann@1635
    17
            pentiumpro|pentium*|athlon*)  CT_TARGET_ARCH=i686;;
titus@2759
    18
            prescott)                     CT_TARGET_ARCH=i686;;
yann@1635
    19
            *)                            CT_TARGET_ARCH=i586;;
yann@1635
    20
        esac
yann@1635
    21
    fi
w@3169
    22
    CT_TARGET_ARCH="${CT_TARGET_ARCH}${CT_ARCH_SUFFIX}"
yann@383
    23
}