scripts/build/arch/arm.sh
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Mar 11 22:11:43 2014 +0100 (2014-03-11)
changeset 3293 e11a8a2e225d
parent 3169 9d0b37f08a10
permissions -rw-r--r--
comptools: do not force build of make-3.81 unless really needed

On systems with make-3.82, we forcibly force the build and the use
of make-3.81

But some newer tools break when building with make-3.81. For example,
eglibc-3.18 breaks.

Introduce a new blind options that tools may select if they require
make-3.81. If the system does not have make-3.81, and this option is
selected, then we force the build of make-3.81. Otherwise, we leave
it to the user to decide on his own.

Note that no component selects this option for now. It will come in
later patches as we find them.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
yann@383
     1
# Compute ARM-specific values
yann@383
     2
yann@964
     3
CT_DoArchTupleValues() {
yann@383
     4
    # The architecture part of the tuple:
yann@3262
     5
    case "${CT_ARCH_BITNESS}" in
yann@3262
     6
        32)
yann@3262
     7
            CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${target_endian_eb}}"
yann@3262
     8
            ;;
yann@3262
     9
        64)
yann@3262
    10
            # ARM 64 (aka AArch64) is special
yann@3262
    11
            [ "${CT_ARCH_BE}" = "y" ] && target_endian_eb="_be"
yann@3262
    12
            CT_TARGET_ARCH="aarch64${CT_ARCH_SUFFIX:-${target_endian_eb}}"
yann@3262
    13
            ;;
yann@3262
    14
    esac
yann@383
    15
yann@385
    16
    # The system part of the tuple:
yann@385
    17
    case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in
yann@787
    18
        *glibc,y)   CT_TARGET_SYS=gnueabi;;
yann@385
    19
        uClibc,y)   CT_TARGET_SYS=uclibcgnueabi;;
yann@1591
    20
        *,y)        CT_TARGET_SYS=eabi;;
yann@385
    21
    esac
yann@1596
    22
antony@2563
    23
    # Set the default instruction set mode
yann@1596
    24
    case "${CT_ARCH_ARM_MODE}" in
yann@1596
    25
        arm)    ;;
yann@1596
    26
        thumb)
yann@1596
    27
            CT_ARCH_CC_CORE_EXTRA_CONFIG="--with-mode=thumb"
yann@1596
    28
            CT_ARCH_CC_EXTRA_CONFIG="--with-mode=thumb"
yann@1596
    29
#            CT_ARCH_TARGET_CFLAGS="-mthumb"
yann@1596
    30
            ;;
yann@1596
    31
    esac
yann@1597
    32
yann@1597
    33
    if [ "${CT_ARCH_ARM_INTERWORKING}" = "y" ]; then
yann@1597
    34
        CT_ARCH_TARGET_CFLAGS+=" -mthumb-interwork"
yann@1597
    35
    fi
yann@3158
    36
yann@3158
    37
    if [ "${CT_ARCH_ARM_TUPLE_USE_EABIHF}" = "y" ]; then
yann@3158
    38
        CT_TARGET_SYS="${CT_TARGET_SYS}hf"
yann@3158
    39
    fi
yann@383
    40
}