config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Mon May 07 00:11:46 2012 +0200 (2012-05-07)
changeset 2979 af99e043b437
parent 2952 d20da3fd340e
child 2987 366637520035
permissions -rw-r--r--
cc/gcc: gcc 4.6+ has libquadmath

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     select CC_GCC_HAS_LIBQUADMATH
   277 
   278 config CC_GCC_4_6_or_later
   279     bool
   280     select CC_GCC_4_5_or_later
   281 
   282 config CC_GCC_4_7
   283     bool
   284     select CC_GCC_4_7_or_later
   285     select CC_GCC_USE_GMP_MPFR
   286     select CC_GCC_USE_MPC
   287     select CC_GCC_HAS_GRAPHITE
   288     select CC_GCC_HAS_LTO
   289     select CC_GCC_HAS_PKGVERSION_BUGURL
   290     select CC_GCC_HAS_BUILD_ID
   291     select CC_GCC_HAS_LNK_HASH_STYLE
   292     select CC_GCC_HAS_LIBQUADMATH
   293 
   294 config CC_GCC_4_7_or_later
   295     bool
   296     select CC_GCC_4_6_or_later
   297 
   298 config CC_GCC_HAS_GRAPHITE
   299     bool
   300 
   301 # The way LTO works is a bit twisted.
   302 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
   303 # Basically:
   304 #   - if binutils has plugins: LTO is handled by ld/gold by loading
   305 #     the plugin when linking
   306 #   - if binutils does not have plugins: LTO is handled by collect2
   307 # In any case, LTO support does not depend on plugins, but takes
   308 # advantage of it
   309 config CC_GCC_HAS_LTO
   310     bool
   311 
   312 config CC_GCC_HAS_PKGVERSION_BUGURL
   313     bool
   314 
   315 config CC_GCC_HAS_BUILD_ID
   316     bool
   317 
   318 config CC_GCC_HAS_LNK_HASH_STYLE
   319     bool
   320 
   321 # Only enable gcc's support for plugins if binutils has it as well
   322 # They are usefull only when doing LTO, but it does no harm enabling
   323 # them even without LTO.
   324 config CC_GCC_ENABLE_PLUGINS
   325     bool
   326     depends on BINUTILS_PLUGINS
   327     depends on ! STATIC_TOOLCHAIN
   328     default y
   329 
   330 # If binutils installs gold, enable support for gold in gcc
   331 config CC_GCC_GOLD
   332     bool
   333     depends on BINUTILS_GOLD_INSTALLED
   334     default y
   335 
   336 config CC_GCC_USE_GMP_MPFR
   337     bool
   338     select GMP_NEEDED
   339     select MPFR_NEEDED
   340 
   341 config CC_GCC_USE_PPL_CLOOG
   342     bool
   343     select PPL_NEEDED
   344     select CLOOG_NEEDED
   345 
   346 config CC_GCC_USE_MPC
   347     bool
   348     select MPC_NEEDED
   349 
   350 config CC_GCC_USE_LIBELF
   351     bool
   352     select LIBELF_NEEDED
   353 
   354 config CC_GCC_HAS_LIBQUADMATH
   355     bool
   356 
   357 config CC_VERSION
   358     string
   359 # Don't remove next line
   360 # CT_INSERT_VERSION_STRING_BELOW
   361     default "linaro-4.7-2012.04" if CC_V_linaro_4_7_2012_04
   362     default "4.7.0" if CC_V_4_7_0
   363     default "linaro-4.6-2012.04" if CC_V_linaro_4_6_2012_04
   364     default "4.6.3" if CC_V_4_6_3
   365     default "4.6.2" if CC_V_4_6_2
   366     default "4.6.1" if CC_V_4_6_1
   367     default "4.6.0" if CC_V_4_6_0
   368     default "linaro-4.5-2012.03" if CC_V_linaro_4_5_2012_03
   369     default "4.5.3" if CC_V_4_5_3
   370     default "4.5.2" if CC_V_4_5_2
   371     default "4.5.1" if CC_V_4_5_1
   372     default "4.5.0" if CC_V_4_5_0
   373     default "linaro-4.4-2011.02-0" if CC_V_linaro_4_4_2011_02_0
   374     default "4.4.7" if CC_V_4_4_7
   375     default "4.4.6" if CC_V_4_4_6
   376     default "4.4.5" if CC_V_4_4_5
   377     default "4.4.4" if CC_V_4_4_4
   378     default "4.4.3" if CC_V_4_4_3
   379     default "4.4.2" if CC_V_4_4_2
   380     default "4.4.1" if CC_V_4_4_1
   381     default "4.4.0" if CC_V_4_4_0
   382     default "4.3.6" if CC_V_4_3_6
   383     default "4.3.5" if CC_V_4_3_5
   384     default "4.3.4" if CC_V_4_3_4
   385     default "4.3.3" if CC_V_4_3_3
   386     default "4.3.2" if CC_V_4_3_2
   387     default "4.3.1" if CC_V_4_3_1
   388     default "4.3.0" if CC_V_4_3_0
   389     default "4.2.4" if CC_V_4_2_4
   390     default "4.2.3" if CC_V_4_2_3
   391     default "4.2.2" if CC_V_4_2_2
   392     default "4.2.1" if CC_V_4_2_1
   393     default "4.2.0" if CC_V_4_2_0
   394     default "4.1.2" if CC_V_4_1_2
   395     default "4.0.4" if CC_V_4_0_4
   396     default "3.4.6" if CC_V_3_4_6
   397 
   398 config CC_LANG_JAVA_USE_ECJ
   399     bool
   400     default y
   401     depends on CC_LANG_JAVA
   402     depends on CC_GCC_4_3_or_later
   403 
   404 # Fortran always requires GMP+MPFR, whatever the gcc version
   405 config CC_LANG_FORTRAN
   406     select CC_GCC_USE_GMP_MPFR