scripts/build/arch/x86.sh
changeset 1635 5d1936ad5ba8
parent 964 0535f7bf1069
child 2759 d063b1ae8c1b
     1.1 --- a/scripts/build/arch/x86.sh	Thu Oct 23 13:00:45 2008 +0000
     1.2 +++ b/scripts/build/arch/x86.sh	Tue Nov 17 11:51:57 2009 +0100
     1.3 @@ -1,22 +1,22 @@
     1.4  # Compute x86-specific values
     1.5  
     1.6 -# This one really need a little love! :-(
     1.7 +# This one really needs a little love! :-(
     1.8  
     1.9  CT_DoArchTupleValues() {
    1.10 -    # The architecture part of the tuple:
    1.11 -    arch="${CT_ARCH_ARCH}"
    1.12 -    [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
    1.13 -    case "${arch}" in
    1.14 -        nocona|athlon*64|k8|athlon-fx|opteron)
    1.15 -            CT_DoError "Architecture is x86 (32-bit) but selected processor is \"${arch}\" (64-bit)";;
    1.16 -        "")                           CT_TARGET_ARCH=i386;;
    1.17 -        i386|i486|i586|i686)          CT_TARGET_ARCH="${arch}";;
    1.18 -        winchip*)                     CT_TARGET_ARCH=i486;;
    1.19 -        pentium|pentium-mmx|c3*)      CT_TARGET_ARCH=i586;;
    1.20 -        pentiumpro|pentium*|athlon*)  CT_TARGET_ARCH=i686;;
    1.21 -        *)                            CT_TARGET_ARCH=i586;;
    1.22 -    esac
    1.23  
    1.24 -    # The kernel ARCH:
    1.25 -    CT_KERNEL_ARCH=i386
    1.26 +    # Override the architecture part of the tuple:
    1.27 +    if [ "${CT_ARCH_64}" = "y" ]; then
    1.28 +        CT_TARGET_ARCH=x86_64
    1.29 +    else
    1.30 +        arch="${CT_ARCH_ARCH}"
    1.31 +        [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
    1.32 +        case "${arch}" in
    1.33 +            "")                           CT_TARGET_ARCH=i386;;
    1.34 +            i386|i486|i586|i686)          CT_TARGET_ARCH="${arch}";;
    1.35 +            winchip*)                     CT_TARGET_ARCH=i486;;
    1.36 +            pentium|pentium-mmx|c3*)      CT_TARGET_ARCH=i586;;
    1.37 +            pentiumpro|pentium*|athlon*)  CT_TARGET_ARCH=i686;;
    1.38 +            *)                            CT_TARGET_ARCH=i586;;
    1.39 +        esac
    1.40 +    fi
    1.41  }