scripts/build/arch/sh.sh
author Remy Bohmer <linux@bohmer.net>
Thu May 27 23:18:19 2010 +0200 (2010-05-27)
changeset 2060 51e4597b07fc
parent 964 0535f7bf1069
child 2760 b402a49734a3
permissions -rw-r--r--
scripts: add option to strip all toolchain executables

To reduce filesizes of the toolchain and even improve build times
of projects to be build with this toolchain it is usefull to strip
the delivered toolchain executables. Since it is not likely that we
will debug the toolchain executables itself we do not need the
debug information inside the executables itself.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
yann@413
     1
# Compute sh-specific values
yann@413
     2
yann@964
     3
CT_DoArchTupleValues () {
yann@413
     4
    # The architecture part of the tuple:
yann@413
     5
    CT_TARGET_ARCH="${CT_ARCH_SH_VARIANT}${target_endian_eb}"
yann@413
     6
yann@413
     7
    # gcc ./configure flags
yann@413
     8
    CT_ARCH_WITH_ARCH=
yann@413
     9
    CT_ARCH_WITH_ABI=
yann@413
    10
    CT_ARCH_WITH_CPU=
yann@413
    11
    CT_ARCH_WITH_TUNE=
yann@413
    12
    CT_ARCH_WITH_FPU=
yann@413
    13
    CT_ARCH_WITH_FLOAT=
yann@413
    14
yann@413
    15
    # Endianness stuff
yann@413
    16
    case "${CT_ARCH_BE},${CT_ARCH_LE}" in
yann@413
    17
        y,) CT_ARCH_ENDIAN_CFLAG=-mb;;
yann@413
    18
        ,y) CT_ARCH_ENDIAN_CFLAG=-ml;;
yann@413
    19
    esac
yann@413
    20
yann@413
    21
    # CFLAGS
yann@1936
    22
    case "${CT_ARCH_SH_VARIANT}" in
yann@413
    23
        sh3)    CT_ARCH_ARCH_CFLAG=-m3;;
yann@413
    24
        sh4*)
yann@413
    25
            case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
yann@413
    26
                y,) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}";;
yann@413
    27
                ,y) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}-nofpu";;
yann@413
    28
            esac
yann@413
    29
            ;;
yann@413
    30
    esac
yann@413
    31
    CT_ARCH_FLOAT_CFLAG=
yann@413
    32
}