arch/x86: commonalise the 32- and 64-bit x86 arch
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Nov 17 11:51:57 2009 +0100 (2009-11-17)
changeset 16355d1936ad5ba8
parent 1634 186c71e3ceb0
child 1636 3167f947f93f
arch/x86: commonalise the 32- and 64-bit x86 arch
config/arch/x86.in
config/arch/x86_64.in
samples/i586-geode-linux-uclibc/crosstool.config
samples/i686-nptl-linux-gnu/crosstool.config
samples/x86_64-unknown-linux-gnu/crosstool.config
samples/x86_64-unknown-linux-uclibc/crosstool.config
scripts/build/arch/x86.sh
scripts/build/arch/x86_64.sh
     1.1 --- a/config/arch/x86.in	Tue Nov 17 11:33:59 2009 +0100
     1.2 +++ b/config/arch/x86.in	Tue Nov 17 11:51:57 2009 +0100
     1.3 @@ -1,10 +1,14 @@
     1.4  # x86 specific options
     1.5  
     1.6  config ARCH_x86
     1.7 +    select ARCH_SUPPORTS_32
     1.8 +    select ARCH_SUPPORTS_64
     1.9 +    select ARCH_DEFAULT_32
    1.10      select ARCH_USE_MMU
    1.11      select ARCH_SUPPORT_ARCH
    1.12      select ARCH_SUPPORT_CPU
    1.13      select ARCH_SUPPORT_TUNE
    1.14      help
    1.15        The x86 architecture, as defined by:
    1.16 -        http://www.intel.com/
    1.17 +        32-bit (ia32) : http://www.intel.com/
    1.18 +        64-bit (amd64): http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html
     2.1 --- a/config/arch/x86_64.in	Tue Nov 17 11:33:59 2009 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,11 +0,0 @@
     2.4 -# x86_64 specific options
     2.5 -
     2.6 -config ARCH_x86_64
     2.7 -    select ARCH_64
     2.8 -    select ARCH_USE_MMU
     2.9 -    select ARCH_SUPPORT_ARCH
    2.10 -    select ARCH_SUPPORT_CPU
    2.11 -    select ARCH_SUPPORT_TUNE
    2.12 -    help
    2.13 -      The x86_64 architecture, as defined by:
    2.14 -        http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html
     3.1 --- a/samples/i586-geode-linux-uclibc/crosstool.config	Tue Nov 17 11:33:59 2009 +0100
     3.2 +++ b/samples/i586-geode-linux-uclibc/crosstool.config	Tue Nov 17 11:51:57 2009 +0100
     3.3 @@ -1,7 +1,7 @@
     3.4  #
     3.5  # Automatically generated make config: don't edit
     3.6 -# crosstool-NG version: hg_default@1596_241387704817
     3.7 -# Wed Oct 28 19:23:31 2009
     3.8 +# crosstool-NG version: hg_default@1635_19977a0c46c5
     3.9 +# Tue Nov 17 11:47:12 2009
    3.10  #
    3.11  
    3.12  #
    3.13 @@ -49,6 +49,7 @@
    3.14  # CT_PATCH_LOCAL_BUNDLED is not set
    3.15  # CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
    3.16  # CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
    3.17 +# CT_PATCH_NONE is not set
    3.18  CT_PATCH_ORDER="bundled"
    3.19  # CT_PATCH_SINGLE is not set
    3.20  # CT_PATCH_USE_LOCAL is not set
    3.21 @@ -88,6 +89,8 @@
    3.22  # CT_ARCH_64 is not set
    3.23  # CT_ARCH_SUPPORTS_BOTH_MMU is not set
    3.24  # CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
    3.25 +# CT_ARCH_SUPPORTS_32 is not set
    3.26 +# CT_ARCH_SUPPORTS_64 is not set
    3.27  CT_ARCH_SUPPORT_ARCH=y
    3.28  # CT_ARCH_SUPPORT_ABI is not set
    3.29  CT_ARCH_SUPPORT_CPU=y
    3.30 @@ -96,9 +99,13 @@
    3.31  # CT_ARCH_DEFAULT_HAS_MMU is not set
    3.32  # CT_ARCH_DEFAULT_BE is not set
    3.33  # CT_ARCH_DEFAULT_LE is not set
    3.34 +CT_ARCH_DEFAULT_32=y
    3.35 +# CT_ARCH_DEFAULT_64 is not set
    3.36  CT_ARCH_ARCH="pentium-mmx"
    3.37  CT_ARCH_CPU=""
    3.38  CT_ARCH_TUNE=""
    3.39 +# CT_ARCH_32b is not set
    3.40 +# CT_ARCH_64b is not set
    3.41  CT_ARCH_FLOAT_HW=y
    3.42  # CT_ARCH_FLOAT_SW is not set
    3.43  CT_TARGET_CFLAGS=""
    3.44 @@ -113,10 +120,10 @@
    3.45  # CT_ARCH_ia64 is not set
    3.46  # CT_ARCH_mips is not set
    3.47  # CT_ARCH_powerpc is not set
    3.48 -# CT_ARCH_powerpc64 is not set
    3.49 +# CT_ARCH_s390 is not set
    3.50 +# CT_ARCH_s390x is not set
    3.51  # CT_ARCH_sh is not set
    3.52  CT_ARCH_x86=y
    3.53 -# CT_ARCH_x86_64 is not set
    3.54  CT_ARCH_USE_MMU=y
    3.55  
    3.56  #
    3.57 @@ -265,15 +272,16 @@
    3.58  CT_CC_LANG_CXX=y
    3.59  CT_CC_LANG_FORTRAN=y
    3.60  CT_CC_LANG_JAVA=y
    3.61 -CT_LIBC="uClibc"
    3.62  
    3.63  #
    3.64  # C-library
    3.65  #
    3.66 +CT_LIBC="uClibc"
    3.67  CT_LIBC_VERSION="0.9.30.1"
    3.68  # CT_LIBC_eglibc is not set
    3.69  # CT_LIBC_glibc is not set
    3.70  # CT_LIBC_newlib is not set
    3.71 +# CT_LIBC_none is not set
    3.72  CT_LIBC_uClibc=y
    3.73  CT_LIBC_V_0_9_30_1=y
    3.74  # CT_LIBC_V_0_9_30 is not set
    3.75 @@ -293,13 +301,13 @@
    3.76  CT_LIBC_UCLIBC_BUILD_CROSS_LDD=y
    3.77  CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
    3.78  # CT_LIBC_UCLIBC_LOCALES is not set
    3.79 +# CT_LIBC_SUPPORT_NPTL is not set
    3.80 +CT_LIBC_SUPPORT_LINUXTHREADS=y
    3.81 +CT_THREADS="linuxthreads"
    3.82  
    3.83  #
    3.84  # Common C library options
    3.85  #
    3.86 -# CT_LIBC_SUPPORT_NPTL is not set
    3.87 -CT_LIBC_SUPPORT_LINUXTHREADS=y
    3.88 -CT_THREADS="linuxthreads"
    3.89  # CT_THREADS_NPTL is not set
    3.90  CT_THREADS_LINUXTHREADS=y
    3.91  # CT_THREADS_NONE is not set
     4.1 --- a/samples/i686-nptl-linux-gnu/crosstool.config	Tue Nov 17 11:33:59 2009 +0100
     4.2 +++ b/samples/i686-nptl-linux-gnu/crosstool.config	Tue Nov 17 11:51:57 2009 +0100
     4.3 @@ -1,7 +1,7 @@
     4.4  #
     4.5  # Automatically generated make config: don't edit
     4.6 -# crosstool-NG version: hg_default@1596_241387704817
     4.7 -# Wed Oct 28 19:23:53 2009
     4.8 +# crosstool-NG version: hg_default@1635_19977a0c46c5
     4.9 +# Tue Nov 17 11:47:39 2009
    4.10  #
    4.11  
    4.12  #
    4.13 @@ -49,6 +49,7 @@
    4.14  # CT_PATCH_LOCAL_BUNDLED is not set
    4.15  # CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
    4.16  # CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
    4.17 +# CT_PATCH_NONE is not set
    4.18  CT_PATCH_ORDER="bundled"
    4.19  # CT_PATCH_SINGLE is not set
    4.20  # CT_PATCH_USE_LOCAL is not set
    4.21 @@ -88,6 +89,8 @@
    4.22  # CT_ARCH_64 is not set
    4.23  # CT_ARCH_SUPPORTS_BOTH_MMU is not set
    4.24  # CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
    4.25 +# CT_ARCH_SUPPORTS_32 is not set
    4.26 +# CT_ARCH_SUPPORTS_64 is not set
    4.27  CT_ARCH_SUPPORT_ARCH=y
    4.28  # CT_ARCH_SUPPORT_ABI is not set
    4.29  CT_ARCH_SUPPORT_CPU=y
    4.30 @@ -96,9 +99,13 @@
    4.31  # CT_ARCH_DEFAULT_HAS_MMU is not set
    4.32  # CT_ARCH_DEFAULT_BE is not set
    4.33  # CT_ARCH_DEFAULT_LE is not set
    4.34 +CT_ARCH_DEFAULT_32=y
    4.35 +# CT_ARCH_DEFAULT_64 is not set
    4.36  CT_ARCH_ARCH="i686"
    4.37  CT_ARCH_CPU=""
    4.38  CT_ARCH_TUNE=""
    4.39 +# CT_ARCH_32b is not set
    4.40 +# CT_ARCH_64b is not set
    4.41  CT_ARCH_FLOAT_HW=y
    4.42  # CT_ARCH_FLOAT_SW is not set
    4.43  CT_TARGET_CFLAGS=""
    4.44 @@ -113,10 +120,10 @@
    4.45  # CT_ARCH_ia64 is not set
    4.46  # CT_ARCH_mips is not set
    4.47  # CT_ARCH_powerpc is not set
    4.48 -# CT_ARCH_powerpc64 is not set
    4.49 +# CT_ARCH_s390 is not set
    4.50 +# CT_ARCH_s390x is not set
    4.51  # CT_ARCH_sh is not set
    4.52  CT_ARCH_x86=y
    4.53 -# CT_ARCH_x86_64 is not set
    4.54  CT_ARCH_USE_MMU=y
    4.55  
    4.56  #
    4.57 @@ -265,16 +272,18 @@
    4.58  CT_CC_LANG_CXX=y
    4.59  CT_CC_LANG_FORTRAN=y
    4.60  CT_CC_LANG_JAVA=y
    4.61 -CT_LIBC="glibc"
    4.62  
    4.63  #
    4.64  # C-library
    4.65  #
    4.66 +CT_LIBC="glibc"
    4.67  CT_LIBC_VERSION="2.9"
    4.68  # CT_LIBC_eglibc is not set
    4.69  CT_LIBC_glibc=y
    4.70  # CT_LIBC_newlib is not set
    4.71 +# CT_LIBC_none is not set
    4.72  # CT_LIBC_uClibc is not set
    4.73 +# CT_LIBC_V_2_10_1 is not set
    4.74  CT_LIBC_V_2_9=y
    4.75  # CT_LIBC_V_2_8 is not set
    4.76  # CT_LIBC_V_2_7 is not set
    4.77 @@ -300,13 +309,13 @@
    4.78  CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
    4.79  # CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
    4.80  CT_LIBC_GLIBC_MIN_KERNEL="2.6.31.1"
    4.81 +CT_LIBC_SUPPORT_NPTL=y
    4.82 +CT_LIBC_SUPPORT_LINUXTHREADS=y
    4.83 +CT_THREADS="nptl"
    4.84  
    4.85  #
    4.86  # Common C library options
    4.87  #
    4.88 -CT_LIBC_SUPPORT_NPTL=y
    4.89 -CT_LIBC_SUPPORT_LINUXTHREADS=y
    4.90 -CT_THREADS="nptl"
    4.91  CT_THREADS_NPTL=y
    4.92  # CT_THREADS_LINUXTHREADS is not set
    4.93  # CT_THREADS_NONE is not set
     5.1 --- a/samples/x86_64-unknown-linux-gnu/crosstool.config	Tue Nov 17 11:33:59 2009 +0100
     5.2 +++ b/samples/x86_64-unknown-linux-gnu/crosstool.config	Tue Nov 17 11:51:57 2009 +0100
     5.3 @@ -1,7 +1,7 @@
     5.4  #
     5.5  # Automatically generated make config: don't edit
     5.6 -# crosstool-NG version: hg_default@1596_241387704817
     5.7 -# Wed Oct 28 23:20:03 2009
     5.8 +# crosstool-NG version: hg_default@1635_19977a0c46c5
     5.9 +# Tue Nov 17 11:48:39 2009
    5.10  #
    5.11  
    5.12  #
    5.13 @@ -49,6 +49,7 @@
    5.14  # CT_PATCH_LOCAL_BUNDLED is not set
    5.15  # CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
    5.16  # CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
    5.17 +# CT_PATCH_NONE is not set
    5.18  CT_PATCH_ORDER="bundled"
    5.19  # CT_PATCH_SINGLE is not set
    5.20  # CT_PATCH_USE_LOCAL is not set
    5.21 @@ -84,10 +85,12 @@
    5.22  #
    5.23  # Target options
    5.24  #
    5.25 -CT_ARCH="x86_64"
    5.26 +CT_ARCH="x86"
    5.27  CT_ARCH_64=y
    5.28  # CT_ARCH_SUPPORTS_BOTH_MMU is not set
    5.29  # CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
    5.30 +CT_ARCH_SUPPORTS_32=y
    5.31 +CT_ARCH_SUPPORTS_64=y
    5.32  CT_ARCH_SUPPORT_ARCH=y
    5.33  # CT_ARCH_SUPPORT_ABI is not set
    5.34  CT_ARCH_SUPPORT_CPU=y
    5.35 @@ -96,9 +99,13 @@
    5.36  # CT_ARCH_DEFAULT_HAS_MMU is not set
    5.37  # CT_ARCH_DEFAULT_BE is not set
    5.38  # CT_ARCH_DEFAULT_LE is not set
    5.39 +CT_ARCH_DEFAULT_32=y
    5.40 +# CT_ARCH_DEFAULT_64 is not set
    5.41  CT_ARCH_ARCH=""
    5.42  CT_ARCH_CPU=""
    5.43  CT_ARCH_TUNE=""
    5.44 +# CT_ARCH_32b is not set
    5.45 +CT_ARCH_64b=y
    5.46  CT_ARCH_FLOAT_HW=y
    5.47  # CT_ARCH_FLOAT_SW is not set
    5.48  CT_TARGET_CFLAGS=""
    5.49 @@ -113,10 +120,10 @@
    5.50  # CT_ARCH_ia64 is not set
    5.51  # CT_ARCH_mips is not set
    5.52  # CT_ARCH_powerpc is not set
    5.53 -# CT_ARCH_powerpc64 is not set
    5.54 +# CT_ARCH_s390 is not set
    5.55 +# CT_ARCH_s390x is not set
    5.56  # CT_ARCH_sh is not set
    5.57 -# CT_ARCH_x86 is not set
    5.58 -CT_ARCH_x86_64=y
    5.59 +CT_ARCH_x86=y
    5.60  CT_ARCH_USE_MMU=y
    5.61  
    5.62  #
    5.63 @@ -265,16 +272,18 @@
    5.64  CT_CC_LANG_CXX=y
    5.65  CT_CC_LANG_FORTRAN=y
    5.66  CT_CC_LANG_JAVA=y
    5.67 -CT_LIBC="glibc"
    5.68  
    5.69  #
    5.70  # C-library
    5.71  #
    5.72 +CT_LIBC="glibc"
    5.73  CT_LIBC_VERSION="2.9"
    5.74  # CT_LIBC_eglibc is not set
    5.75  CT_LIBC_glibc=y
    5.76  # CT_LIBC_newlib is not set
    5.77 +# CT_LIBC_none is not set
    5.78  # CT_LIBC_uClibc is not set
    5.79 +# CT_LIBC_V_2_10_1 is not set
    5.80  CT_LIBC_V_2_9=y
    5.81  # CT_LIBC_V_2_8 is not set
    5.82  # CT_LIBC_V_2_7 is not set
    5.83 @@ -300,13 +309,13 @@
    5.84  CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
    5.85  # CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
    5.86  CT_LIBC_GLIBC_MIN_KERNEL="2.6.31.1"
    5.87 +CT_LIBC_SUPPORT_NPTL=y
    5.88 +CT_LIBC_SUPPORT_LINUXTHREADS=y
    5.89 +CT_THREADS="nptl"
    5.90  
    5.91  #
    5.92  # Common C library options
    5.93  #
    5.94 -CT_LIBC_SUPPORT_NPTL=y
    5.95 -CT_LIBC_SUPPORT_LINUXTHREADS=y
    5.96 -CT_THREADS="nptl"
    5.97  CT_THREADS_NPTL=y
    5.98  # CT_THREADS_LINUXTHREADS is not set
    5.99  # CT_THREADS_NONE is not set
     6.1 --- a/samples/x86_64-unknown-linux-uclibc/crosstool.config	Tue Nov 17 11:33:59 2009 +0100
     6.2 +++ b/samples/x86_64-unknown-linux-uclibc/crosstool.config	Tue Nov 17 11:51:57 2009 +0100
     6.3 @@ -1,7 +1,7 @@
     6.4  #
     6.5  # Automatically generated make config: don't edit
     6.6 -# crosstool-NG version: hg_default@1596_241387704817
     6.7 -# Wed Oct 28 23:20:18 2009
     6.8 +# crosstool-NG version: hg_default@1635_19977a0c46c5
     6.9 +# Tue Nov 17 11:51:38 2009
    6.10  #
    6.11  
    6.12  #
    6.13 @@ -49,6 +49,7 @@
    6.14  # CT_PATCH_LOCAL_BUNDLED is not set
    6.15  # CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
    6.16  # CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
    6.17 +# CT_PATCH_NONE is not set
    6.18  CT_PATCH_ORDER="bundled"
    6.19  # CT_PATCH_SINGLE is not set
    6.20  # CT_PATCH_USE_LOCAL is not set
    6.21 @@ -84,10 +85,12 @@
    6.22  #
    6.23  # Target options
    6.24  #
    6.25 -CT_ARCH="x86_64"
    6.26 +CT_ARCH="x86"
    6.27  CT_ARCH_64=y
    6.28  # CT_ARCH_SUPPORTS_BOTH_MMU is not set
    6.29  # CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
    6.30 +CT_ARCH_SUPPORTS_32=y
    6.31 +CT_ARCH_SUPPORTS_64=y
    6.32  CT_ARCH_SUPPORT_ARCH=y
    6.33  # CT_ARCH_SUPPORT_ABI is not set
    6.34  CT_ARCH_SUPPORT_CPU=y
    6.35 @@ -96,9 +99,13 @@
    6.36  # CT_ARCH_DEFAULT_HAS_MMU is not set
    6.37  # CT_ARCH_DEFAULT_BE is not set
    6.38  # CT_ARCH_DEFAULT_LE is not set
    6.39 -CT_ARCH_ARCH="k8"
    6.40 +CT_ARCH_DEFAULT_32=y
    6.41 +# CT_ARCH_DEFAULT_64 is not set
    6.42 +CT_ARCH_ARCH=""
    6.43  CT_ARCH_CPU=""
    6.44  CT_ARCH_TUNE=""
    6.45 +# CT_ARCH_32b is not set
    6.46 +CT_ARCH_64b=y
    6.47  CT_ARCH_FLOAT_HW=y
    6.48  # CT_ARCH_FLOAT_SW is not set
    6.49  CT_TARGET_CFLAGS=""
    6.50 @@ -113,10 +120,16 @@
    6.51  # CT_ARCH_ia64 is not set
    6.52  # CT_ARCH_mips is not set
    6.53  # CT_ARCH_powerpc is not set
    6.54 -# CT_ARCH_powerpc64 is not set
    6.55 +# CT_ARCH_s390 is not set
    6.56 +# CT_ARCH_s390x is not set
    6.57  # CT_ARCH_sh is not set
    6.58 -# CT_ARCH_x86 is not set
    6.59 -CT_ARCH_x86_64=y
    6.60 +CT_ARCH_x86=y
    6.61 +# CT_ARCH_ALPHA_EV4 is not set
    6.62 +# CT_ARCH_ALPHA_EV45 is not set
    6.63 +# CT_ARCH_ALPHA_EV5 is not set
    6.64 +# CT_ARCH_ALPHA_EV56 is not set
    6.65 +# CT_ARCH_ALPHA_EV6 is not set
    6.66 +# CT_ARCH_ALPHA_EV67 is not set
    6.67  CT_ARCH_USE_MMU=y
    6.68  
    6.69  #
    6.70 @@ -265,15 +278,16 @@
    6.71  CT_CC_LANG_CXX=y
    6.72  CT_CC_LANG_FORTRAN=y
    6.73  CT_CC_LANG_JAVA=y
    6.74 -CT_LIBC="uClibc"
    6.75  
    6.76  #
    6.77  # C-library
    6.78  #
    6.79 +CT_LIBC="uClibc"
    6.80  CT_LIBC_VERSION="0.9.30.1"
    6.81  # CT_LIBC_eglibc is not set
    6.82  # CT_LIBC_glibc is not set
    6.83  # CT_LIBC_newlib is not set
    6.84 +# CT_LIBC_none is not set
    6.85  CT_LIBC_uClibc=y
    6.86  CT_LIBC_V_0_9_30_1=y
    6.87  # CT_LIBC_V_0_9_30 is not set
    6.88 @@ -293,13 +307,13 @@
    6.89  CT_LIBC_UCLIBC_BUILD_CROSS_LDD=y
    6.90  CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
    6.91  # CT_LIBC_UCLIBC_LOCALES is not set
    6.92 +# CT_LIBC_SUPPORT_NPTL is not set
    6.93 +CT_LIBC_SUPPORT_LINUXTHREADS=y
    6.94 +CT_THREADS="linuxthreads"
    6.95  
    6.96  #
    6.97  # Common C library options
    6.98  #
    6.99 -# CT_LIBC_SUPPORT_NPTL is not set
   6.100 -CT_LIBC_SUPPORT_LINUXTHREADS=y
   6.101 -CT_THREADS="linuxthreads"
   6.102  # CT_THREADS_NPTL is not set
   6.103  CT_THREADS_LINUXTHREADS=y
   6.104  # CT_THREADS_NONE is not set
     7.1 --- a/scripts/build/arch/x86.sh	Tue Nov 17 11:33:59 2009 +0100
     7.2 +++ b/scripts/build/arch/x86.sh	Tue Nov 17 11:51:57 2009 +0100
     7.3 @@ -1,22 +1,22 @@
     7.4  # Compute x86-specific values
     7.5  
     7.6 -# This one really need a little love! :-(
     7.7 +# This one really needs a little love! :-(
     7.8  
     7.9  CT_DoArchTupleValues() {
    7.10 -    # The architecture part of the tuple:
    7.11 -    arch="${CT_ARCH_ARCH}"
    7.12 -    [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
    7.13 -    case "${arch}" in
    7.14 -        nocona|athlon*64|k8|athlon-fx|opteron)
    7.15 -            CT_DoError "Architecture is x86 (32-bit) but selected processor is \"${arch}\" (64-bit)";;
    7.16 -        "")                           CT_TARGET_ARCH=i386;;
    7.17 -        i386|i486|i586|i686)          CT_TARGET_ARCH="${arch}";;
    7.18 -        winchip*)                     CT_TARGET_ARCH=i486;;
    7.19 -        pentium|pentium-mmx|c3*)      CT_TARGET_ARCH=i586;;
    7.20 -        pentiumpro|pentium*|athlon*)  CT_TARGET_ARCH=i686;;
    7.21 -        *)                            CT_TARGET_ARCH=i586;;
    7.22 -    esac
    7.23  
    7.24 -    # The kernel ARCH:
    7.25 -    CT_KERNEL_ARCH=i386
    7.26 +    # Override the architecture part of the tuple:
    7.27 +    if [ "${CT_ARCH_64}" = "y" ]; then
    7.28 +        CT_TARGET_ARCH=x86_64
    7.29 +    else
    7.30 +        arch="${CT_ARCH_ARCH}"
    7.31 +        [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
    7.32 +        case "${arch}" in
    7.33 +            "")                           CT_TARGET_ARCH=i386;;
    7.34 +            i386|i486|i586|i686)          CT_TARGET_ARCH="${arch}";;
    7.35 +            winchip*)                     CT_TARGET_ARCH=i486;;
    7.36 +            pentium|pentium-mmx|c3*)      CT_TARGET_ARCH=i586;;
    7.37 +            pentiumpro|pentium*|athlon*)  CT_TARGET_ARCH=i686;;
    7.38 +            *)                            CT_TARGET_ARCH=i586;;
    7.39 +        esac
    7.40 +    fi
    7.41  }
     8.1 --- a/scripts/build/arch/x86_64.sh	Tue Nov 17 11:33:59 2009 +0100
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,6 +0,0 @@
     8.4 -# Compute x86_64-specific values
     8.5 -
     8.6 -CT_DoArchTupleValues() {
     8.7 -    # The architecture part of the tuple:
     8.8 -    CT_TARGET_ARCH="${CT_ARCH}"
     8.9 -}