config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sun May 05 17:59:00 2013 +0200 (2013-05-05)
changeset 3217 15eedf548d33
parent 3213 54b4f454244b
child 3219 db27d12ec7c2
permissions -rw-r--r--
cc/gcc: add preliminray support for 4.8

This means:
- introduce the new symbols for 4.8
- do not always select PPL if graphite is selected

Reported-by: "Plotnikov Dmitry" <leitz@ispras.ru>
[Dmitry did a preliminray patch to add gcc-4.8 support,
which this patch is inspired from]
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.04"
    42     depends on CC_GCC_SHOW_LINARO
    43     select CC_GCC_4_7
    44 
    45 config CC_V_4_7_3
    46     bool
    47     prompt "4.7.3"
    48     select CC_GCC_4_7
    49 
    50 config CC_V_4_7_2
    51     bool
    52     prompt "4.7.2"
    53     select CC_GCC_4_7
    54 
    55 config CC_V_4_7_1
    56     bool
    57     prompt "4.7.1"
    58     select CC_GCC_4_7
    59 
    60 config CC_V_4_7_0
    61     bool
    62     prompt "4.7.0"
    63     select CC_GCC_4_7
    64 
    65 config CC_V_linaro_4_6
    66     bool
    67     prompt "linaro-4.6-2013.04"
    68     depends on CC_GCC_SHOW_LINARO
    69     select CC_GCC_4_6
    70 
    71 config CC_V_4_6_4
    72     bool
    73     prompt "4.6.4"
    74     select CC_GCC_4_6
    75 
    76 config CC_V_4_6_3
    77     bool
    78     prompt "4.6.3"
    79     select CC_GCC_4_6
    80 
    81 config CC_V_4_6_2
    82     bool
    83     prompt "4.6.2"
    84     select CC_GCC_4_6
    85 
    86 config CC_V_4_6_1
    87     bool
    88     prompt "4.6.1"
    89     select CC_GCC_4_6
    90 
    91 config CC_V_4_6_0
    92     bool
    93     prompt "4.6.0"
    94     select CC_GCC_4_6
    95 
    96 config CC_V_linaro_4_5
    97     bool
    98     prompt "linaro-4.5-2012.03"
    99     depends on CC_GCC_SHOW_LINARO
   100     select CC_GCC_4_5
   101 
   102 config CC_V_4_5_3
   103     bool
   104     prompt "4.5.3"
   105     select CC_GCC_4_5
   106 
   107 config CC_V_4_5_2
   108     bool
   109     prompt "4.5.2"
   110     select CC_GCC_4_5
   111 
   112 config CC_V_4_5_1
   113     bool
   114     prompt "4.5.1"
   115     select CC_GCC_4_5
   116 
   117 config CC_V_4_5_0
   118     bool
   119     prompt "4.5.0"
   120     select CC_GCC_4_5
   121 
   122 
   123 config CC_V_linaro_4_4
   124     bool
   125     prompt "linaro-4.4-2011.02-0"
   126     depends on CC_GCC_SHOW_LINARO
   127     select CC_GCC_4_4
   128 
   129 config CC_V_4_4_7
   130     bool
   131     prompt "4.4.7"
   132     select CC_GCC_4_4
   133 
   134 config CC_V_4_4_6
   135     bool
   136     prompt "4.4.6"
   137     select CC_GCC_4_4
   138 
   139 config CC_V_4_4_5
   140     bool
   141     prompt "4.4.5"
   142     select CC_GCC_4_4
   143 
   144 config CC_V_4_4_4
   145     bool
   146     prompt "4.4.4"
   147     select CC_GCC_4_4
   148 
   149 config CC_V_4_4_3
   150     bool
   151     prompt "4.4.3"
   152     select CC_GCC_4_4
   153 
   154 config CC_V_4_4_2
   155     bool
   156     prompt "4.4.2"
   157     select CC_GCC_4_4
   158 
   159 config CC_V_4_4_1
   160     bool
   161     prompt "4.4.1"
   162     select CC_GCC_4_4
   163 
   164 config CC_V_4_4_0
   165     bool
   166     prompt "4.4.0"
   167     select CC_GCC_4_4
   168 
   169 config CC_V_4_3_6
   170     bool
   171     prompt "4.3.6"
   172     select CC_GCC_4_3
   173 
   174 config CC_V_4_3_5
   175     bool
   176     prompt "4.3.5"
   177     select CC_GCC_4_3
   178 
   179 config CC_V_4_3_4
   180     bool
   181     prompt "4.3.4"
   182     select CC_GCC_4_3
   183 
   184 config CC_V_4_3_3
   185     bool
   186     prompt "4.3.3"
   187     select CC_GCC_4_3
   188 
   189 config CC_V_4_3_2
   190     bool
   191     prompt "4.3.2"
   192     select CC_GCC_4_3
   193 
   194 config CC_V_4_3_1
   195     bool
   196     prompt "4.3.1"
   197     select CC_GCC_4_3
   198 
   199 config CC_V_4_2_4
   200     bool
   201     prompt "4.2.4"
   202     select CC_GCC_4_2
   203 
   204 # We need that one, it's the only version with avr32 support
   205 # because we have a patch for it
   206 config CC_V_4_2_2
   207     bool
   208     prompt "4.2.2"
   209     select CC_GCC_4_2
   210 
   211 config CC_V_4_1_2
   212     bool
   213     prompt "4.1.2 (OBSOLETE)"
   214     depends on OBSOLETE
   215 
   216 config CC_V_4_0_4
   217     bool
   218     prompt "4.0.4 (OBSOLETE)"
   219     depends on OBSOLETE
   220 
   221 config CC_V_3_4_6
   222     bool
   223     prompt "3.4.6 (OBSOLETE)"
   224     depends on OBSOLETE
   225 
   226 config CC_CUSTOM
   227     bool
   228     prompt "Custom gcc"
   229     depends on EXPERIMENTAL
   230     select CC_GCC_latest
   231 
   232 endchoice
   233 
   234 if CC_CUSTOM
   235 
   236 config CC_CUSTOM_LOCATION
   237     string
   238     prompt "Full path to custom gcc source"
   239     default ""
   240     help
   241       Enter the path to the directory (or tarball) of your source for gcc,
   242       or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/gcc
   243 
   244 endif #CC_CUSTOM
   245 
   246 config CC_GCC_4_2
   247     bool
   248     select CC_GCC_4_2_or_later
   249 
   250 config CC_GCC_4_2_or_later
   251     bool
   252 
   253 config CC_GCC_4_3
   254     bool
   255     select CC_GCC_4_3_or_later
   256     select CC_GCC_USE_GMP_MPFR
   257     select CC_GCC_HAS_PKGVERSION_BUGURL
   258 
   259 config CC_GCC_4_3_or_later
   260     bool
   261     select CC_GCC_4_2_or_later
   262 
   263 config CC_GCC_4_4
   264     bool
   265     select CC_GCC_4_4_or_later
   266     select CC_GCC_USE_GMP_MPFR
   267     select CC_GCC_HAS_GRAPHITE
   268     select CC_GCC_HAS_PKGVERSION_BUGURL
   269 
   270 config CC_GCC_4_4_or_later
   271     bool
   272     select CC_GCC_4_3_or_later
   273 
   274 config CC_GCC_4_5
   275     bool
   276     select CC_GCC_4_5_or_later
   277     select CC_GCC_USE_GMP_MPFR
   278     select CC_GCC_USE_MPC
   279     select CC_GCC_HAS_GRAPHITE
   280     select CC_GCC_HAS_LTO
   281     select CC_GCC_HAS_PKGVERSION_BUGURL
   282     select CC_GCC_HAS_BUILD_ID
   283 
   284 config CC_GCC_4_5_or_later
   285     bool
   286     select CC_GCC_4_4_or_later
   287 
   288 config CC_GCC_4_6
   289     bool
   290     select CC_GCC_4_6_or_later
   291     select CC_GCC_USE_GMP_MPFR
   292     select CC_GCC_USE_MPC
   293     select CC_GCC_HAS_GRAPHITE
   294     select CC_GCC_HAS_LTO
   295     select CC_GCC_HAS_PKGVERSION_BUGURL
   296     select CC_GCC_HAS_BUILD_ID
   297     select CC_GCC_HAS_LIBQUADMATH
   298 
   299 config CC_GCC_4_6_or_later
   300     bool
   301     select CC_GCC_4_5_or_later
   302 
   303 config CC_GCC_4_7
   304     bool
   305     select CC_GCC_4_7_or_later
   306     select CC_GCC_USE_GMP_MPFR
   307     select CC_GCC_USE_MPC
   308     select CC_GCC_HAS_GRAPHITE
   309     select CC_GCC_HAS_LTO
   310     select CC_GCC_HAS_PKGVERSION_BUGURL
   311     select CC_GCC_HAS_BUILD_ID
   312     select CC_GCC_HAS_LNK_HASH_STYLE
   313     select CC_GCC_HAS_LIBQUADMATH
   314 
   315 config CC_GCC_4_7_or_later
   316     bool
   317     select CC_GCC_4_6_or_later
   318 
   319 config CC_GCC_4_8
   320     bool
   321     select CC_GCC_4_8_or_later
   322     select CC_GCC_USE_GMP_MPFR
   323     select CC_GCC_USE_MPC
   324     select CC_GCC_HAS_GRAPHITE
   325     select CC_GCC_HAS_LTO
   326     select CC_GCC_HAS_PKGVERSION_BUGURL
   327     select CC_GCC_HAS_BUILD_ID
   328     select CC_GCC_HAS_LNK_HASH_STYLE
   329     select CC_GCC_HAS_LIBQUADMATH
   330 
   331 config CC_GCC_4_8_or_later
   332     bool
   333     select CC_GCC_4_7_or_later
   334 
   335 config CC_GCC_latest
   336     bool
   337     select CC_GCC_4_8_or_later
   338     select CC_GCC_USE_GMP_MPFR
   339     select CC_GCC_USE_MPC
   340     select CC_GCC_HAS_GRAPHITE
   341     select CC_GCC_HAS_LTO
   342     select CC_GCC_HAS_PKGVERSION_BUGURL
   343     select CC_GCC_HAS_BUILD_ID
   344     select CC_GCC_HAS_LNK_HASH_STYLE
   345     select CC_GCC_HAS_LIBQUADMATH
   346 
   347 config CC_GCC_HAS_GRAPHITE
   348     bool
   349 
   350 # For graphite: gcc 4.4..4.7 need ppl, while 4.8.. need isl
   351 # Prompt in config/cc/gcc.in.2
   352 config CC_GCC_USE_GRAPHITE
   353     bool
   354     default y
   355     depends on CC_GCC_HAS_GRAPHITE
   356     select CLOOG_NEEDED
   357     select PPL_NEEDED if !CC_GCC_4_8_or_later
   358     select ISL_NEEDED if CC_GCC_4_8_or_later
   359     help
   360       Enable the GRAPHITE loop optimsations.
   361       
   362       On some systems (eg. Cygwin), PPL and/or CLooG (required to enable
   363       GRAPHITE) may not build properly (yet), so you'll have to say 'N'
   364       here (or help debug the issues)
   365 
   366 # The way LTO works is a bit twisted.
   367 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
   368 # Basically:
   369 #   - if binutils has plugins: LTO is handled by ld/gold by loading
   370 #     the plugin when linking
   371 #   - if binutils does not have plugins: LTO is handled by collect2
   372 # In any case, LTO support does not depend on plugins, but takes
   373 # advantage of it
   374 config CC_GCC_HAS_LTO
   375     bool
   376 
   377 # Prompt in config/cc/gcc.in.2
   378 config CC_GCC_USE_LTO
   379     bool
   380     default y
   381     depends on CC_GCC_HAS_LTO
   382     select CC_GCC_USE_LIBELF if CC_GCC_4_5
   383     help
   384       Enable the Link Time Optimisations.
   385 
   386 config CC_GCC_HAS_PKGVERSION_BUGURL
   387     bool
   388 
   389 config CC_GCC_HAS_BUILD_ID
   390     bool
   391 
   392 config CC_GCC_HAS_LNK_HASH_STYLE
   393     bool
   394 
   395 # Only enable gcc's support for plugins if binutils has it as well
   396 # They are usefull only when doing LTO, but it does no harm enabling
   397 # them even without LTO.
   398 config CC_GCC_ENABLE_PLUGINS
   399     bool
   400     depends on BINUTILS_PLUGINS
   401     depends on ! STATIC_TOOLCHAIN
   402     default y
   403 
   404 # If binutils installs gold, enable support for gold in gcc
   405 config CC_GCC_GOLD
   406     bool
   407     depends on BINUTILS_GOLD_INSTALLED
   408     default y
   409 
   410 config CC_GCC_USE_GMP_MPFR
   411     bool
   412     select GMP_NEEDED
   413     select MPFR_NEEDED
   414 
   415     select CLOOG_NEEDED
   416 
   417 config CC_GCC_USE_MPC
   418     bool
   419     select MPC_NEEDED
   420 
   421 config CC_GCC_USE_LIBELF
   422     bool
   423     select LIBELF_NEEDED
   424 
   425 config CC_GCC_HAS_LIBQUADMATH
   426     bool
   427 
   428 config CC_VERSION
   429     string
   430 # Don't remove next line
   431 # CT_INSERT_VERSION_STRING_BELOW
   432     default "linaro-4.7-2013.04" if CC_V_linaro_4_7
   433     default "4.7.3" if CC_V_4_7_3
   434     default "4.7.2" if CC_V_4_7_2
   435     default "4.7.1" if CC_V_4_7_1
   436     default "4.7.0" if CC_V_4_7_0
   437     default "linaro-4.6-2013.04" if CC_V_linaro_4_6
   438     default "4.6.4" if CC_V_4_6_4
   439     default "4.6.3" if CC_V_4_6_3
   440     default "4.6.2" if CC_V_4_6_2
   441     default "4.6.1" if CC_V_4_6_1
   442     default "4.6.0" if CC_V_4_6_0
   443     default "linaro-4.5-2012.03" if CC_V_linaro_4_5
   444     default "4.5.3" if CC_V_4_5_3
   445     default "4.5.2" if CC_V_4_5_2
   446     default "4.5.1" if CC_V_4_5_1
   447     default "4.5.0" if CC_V_4_5_0
   448     default "linaro-4.4-2011.02-0" if CC_V_linaro_4_4
   449     default "4.4.7" if CC_V_4_4_7
   450     default "4.4.6" if CC_V_4_4_6
   451     default "4.4.5" if CC_V_4_4_5
   452     default "4.4.4" if CC_V_4_4_4
   453     default "4.4.3" if CC_V_4_4_3
   454     default "4.4.2" if CC_V_4_4_2
   455     default "4.4.1" if CC_V_4_4_1
   456     default "4.4.0" if CC_V_4_4_0
   457     default "4.3.6" if CC_V_4_3_6
   458     default "4.3.5" if CC_V_4_3_5
   459     default "4.3.4" if CC_V_4_3_4
   460     default "4.3.3" if CC_V_4_3_3
   461     default "4.3.2" if CC_V_4_3_2
   462     default "4.3.1" if CC_V_4_3_1
   463     default "4.3.0" if CC_V_4_3_0
   464     default "4.2.4" if CC_V_4_2_4
   465     default "4.2.2" if CC_V_4_2_2
   466     default "4.1.2" if CC_V_4_1_2
   467     default "4.0.4" if CC_V_4_0_4
   468     default "3.4.6" if CC_V_3_4_6
   469     default "custom" if CC_CUSTOM
   470 
   471 config CC_LANG_JAVA_USE_ECJ
   472     bool
   473     default y
   474     depends on CC_LANG_JAVA
   475     depends on CC_GCC_4_3_or_later
   476 
   477 # Fortran always requires GMP+MPFR, whatever the gcc version
   478 config CC_LANG_FORTRAN
   479     select CC_GCC_USE_GMP_MPFR