config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Thu Jan 24 22:21:19 2013 +0100 (2013-01-24)
changeset 3174 239ea86a47f6
parent 3165 d4b4efd6536e
child 3181 a267700e5180
permissions -rw-r--r--
cc/gcc: remove 'sub-level' version form symbols

Now we use defconfig files to store the samples, we have to be a bit more
conservatives in the symbols names, so as to avoid gigantic version bumps
when updating sub-level versions from a package.

For example (using fictitious versions):
- in crosstool-NG 1.17.0, we choose:
- latest gcc is gcc-linaro-4.7-2012.10, which is the default for the
choice in the menuconfig
- gcc-linaro-4.6-2012.10 is selected
- so, sample has an explicit symbol for the selected gcc version, as it
is not the default
- we update to crosstool-NG 1.18.0:
- latest gcc version is gcc-linaro-4.7-2013.01
- gcc-linaro-46 has been updated to gcc-linaro-4.6-2013.01
- as the sample now has no *valid* symbol to set the gcc version, the
default is used, while we would have expected to still use the 4.6
release from linaro, not the 4.7

Get rid of sub-level (ie. the third digit sequence in versions) from the
symbols for linaro versions.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 # Compiler options
     2 #
     3 ## select CC_SUPPORT_CXX
     4 ## select CC_SUPPORT_FORTRAN
     5 ## select CC_SUPPORT_JAVA
     6 ## select CC_SUPPORT_ADA
     7 ## select CC_SUPPORT_OBJC
     8 ## select CC_SUPPORT_OBJCXX
     9 ##
    10 ## help gcc is the full-blown GNU compiler. This is what most people will choose.
    11 ## help
    12 ## help gcc supports many languages, a powerful code parser, optimised binary
    13 ## help output, and lots of other features.
    14 
    15 config CC_GCC_SHOW_LINARO
    16     bool
    17     prompt "Show Linaro versions"
    18     help
    19       Linaro is maintaining some advanced/more stable/experimental versions
    20       of gcc, especially for the ARM architecture.
    21       
    22       Those versions have not been blessed by the gcc comunity (nor have they
    23       been cursed either!), but they look to be pretty much stable, and even
    24       more stable than the upstream versions. YMMV...
    25       
    26       If you do not know what this Linaro stuff is, then simply say 'n' here,
    27       and rest in peace. OTOH, if you know what you are doing, you will be
    28       able to use and enjoy :-) the Linaro versions by saying 'y' here.
    29       
    30       Linaro: http://www.linaro.org/
    31 
    32 choice
    33     bool
    34     prompt "gcc version"
    35 
    36 # Don't remove next line
    37 # CT_INSERT_VERSION_BELOW
    38 
    39 config CC_V_linaro_4_7
    40     bool
    41     prompt "linaro-4.7-2013.01"
    42     depends on CC_GCC_SHOW_LINARO
    43     select CC_GCC_4_7
    44 
    45 config CC_V_4_7_2
    46     bool
    47     prompt "4.7.2"
    48     select CC_GCC_4_7
    49 
    50 config CC_V_4_7_1
    51     bool
    52     prompt "4.7.1"
    53     select CC_GCC_4_7
    54 
    55 config CC_V_4_7_0
    56     bool
    57     prompt "4.7.0"
    58     select CC_GCC_4_7
    59 
    60 config CC_V_linaro_4_6
    61     bool
    62     prompt "linaro-4.6-2013.01"
    63     depends on CC_GCC_SHOW_LINARO
    64     select CC_GCC_4_6
    65 
    66 config CC_V_4_6_3
    67     bool
    68     prompt "4.6.3"
    69     select CC_GCC_4_6
    70 
    71 config CC_V_4_6_2
    72     bool
    73     prompt "4.6.2"
    74     select CC_GCC_4_6
    75 
    76 config CC_V_4_6_1
    77     bool
    78     prompt "4.6.1"
    79     select CC_GCC_4_6
    80 
    81 config CC_V_4_6_0
    82     bool
    83     prompt "4.6.0"
    84     select CC_GCC_4_6
    85 
    86 config CC_V_linaro_4_5
    87     bool
    88     prompt "linaro-4.5-2012.03"
    89     depends on CC_GCC_SHOW_LINARO
    90     select CC_GCC_4_5
    91 
    92 config CC_V_4_5_3
    93     bool
    94     prompt "4.5.3"
    95     select CC_GCC_4_5
    96 
    97 config CC_V_4_5_2
    98     bool
    99     prompt "4.5.2"
   100     select CC_GCC_4_5
   101 
   102 config CC_V_4_5_1
   103     bool
   104     prompt "4.5.1"
   105     select CC_GCC_4_5
   106 
   107 config CC_V_4_5_0
   108     bool
   109     prompt "4.5.0"
   110     select CC_GCC_4_5
   111 
   112 
   113 config CC_V_linaro_4_4
   114     bool
   115     prompt "linaro-4.4-2011.02-0"
   116     depends on CC_GCC_SHOW_LINARO
   117     select CC_GCC_4_4
   118 
   119 config CC_V_4_4_7
   120     bool
   121     prompt "4.4.7"
   122     select CC_GCC_4_4
   123 
   124 config CC_V_4_4_6
   125     bool
   126     prompt "4.4.6"
   127     select CC_GCC_4_4
   128 
   129 config CC_V_4_4_5
   130     bool
   131     prompt "4.4.5"
   132     select CC_GCC_4_4
   133 
   134 config CC_V_4_4_4
   135     bool
   136     prompt "4.4.4"
   137     select CC_GCC_4_4
   138 
   139 config CC_V_4_4_3
   140     bool
   141     prompt "4.4.3"
   142     select CC_GCC_4_4
   143 
   144 config CC_V_4_4_2
   145     bool
   146     prompt "4.4.2"
   147     select CC_GCC_4_4
   148 
   149 config CC_V_4_4_1
   150     bool
   151     prompt "4.4.1"
   152     select CC_GCC_4_4
   153 
   154 config CC_V_4_4_0
   155     bool
   156     prompt "4.4.0"
   157     select CC_GCC_4_4
   158 
   159 config CC_V_4_3_6
   160     bool
   161     prompt "4.3.6"
   162     select CC_GCC_4_3
   163 
   164 config CC_V_4_3_5
   165     bool
   166     prompt "4.3.5"
   167     select CC_GCC_4_3
   168 
   169 config CC_V_4_3_4
   170     bool
   171     prompt "4.3.4"
   172     select CC_GCC_4_3
   173 
   174 config CC_V_4_3_3
   175     bool
   176     prompt "4.3.3"
   177     select CC_GCC_4_3
   178 
   179 config CC_V_4_3_2
   180     bool
   181     prompt "4.3.2"
   182     select CC_GCC_4_3
   183 
   184 config CC_V_4_3_1
   185     bool
   186     prompt "4.3.1"
   187     select CC_GCC_4_3
   188 
   189 config CC_V_4_2_4
   190     bool
   191     prompt "4.2.4"
   192     select CC_GCC_4_2
   193 
   194 # We need that one, it's the only version with avr32 support
   195 # because we have a patch for it
   196 config CC_V_4_2_2
   197     bool
   198     prompt "4.2.2"
   199     select CC_GCC_4_2
   200 
   201 config CC_V_4_1_2
   202     bool
   203     prompt "4.1.2 (OBSOLETE)"
   204     depends on OBSOLETE
   205 
   206 config CC_V_4_0_4
   207     bool
   208     prompt "4.0.4 (OBSOLETE)"
   209     depends on OBSOLETE
   210 
   211 config CC_V_3_4_6
   212     bool
   213     prompt "3.4.6 (OBSOLETE)"
   214     depends on OBSOLETE
   215 
   216 config CC_CUSTOM
   217     bool
   218     prompt "Custom gcc"
   219     depends on EXPERIMENTAL
   220     select CC_GCC_latest
   221 
   222 endchoice
   223 
   224 if CC_CUSTOM
   225 
   226 config CC_CUSTOM_LOCATION
   227     string
   228     prompt "Full path to custom gcc source"
   229     default ""
   230     help
   231       Enter the path to the directory (or tarball) of your source for gcc,
   232       or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/gcc
   233 
   234 endif #CC_CUSTOM
   235 
   236 config CC_GCC_4_2
   237     bool
   238     select CC_GCC_4_2_or_later
   239 
   240 config CC_GCC_4_2_or_later
   241     bool
   242 
   243 config CC_GCC_4_3
   244     bool
   245     select CC_GCC_4_3_or_later
   246     select CC_GCC_USE_GMP_MPFR
   247     select CC_GCC_HAS_PKGVERSION_BUGURL
   248 
   249 config CC_GCC_4_3_or_later
   250     bool
   251     select CC_GCC_4_2_or_later
   252 
   253 config CC_GCC_4_4
   254     bool
   255     select CC_GCC_4_4_or_later
   256     select CC_GCC_USE_GMP_MPFR
   257     select CC_GCC_HAS_GRAPHITE
   258     select CC_GCC_HAS_PKGVERSION_BUGURL
   259 
   260 config CC_GCC_4_4_or_later
   261     bool
   262     select CC_GCC_4_3_or_later
   263 
   264 config CC_GCC_4_5
   265     bool
   266     select CC_GCC_4_5_or_later
   267     select CC_GCC_USE_GMP_MPFR
   268     select CC_GCC_USE_MPC
   269     select CC_GCC_HAS_GRAPHITE
   270     select CC_GCC_HAS_LTO
   271     select CC_GCC_HAS_PKGVERSION_BUGURL
   272     select CC_GCC_HAS_BUILD_ID
   273 
   274 config CC_GCC_4_5_or_later
   275     bool
   276     select CC_GCC_4_4_or_later
   277 
   278 config CC_GCC_4_6
   279     bool
   280     select CC_GCC_4_6_or_later
   281     select CC_GCC_USE_GMP_MPFR
   282     select CC_GCC_USE_MPC
   283     select CC_GCC_HAS_GRAPHITE
   284     select CC_GCC_HAS_LTO
   285     select CC_GCC_HAS_PKGVERSION_BUGURL
   286     select CC_GCC_HAS_BUILD_ID
   287     select CC_GCC_HAS_LIBQUADMATH
   288 
   289 config CC_GCC_4_6_or_later
   290     bool
   291     select CC_GCC_4_5_or_later
   292 
   293 config CC_GCC_4_7
   294     bool
   295     select CC_GCC_4_7_or_later
   296     select CC_GCC_USE_GMP_MPFR
   297     select CC_GCC_USE_MPC
   298     select CC_GCC_HAS_GRAPHITE
   299     select CC_GCC_HAS_LTO
   300     select CC_GCC_HAS_PKGVERSION_BUGURL
   301     select CC_GCC_HAS_BUILD_ID
   302     select CC_GCC_HAS_LNK_HASH_STYLE
   303     select CC_GCC_HAS_LIBQUADMATH
   304 
   305 config CC_GCC_4_7_or_later
   306     bool
   307     select CC_GCC_4_6_or_later
   308 
   309 config CC_GCC_latest
   310     bool
   311     select CC_GCC_4_7_or_later
   312     select CC_GCC_USE_GMP_MPFR
   313     select CC_GCC_USE_MPC
   314     select CC_GCC_HAS_GRAPHITE
   315     select CC_GCC_HAS_LTO
   316     select CC_GCC_HAS_PKGVERSION_BUGURL
   317     select CC_GCC_HAS_BUILD_ID
   318     select CC_GCC_HAS_LNK_HASH_STYLE
   319     select CC_GCC_HAS_LIBQUADMATH
   320 
   321 config CC_GCC_HAS_GRAPHITE
   322     bool
   323 
   324 # The way LTO works is a bit twisted.
   325 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
   326 # Basically:
   327 #   - if binutils has plugins: LTO is handled by ld/gold by loading
   328 #     the plugin when linking
   329 #   - if binutils does not have plugins: LTO is handled by collect2
   330 # In any case, LTO support does not depend on plugins, but takes
   331 # advantage of it
   332 config CC_GCC_HAS_LTO
   333     bool
   334 
   335 config CC_GCC_HAS_PKGVERSION_BUGURL
   336     bool
   337 
   338 config CC_GCC_HAS_BUILD_ID
   339     bool
   340 
   341 config CC_GCC_HAS_LNK_HASH_STYLE
   342     bool
   343 
   344 # Only enable gcc's support for plugins if binutils has it as well
   345 # They are usefull only when doing LTO, but it does no harm enabling
   346 # them even without LTO.
   347 config CC_GCC_ENABLE_PLUGINS
   348     bool
   349     depends on BINUTILS_PLUGINS
   350     depends on ! STATIC_TOOLCHAIN
   351     default y
   352 
   353 # If binutils installs gold, enable support for gold in gcc
   354 config CC_GCC_GOLD
   355     bool
   356     depends on BINUTILS_GOLD_INSTALLED
   357     default y
   358 
   359 config CC_GCC_USE_GMP_MPFR
   360     bool
   361     select GMP_NEEDED
   362     select MPFR_NEEDED
   363 
   364 config CC_GCC_USE_PPL_CLOOG
   365     bool
   366     select PPL_NEEDED
   367     select CLOOG_NEEDED
   368 
   369 config CC_GCC_USE_MPC
   370     bool
   371     select MPC_NEEDED
   372 
   373 config CC_GCC_USE_LIBELF
   374     bool
   375     select LIBELF_NEEDED
   376 
   377 config CC_GCC_HAS_LIBQUADMATH
   378     bool
   379 
   380 config CC_VERSION
   381     string
   382 # Don't remove next line
   383 # CT_INSERT_VERSION_STRING_BELOW
   384     default "linaro-4.7-2013.01" if CC_V_linaro_4_7
   385     default "4.7.2" if CC_V_4_7_2
   386     default "4.7.1" if CC_V_4_7_1
   387     default "4.7.0" if CC_V_4_7_0
   388     default "linaro-4.6-2013.01" if CC_V_linaro_4_6
   389     default "4.6.3" if CC_V_4_6_3
   390     default "4.6.2" if CC_V_4_6_2
   391     default "4.6.1" if CC_V_4_6_1
   392     default "4.6.0" if CC_V_4_6_0
   393     default "linaro-4.5-2012.03" if CC_V_linaro_4_5
   394     default "4.5.3" if CC_V_4_5_3
   395     default "4.5.2" if CC_V_4_5_2
   396     default "4.5.1" if CC_V_4_5_1
   397     default "4.5.0" if CC_V_4_5_0
   398     default "linaro-4.4-2011.02-0" if CC_V_linaro_4_4
   399     default "4.4.7" if CC_V_4_4_7
   400     default "4.4.6" if CC_V_4_4_6
   401     default "4.4.5" if CC_V_4_4_5
   402     default "4.4.4" if CC_V_4_4_4
   403     default "4.4.3" if CC_V_4_4_3
   404     default "4.4.2" if CC_V_4_4_2
   405     default "4.4.1" if CC_V_4_4_1
   406     default "4.4.0" if CC_V_4_4_0
   407     default "4.3.6" if CC_V_4_3_6
   408     default "4.3.5" if CC_V_4_3_5
   409     default "4.3.4" if CC_V_4_3_4
   410     default "4.3.3" if CC_V_4_3_3
   411     default "4.3.2" if CC_V_4_3_2
   412     default "4.3.1" if CC_V_4_3_1
   413     default "4.3.0" if CC_V_4_3_0
   414     default "4.2.4" if CC_V_4_2_4
   415     default "4.2.2" if CC_V_4_2_2
   416     default "4.1.2" if CC_V_4_1_2
   417     default "4.0.4" if CC_V_4_0_4
   418     default "3.4.6" if CC_V_3_4_6
   419     default "custom" if CC_CUSTOM
   420 
   421 config CC_LANG_JAVA_USE_ECJ
   422     bool
   423     default y
   424     depends on CC_LANG_JAVA
   425     depends on CC_GCC_4_3_or_later
   426 
   427 # Fortran always requires GMP+MPFR, whatever the gcc version
   428 config CC_LANG_FORTRAN
   429     select CC_GCC_USE_GMP_MPFR