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