scripts/build/arch/powerpc.sh
author Cody P Schafer <dev@codyps.com>
Mon May 12 00:02:13 2014 +0200 (2014-05-12)
changeset 3322 eb13867a034c
parent 3169 9d0b37f08a10
permissions -rw-r--r--
arch/powerpc: add powerpc64le support

Technically, I don't forbid powerpcle support either, but I'm not sure that
there is any library/compiler support for that at the moment (though the hw
technically makes it possible).

powerpc64le needs glibc 2.19 and gcc 4.9. I haven't looked into the support
tools, but at least gdb 7.5 is too old (7.7.1 definitely has support).

Also make powerpc64 non-experimental. It's practically old at this point.

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: use ${target_endian_le} and ${target_bits_64}]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <64bfbbced9dd8f62e0d6.1399801945@gun>
Patchwork-Id: 347775
yann@520
     1
# Compute powerpc-specific values
yann@520
     2
yann@1634
     3
CT_DoArchTupleValues () {
dev@3322
     4
    # The architecture part of the tuple
dev@3322
     5
    CT_TARGET_ARCH="powerpc${target_bits_64}${target_endian_le}${CT_ARCH_SUFFIX}"
yann@1634
     6
yann@2723
     7
    # Only override values when ABI is not the default
mgherzan@2675
     8
    case "${CT_ARCH_powerpc_ABI}" in
yann@2723
     9
        eabi)
yann@2723
    10
            # EABI is only for bare-metal, so libc ∈ [none,newlib]
yann@2723
    11
            CT_TARGET_SYS="eabi"
yann@2723
    12
            ;;
mgherzan@2675
    13
        spe)
mgherzan@2675
    14
            case "${CT_LIBC}" in
yann@2723
    15
                none|newlib)    CT_TARGET_SYS="spe";;
yann@2723
    16
                *glibc)         CT_TARGET_SYS="gnuspe";;
yann@2723
    17
                uClibc)         CT_TARGET_SYS="uclibcgnuspe";;
mgherzan@2675
    18
            esac
mgherzan@2675
    19
            ;;
yann@1634
    20
    esac
yann@1634
    21
yann@1634
    22
    # Add extra flags for SPE if needed
mgherzan@2675
    23
    if [ "${CT_ARCH_powerpc_ABI_SPE}" = "y" ]; then
yann@1634
    24
        CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe"
yann@1634
    25
        CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double"
yann@1634
    26
        CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double"
yann@1634
    27
    fi
yann@1634
    28
}