Do not autodetect 64-bit archs, have them tell be 'select'-ing ARCH_64 in the configuration.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Nov 07 08:09:42 2008 +0000 (2008-11-07)
changeset 103833f695f7773a
parent 1037 f30de763bcce
child 1039 b534a133daf4
Do not autodetect 64-bit archs, have them tell be 'select'-ing ARCH_64 in the configuration.

/trunk/scripts/crosstool.sh | 12 5 7 0 +++++-------
/trunk/docs/overview.txt | 6 6 0 0 ++++++
/trunk/config/target.in | 4 4 0 0 ++++
/trunk/config/arch/x86_64.in | 1 1 0 0 +
/trunk/config/arch/ia64.in | 1 1 0 0 +
5 files changed, 17 insertions(+), 7 deletions(-)
config/arch/ia64.in
config/arch/x86_64.in
config/target.in
docs/overview.txt
scripts/crosstool.sh
     1.1 --- a/config/arch/ia64.in	Fri Nov 07 08:03:32 2008 +0000
     1.2 +++ b/config/arch/ia64.in	Fri Nov 07 08:09:42 2008 +0000
     1.3 @@ -2,6 +2,7 @@
     1.4  # EXPERIMENTAL
     1.5  
     1.6  config ARCH_ia64
     1.7 +    select ARCH_64
     1.8      select ARCH_SUPPORTS_BOTH_ENDIAN
     1.9      help
    1.10        The ia64 architecture, as defined by:
     2.1 --- a/config/arch/x86_64.in	Fri Nov 07 08:03:32 2008 +0000
     2.2 +++ b/config/arch/x86_64.in	Fri Nov 07 08:09:42 2008 +0000
     2.3 @@ -1,6 +1,7 @@
     2.4  # x86_64 specific options
     2.5  
     2.6  config ARCH_x86_64
     2.7 +    select ARCH_64
     2.8      select ARCH_SUPPORT_ARCH
     2.9      select ARCH_SUPPORT_CPU
    2.10      select ARCH_SUPPORT_TUNE
     3.1 --- a/config/target.in	Fri Nov 07 08:03:32 2008 +0000
     3.2 +++ b/config/target.in	Fri Nov 07 08:09:42 2008 +0000
     3.3 @@ -5,6 +5,10 @@
     3.4  config ARCH
     3.5      string
     3.6  
     3.7 +config ARCH_64
     3.8 +    bool
     3.9 +    default n
    3.10 +
    3.11  # Pre-declare target optimisation variables
    3.12  config ARCH_SUPPORT_ARCH
    3.13  config ARCH_SUPPORT_ABI
     4.1 --- a/docs/overview.txt	Fri Nov 07 08:03:32 2008 +0000
     4.2 +++ b/docs/overview.txt	Fri Nov 07 08:09:42 2008 +0000
     4.3 @@ -565,12 +565,18 @@
     4.4               The ARM architecture.
     4.5     + optional:
     4.6         selects adequate associated config options.
     4.7 +       Note: 64-bit architectures *shall* select ARCH_64
     4.8         Eg.:
     4.9           config ARCH_arm
    4.10             select ARCH_SUPPORTS_BOTH_ENDIAN
    4.11             select ARCH_DEFAULT_LE
    4.12             help
    4.13               The ARM architecture.
    4.14 +       Eg.:
    4.15 +         config ARCH_x86_64
    4.16 +            select ARCH_64
    4.17 +            help
    4.18 +              The x86_64 architecture.
    4.19  
    4.20   > other target-specific options, at your discretion. Note however that to
    4.21     avoid name-clashing, such options shall be prefixed with "ARCH_%arch%",
     5.1 --- a/scripts/crosstool.sh	Fri Nov 07 08:03:32 2008 +0000
     5.2 +++ b/scripts/crosstool.sh	Fri Nov 07 08:09:42 2008 +0000
     5.3 @@ -267,13 +267,11 @@
     5.4      # Now, in case we're 64 bits, just have lib64/ be a symlink to lib/
     5.5      # so as to have all libraries in the same directory (we can do that
     5.6      # because we are *not* multilib).
     5.7 -    case "${CT_TARGET}" in
     5.8 -        powerpc64*|ppc64*|x86_64*)
     5.9 -            ln -sf "lib" "${CT_SYSROOT_DIR}/lib64"
    5.10 -            ln -sf "lib" "${CT_SYSROOT_DIR}/usr/lib64"
    5.11 -            ln -sf "sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib64"
    5.12 -            ;;
    5.13 -    esac
    5.14 +    if [ "${CT_ARCH_64}" = "y" ]; then
    5.15 +        ln -sf "lib" "${CT_SYSROOT_DIR}/lib64"
    5.16 +        ln -sf "lib" "${CT_SYSROOT_DIR}/usr/lib64"
    5.17 +        ln -sf "sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib64"
    5.18 +    fi
    5.19  
    5.20      # Canadian-cross are really picky on the way they are built. Tweak the values.
    5.21      CT_UNIQ_BUILD=$(echo "${CT_BUILD}" |sed -r -e 's/-/-build_/')