scripts/build/arch/x86.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 17 18:29:35 2011 +0200 (2011-07-17)
changeset 2926 d304c8a7bfa8
parent 1635 5d1936ad5ba8
child 3169 9d0b37f08a10
permissions -rw-r--r--
binutils: split binutils to backend/frontend, a-la cc_core

Move the actual binutils code to a backend function that builds the
required combo of build/host/target as requested by a frontend.

This split is currently a no-op, but is required for the upcoming
canadian-cross rework, where we'll be needing to build two binutils,
one for build/build/target, and one for build/host/target.

This applies to the three binutils:
- GNU binutils
- elf2flt
- sstrip

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
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@383
     6
yann@1635
     7
    # Override the architecture part of the tuple:
yann@1635
     8
    if [ "${CT_ARCH_64}" = "y" ]; then
yann@1635
     9
        CT_TARGET_ARCH=x86_64
yann@1635
    10
    else
yann@1635
    11
        arch="${CT_ARCH_ARCH}"
yann@1635
    12
        [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
yann@1635
    13
        case "${arch}" in
yann@1635
    14
            "")                           CT_TARGET_ARCH=i386;;
yann@1635
    15
            i386|i486|i586|i686)          CT_TARGET_ARCH="${arch}";;
yann@1635
    16
            winchip*)                     CT_TARGET_ARCH=i486;;
yann@1635
    17
            pentium|pentium-mmx|c3*)      CT_TARGET_ARCH=i586;;
yann@1635
    18
            pentiumpro|pentium*|athlon*)  CT_TARGET_ARCH=i686;;
titus@2759
    19
            prescott)                     CT_TARGET_ARCH=i686;;
yann@1635
    20
            *)                            CT_TARGET_ARCH=i586;;
yann@1635
    21
        esac
yann@1635
    22
    fi
yann@383
    23
}