config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Mar 28 01:05:18 2011 +0200 (2011-03-28)
changeset 2362 0888065f8c4d
parent 2361 e65be7e72d8a
child 2363 bc2714299363
permissions -rw-r--r--
cc/gcc: cleanup the _or_later logic

So far, we've had a version always select appropriate _or_later option,
which in turn would select all previous _or_later options.

Because the dependencies on companion libs were cumulative, that was
working OK. But the upcoming 4.6 will no longer depend on libelf, so
we can't keep the cumulative scheme we've been using so far.

Have each release family select the corresponding dependencies, instead
of relying on selecting previous _or_later.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 # Compiler options
     2 
     3 config CC_gcc
     4     select CC_SUPPORT_CXX
     5     select CC_SUPPORT_FORTRAN
     6     select CC_SUPPORT_JAVA
     7     select CC_SUPPORT_ADA
     8     select CC_SUPPORT_OBJC
     9     select CC_SUPPORT_OBJCXX
    10     help
    11       gcc is the full-blown GNU compiler. This is what most people will choose.
    12       
    13       gcc supports many languages, a powerful code parser, optimised binary
    14       output, and lots of other features.
    15 
    16 choice
    17     bool
    18     prompt "gcc version"
    19 # Don't remove next line
    20 # CT_INSERT_VERSION_BELOW
    21 
    22 config CC_V_linaro_4_5_2011_03_0
    23     bool
    24     prompt "linaro-4.5-2011.03-0 (EXPERIMENTAL)"
    25     depends on EXPERIMENTAL
    26     select CC_GCC_4_5
    27 
    28 config CC_V_4_5_2
    29     bool
    30     prompt "4.5.2 (EXPERIMENTAL)"
    31     depends on EXPERIMENTAL
    32     select CC_GCC_4_5
    33 
    34 config CC_V_4_5_1
    35     bool
    36     prompt "4.5.1 (EXPERIMENTAL)"
    37     depends on EXPERIMENTAL
    38     select CC_GCC_4_5
    39 
    40 config CC_V_4_5_0
    41     bool
    42     prompt "4.5.0 (EXPERIMENTAL)"
    43     depends on EXPERIMENTAL
    44     select CC_GCC_4_5
    45 
    46 
    47 config CC_V_linaro_4_4_2011_02_0
    48     bool
    49     prompt "linaro-4.4-2011.02-0 (EXPERIMENTAL)"
    50     depends on EXPERIMENTAL
    51     select CC_GCC_4_4
    52 
    53 config CC_V_4_4_5
    54     bool
    55     prompt "4.4.5"
    56     select CC_GCC_4_4
    57 
    58 config CC_V_4_4_4
    59     bool
    60     prompt "4.4.4"
    61     select CC_GCC_4_4
    62 
    63 config CC_V_4_4_3
    64     bool
    65     prompt "4.4.3"
    66     select CC_GCC_4_4
    67 
    68 config CC_V_4_4_2
    69     bool
    70     prompt "4.4.2"
    71     select CC_GCC_4_4
    72 
    73 config CC_V_4_4_1
    74     bool
    75     prompt "4.4.1"
    76     select CC_GCC_4_4
    77 
    78 config CC_V_4_4_0
    79     bool
    80     prompt "4.4.0"
    81     select CC_GCC_4_4
    82 
    83 config CC_V_4_3_5
    84     bool
    85     prompt "4.3.5"
    86     select CC_GCC_4_3
    87 
    88 config CC_V_4_3_4
    89     bool
    90     prompt "4.3.4"
    91     select CC_GCC_4_3
    92 
    93 config CC_V_4_3_3
    94     bool
    95     prompt "4.3.3"
    96     select CC_GCC_4_3
    97 
    98 config CC_V_4_3_2
    99     bool
   100     prompt "4.3.2"
   101     select CC_GCC_4_3
   102 
   103 config CC_V_4_3_1
   104     bool
   105     prompt "4.3.1"
   106     select CC_GCC_4_3
   107 
   108 config CC_V_4_2_4
   109     bool
   110     prompt "4.2.4"
   111     select CC_GCC_4_2
   112 
   113 config CC_V_4_2_3
   114     bool
   115     prompt "4.2.3 (OBSOLETE)"
   116     select CC_GCC_4_2
   117     depends on OBSOLETE
   118 
   119 config CC_V_4_2_2
   120     bool
   121     prompt "4.2.2"
   122     select CC_GCC_4_2
   123 
   124 config CC_V_4_2_1
   125     bool
   126     prompt "4.2.1 (OBSOLETE)"
   127     select CC_GCC_4_2
   128     depends on OBSOLETE
   129 
   130 config CC_V_4_2_0
   131     bool
   132     prompt "4.2.0 (OBSOLETE)"
   133     select CC_GCC_4_2
   134     depends on OBSOLETE
   135 
   136 config CC_V_4_1_2
   137     bool
   138     prompt "4.1.2 (OBSOLETE)"
   139     depends on OBSOLETE
   140 
   141 config CC_V_4_0_4
   142     bool
   143     prompt "4.0.4 (OBSOLETE)"
   144     depends on OBSOLETE
   145 
   146 config CC_V_3_4_6
   147     bool
   148     prompt "3.4.6 (OBSOLETE)"
   149     depends on OBSOLETE
   150 
   151 endchoice
   152 
   153 config CC_GCC_4_2
   154     bool
   155     default n
   156     select CC_GCC_4_2_or_later
   157 
   158 config CC_GCC_4_2_or_later
   159     bool
   160     default n
   161 
   162 config CC_GCC_4_3
   163     bool
   164     default n
   165     select CC_GCC_4_3_or_later
   166     select CC_GCC_USE_GMP_MPFR
   167 
   168 config CC_GCC_4_3_or_later
   169     bool
   170     default n
   171     select CC_GCC_4_2_or_later
   172 
   173 config CC_GCC_4_4
   174     bool
   175     default n
   176     select CC_GCC_4_4_or_later
   177     select CC_GCC_USE_GMP_MPFR
   178     select CC_GCC_HAS_GRAPHITE
   179 
   180 config CC_GCC_4_4_or_later
   181     bool
   182     default n
   183     select CC_GCC_4_3_or_later
   184 
   185 config CC_GCC_4_5
   186     bool
   187     default n
   188     select CC_GCC_4_5_or_later
   189     select CC_GCC_USE_GMP_MPFR
   190     select CC_GCC_USE_MPC
   191     select CC_GCC_HAS_GRAPHITE
   192     select CC_GCC_HAS_LTO
   193 
   194 config CC_GCC_4_5_or_later
   195     bool
   196     default n
   197     select CC_GCC_4_4_or_later
   198 
   199 config CC_GCC_HAS_GRAPHITE
   200     bool
   201     default n
   202 
   203 # The way LTO works is a bit twisted.
   204 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
   205 # Basically:
   206 #   - if binutils has plugins: LTO is handled by ld/gold by loading
   207 #     the plugin when linking
   208 #   - if binutils does not have plugins: LTO is handled by collect2
   209 # In any case, LTO support does not depend on plugins, but takes
   210 # advantage of it
   211 config CC_GCC_HAS_LTO
   212     bool
   213     default n
   214 
   215 # Only enable gcc's support for plugins if binutils has it as well
   216 # They are usefull only when doing LTO, but it does no harm enabling
   217 # them even without LTO.
   218 config CC_GCC_ENABLE_PLUGINS
   219     bool
   220     depends on BINUTILS_PLUGINS
   221     depends on ! STATIC_TOOLCHAIN
   222     default y
   223 
   224 # If binutils installs gold, enable support for gold in gcc
   225 config CC_GCC_GOLD
   226     bool
   227     depends on BINUTILS_GOLD_INSTALLED
   228     default y
   229 
   230 config CC_GCC_USE_GMP_MPFR
   231     bool
   232     default n
   233     select GMP_NEEDED
   234     select MPFR_NEEDED
   235 
   236 config CC_GCC_USE_PPL_CLOOG
   237     bool
   238     default n
   239     select PPL_NEEDED
   240     select CLOOG_NEEDED
   241 
   242 config CC_GCC_USE_MPC
   243     bool
   244     default n
   245     select MPC_NEEDED
   246 
   247 config CC_GCC_USE_LIBELF
   248     bool
   249     default n
   250     select LIBELF_NEEDED
   251 
   252 config CC_VERSION
   253     string
   254 # Don't remove next line
   255 # CT_INSERT_VERSION_STRING_BELOW
   256     default "linaro-4.5-2011.03-0" if CC_V_linaro_4_5_2011_03_0
   257     default "4.5.2" if CC_V_4_5_2
   258     default "4.5.1" if CC_V_4_5_1
   259     default "4.5.0" if CC_V_4_5_0
   260     default "linaro-4.4-2011.02-0" if CC_V_linaro_4_4_2011_02_0
   261     default "4.4.5" if CC_V_4_4_5
   262     default "4.4.4" if CC_V_4_4_4
   263     default "4.4.3" if CC_V_4_4_3
   264     default "4.4.2" if CC_V_4_4_2
   265     default "4.4.1" if CC_V_4_4_1
   266     default "4.4.0" if CC_V_4_4_0
   267     default "4.3.5" if CC_V_4_3_5
   268     default "4.3.4" if CC_V_4_3_4
   269     default "4.3.3" if CC_V_4_3_3
   270     default "4.3.2" if CC_V_4_3_2
   271     default "4.3.1" if CC_V_4_3_1
   272     default "4.3.0" if CC_V_4_3_0
   273     default "4.2.4" if CC_V_4_2_4
   274     default "4.2.3" if CC_V_4_2_3
   275     default "4.2.2" if CC_V_4_2_2
   276     default "4.2.1" if CC_V_4_2_1
   277     default "4.2.0" if CC_V_4_2_0
   278     default "4.1.2" if CC_V_4_1_2
   279     default "4.0.4" if CC_V_4_0_4
   280     default "3.4.6" if CC_V_3_4_6
   281 
   282 config CC_LANG_JAVA_USE_ECJ
   283     bool
   284     default y
   285     depends on CC_LANG_JAVA
   286     depends on CC_GCC_4_3_or_later
   287 
   288 config CC_PKGVERSION
   289     string
   290     prompt "gcc ID string"
   291     depends on CC_GCC_4_3_or_later
   292     default "crosstool-NG-${CT_VERSION}"
   293     help
   294       Specify a string that identifies your package. You may wish to include
   295       a build number or build date. This version string will be included in
   296       the output of gcc --version.
   297 
   298       This is passed to the configure flag --with-pkgversion.
   299 
   300 config CC_BUGURL
   301     string
   302     prompt "gcc bug URL"
   303     depends on CC_GCC_4_3_or_later
   304     default ""
   305     help
   306       Specify the URL that users should visit if they wish to report a bug.
   307 
   308 config CC_ENABLE_CXX_FLAGS
   309     string
   310     prompt "Flags to pass to --enable-cxx-flags"
   311     default ""
   312     help
   313       Enter here the value of the gcc's ./configure option --enable-cxx-flags.
   314       Leave empty if you don't know better.
   315       
   316       Note: just pass in the option _value_, that is only the part that goes
   317       after the '=' sign.
   318 
   319 config CC_CORE_EXTRA_CONFIG
   320     string
   321     prompt "Core gcc extra config"
   322     default ""
   323     help
   324       Extra flags to pass onto ./configure when configuring the core gcc.
   325       
   326       The core gcc is a stripped down, C-only compiler needed to build
   327       the C library. Kinda bootstrap gcc, if you wish.
   328 
   329 config CC_EXTRA_CONFIG
   330     string
   331     prompt "gcc extra config"
   332     default ""
   333     depends on ! BARE_METAL
   334     help
   335       Extra flags to pass onto ./configure when configuring gcc.