config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sun Nov 11 21:42:34 2012 +0100 (2012-11-11)
branch1.15
changeset 3106 070a8c94bfe7
parent 2948 3396ce2c25ef
child 2979 af99e043b437
permissions -rw-r--r--
1.15: close branch

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