scripts/build/arch/powerpc.sh
author Michael Hope <michael.hope@linaro.org>
Thu Sep 29 12:40:42 2011 +1300 (2011-09-29)
changeset 2695 f2495884ca3e
parent 1634 186c71e3ceb0
child 2723 94e5cee905f2
permissions -rw-r--r--
config: add a 'auto' value for the number of parallel jobs

When CT_PARALLEL_JOBS is -1, set the number of parallel jobs to the
number of online CPUs + 1. Update documentation to match.

I find this useful when building in the cloud. You can use the same
.config file and have the build adapt to the number of processors
available. Limited testing shows that NCPUS+1 is faster than NCPUS+0
or NCPUS+2.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
yann@520
     1
# Compute powerpc-specific values
yann@520
     2
yann@1634
     3
CT_DoArchTupleValues () {
yann@1634
     4
    # The architecture part of the tuple, override only for 64-bit
yann@1634
     5
    if [ "${CT_ARCH_64}" = "y" ]; then
yann@1634
     6
        CT_TARGET_ARCH="powerpc64"
yann@1634
     7
    fi
yann@1634
     8
mgherzan@2675
     9
    CT_TARGET_SYS="gnu"
mgherzan@2675
    10
    case "${CT_ARCH_powerpc_ABI}" in
mgherzan@2675
    11
        "") ;;
mgherzan@2675
    12
        eabi) CT_TARGET_SYS="eabi";;
mgherzan@2675
    13
        spe)
mgherzan@2675
    14
            case "${CT_LIBC}" in
mgherzan@2675
    15
                glibc|eglibc) CT_TARGET_SYS="gnuspe";;
mgherzan@2675
    16
                *)            CT_TARGET_SYS="spe";
mgherzan@2675
    17
            esac
mgherzan@2675
    18
            ;;
yann@1634
    19
    esac
yann@1634
    20
yann@1634
    21
    # Add extra flags for SPE if needed
mgherzan@2675
    22
    if [ "${CT_ARCH_powerpc_ABI_SPE}" = "y" ]; then
yann@1634
    23
        CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe"
yann@1634
    24
        CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double"
yann@1634
    25
        CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double"
yann@1634
    26
    fi
yann@1634
    27
}