arch: add hidden config knobs for 32- and 64-bit support and select
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Nov 17 09:27:38 2009 +0100 (2009-11-17)
changeset 163395c28d483690
parent 1632 c7d0e5a017c9
child 1634 186c71e3ceb0
arch: add hidden config knobs for 32- and 64-bit support and select

Add new hidden config knobs that architectures can select to
say whether they support 32- or 64-bit variants, and which
they default to.
config/target.in
     1.1 --- a/config/target.in	Mon Nov 16 22:37:39 2009 +0100
     1.2 +++ b/config/target.in	Tue Nov 17 09:27:38 2009 +0100
     1.3 @@ -5,6 +5,9 @@
     1.4  config ARCH
     1.5      string
     1.6  
     1.7 +# Note: when all archs have migrated to the 32/64 bit selection,
     1.8 +# remove this option, and rename the config options in the bitness
     1.9 +# choice, below.
    1.10  config ARCH_64
    1.11      bool
    1.12      default n
    1.13 @@ -12,6 +15,8 @@
    1.14  # Pre-declare target optimisation variables
    1.15  config ARCH_SUPPORTS_BOTH_MMU
    1.16  config ARCH_SUPPORTS_BOTH_ENDIAN
    1.17 +config ARCH_SUPPORTS_32
    1.18 +config ARCH_SUPPORTS_64
    1.19  config ARCH_SUPPORT_ARCH
    1.20  config ARCH_SUPPORT_ABI
    1.21  config ARCH_SUPPORT_CPU
    1.22 @@ -21,6 +26,8 @@
    1.23  config ARCH_DEFAULT_HAS_MMU
    1.24  config ARCH_DEFAULT_BE
    1.25  config ARCH_DEFAULT_LE
    1.26 +config ARCH_DEFAULT_32
    1.27 +config ARCH_DEFAULT_64
    1.28  
    1.29  config ARCH_ARCH
    1.30  config ARCH_ABI
    1.31 @@ -29,6 +36,8 @@
    1.32  config ARCH_FPU
    1.33  config ARCH_BE
    1.34  config ARCH_LE
    1.35 +config ARCH_32b
    1.36 +config ARCH_64b
    1.37  config ARCH_FLOAT_HW
    1.38  config ARCH_FLOAT_SW
    1.39  config TARGET_CFLAGS
    1.40 @@ -94,6 +103,42 @@
    1.41  endchoice
    1.42  
    1.43  #--------------------------------------
    1.44 +config ARCH_SUPPORTS_32
    1.45 +    bool
    1.46 +    default n
    1.47 +
    1.48 +config ARCH_SUPPORTS_64
    1.49 +    bool
    1.50 +    default n
    1.51 +
    1.52 +config ARCH_DEFAULT_32
    1.53 +    bool
    1.54 +    default n
    1.55 +
    1.56 +config ARCH_DEFAULT_64
    1.57 +    bool
    1.58 +    default n
    1.59 +
    1.60 +choice
    1.61 +    bool
    1.62 +    prompt "Bitness:"
    1.63 +    default ARCH_32b if ARCH_DEFAULT_32
    1.64 +    default ARCH_64b if ARCH_DEFAULT_64
    1.65 +
    1.66 +config ARCH_32b
    1.67 +    bool
    1.68 +    prompt "32-bit"
    1.69 +    depends on ARCH_SUPPORTS_32
    1.70 +
    1.71 +config ARCH_64b
    1.72 +    bool
    1.73 +    prompt "64-bit"
    1.74 +    depends on ARCH_SUPPORTS_64
    1.75 +    select ARCH_64
    1.76 +
    1.77 +endchoice
    1.78 +
    1.79 +#--------------------------------------
    1.80  comment "Target optimisations"
    1.81  
    1.82  config ARCH_SUPPORT_ARCH