config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Mon Apr 30 17:24:58 2012 +0200 (2012-04-30)
changeset 2948 3396ce2c25ef
parent 2946 100b9861cfed
child 2952 d20da3fd340e
permissions -rw-r--r--
cc/gcc: 4.7 can request the linker's hash-style

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