config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Apr 27 22:41:17 2011 +0200 (2011-04-27)
changeset 2415 ae9899116f19
parent 2406 95e0c248d257
child 2416 e4044a447612
permissions -rw-r--r--
cc/gcc: suffle options around

Move options around so it feels more organised.
Add comments to separate groups of related options.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 # Compiler options
     2 
     3 config CC_gcc
     4     select CC_SUPPORT_CXX
     5     select CC_SUPPORT_FORTRAN
     6     select CC_SUPPORT_JAVA
     7     select CC_SUPPORT_ADA
     8     select CC_SUPPORT_OBJC
     9     select CC_SUPPORT_OBJCXX
    10     help
    11       gcc is the full-blown GNU compiler. This is what most people will choose.
    12       
    13       gcc supports many languages, a powerful code parser, optimised binary
    14       output, and lots of other features.
    15 
    16 config CC_GCC_SHOW_LINARO
    17     bool
    18     prompt "Show Linaro versions (EXPERIMENTAL)"
    19     depends on EXPERIMENTAL
    20     help
    21       Linaro is maintaining some advanced/more stable/experimental versions
    22       of gcc, especially for the ARM architecture.
    23       
    24       Those versions have not been blessed by the gcc comunity (nor have they
    25       been cursed either!), but they look to be pretty much stable, and even
    26       more stable than the upstream versions. YMMV...
    27       
    28       If you do not know what this Linaro stuff is, then simply say 'n' here,
    29       and rest in peace. OTOH, if you know what you are doing, you will be
    30       able to use and enjoy :-) the Linaro versions by saying 'y' here.
    31       
    32       Linaro: http://www.linaro.org/
    33 
    34 choice
    35     bool
    36     prompt "gcc version"
    37 # Don't remove next line
    38 # CT_INSERT_VERSION_BELOW
    39 
    40 config CC_V_linaro_4_6_2011_03_0
    41     bool
    42     prompt "linaro-4.6-2011.03-0 (EXPERIMENTAL)"
    43     depends on CC_GCC_SHOW_LINARO
    44     select CC_GCC_4_6
    45 
    46 config CC_V_4_6_0
    47     bool
    48     prompt "4.6.0 (EXPERIMENTAL)"
    49     depends on EXPERIMENTAL
    50     select CC_GCC_4_6
    51 
    52 config CC_V_linaro_4_5_2011_03_0
    53     bool
    54     prompt "linaro-4.5-2011.03-0 (EXPERIMENTAL)"
    55     depends on CC_GCC_SHOW_LINARO
    56     select CC_GCC_4_5
    57 
    58 config CC_V_4_5_2
    59     bool
    60     prompt "4.5.2 (EXPERIMENTAL)"
    61     depends on EXPERIMENTAL
    62     select CC_GCC_4_5
    63 
    64 config CC_V_4_5_1
    65     bool
    66     prompt "4.5.1 (EXPERIMENTAL)"
    67     depends on EXPERIMENTAL
    68     select CC_GCC_4_5
    69 
    70 config CC_V_4_5_0
    71     bool
    72     prompt "4.5.0 (EXPERIMENTAL)"
    73     depends on EXPERIMENTAL
    74     select CC_GCC_4_5
    75 
    76 
    77 config CC_V_linaro_4_4_2011_02_0
    78     bool
    79     prompt "linaro-4.4-2011.02-0 (EXPERIMENTAL)"
    80     depends on CC_GCC_SHOW_LINARO
    81     select CC_GCC_4_4
    82 
    83 config CC_V_4_4_6
    84     bool
    85     prompt "4.4.6"
    86     select CC_GCC_4_4_or_later
    87 
    88 config CC_V_4_4_5
    89     bool
    90     prompt "4.4.5"
    91     select CC_GCC_4_4
    92 
    93 config CC_V_4_4_4
    94     bool
    95     prompt "4.4.4"
    96     select CC_GCC_4_4
    97 
    98 config CC_V_4_4_3
    99     bool
   100     prompt "4.4.3"
   101     select CC_GCC_4_4
   102 
   103 config CC_V_4_4_2
   104     bool
   105     prompt "4.4.2"
   106     select CC_GCC_4_4
   107 
   108 config CC_V_4_4_1
   109     bool
   110     prompt "4.4.1"
   111     select CC_GCC_4_4
   112 
   113 config CC_V_4_4_0
   114     bool
   115     prompt "4.4.0"
   116     select CC_GCC_4_4
   117 
   118 config CC_V_4_3_5
   119     bool
   120     prompt "4.3.5"
   121     select CC_GCC_4_3
   122 
   123 config CC_V_4_3_4
   124     bool
   125     prompt "4.3.4"
   126     select CC_GCC_4_3
   127 
   128 config CC_V_4_3_3
   129     bool
   130     prompt "4.3.3"
   131     select CC_GCC_4_3
   132 
   133 config CC_V_4_3_2
   134     bool
   135     prompt "4.3.2"
   136     select CC_GCC_4_3
   137 
   138 config CC_V_4_3_1
   139     bool
   140     prompt "4.3.1"
   141     select CC_GCC_4_3
   142 
   143 config CC_V_4_2_4
   144     bool
   145     prompt "4.2.4"
   146     select CC_GCC_4_2
   147 
   148 config CC_V_4_2_3
   149     bool
   150     prompt "4.2.3 (OBSOLETE)"
   151     select CC_GCC_4_2
   152     depends on OBSOLETE
   153 
   154 config CC_V_4_2_2
   155     bool
   156     prompt "4.2.2"
   157     select CC_GCC_4_2
   158 
   159 config CC_V_4_2_1
   160     bool
   161     prompt "4.2.1 (OBSOLETE)"
   162     select CC_GCC_4_2
   163     depends on OBSOLETE
   164 
   165 config CC_V_4_2_0
   166     bool
   167     prompt "4.2.0 (OBSOLETE)"
   168     select CC_GCC_4_2
   169     depends on OBSOLETE
   170 
   171 config CC_V_4_1_2
   172     bool
   173     prompt "4.1.2 (OBSOLETE)"
   174     depends on OBSOLETE
   175 
   176 config CC_V_4_0_4
   177     bool
   178     prompt "4.0.4 (OBSOLETE)"
   179     depends on OBSOLETE
   180 
   181 config CC_V_3_4_6
   182     bool
   183     prompt "3.4.6 (OBSOLETE)"
   184     depends on OBSOLETE
   185 
   186 endchoice
   187 
   188 config CC_GCC_4_2
   189     bool
   190     default n
   191     select CC_GCC_4_2_or_later
   192 
   193 config CC_GCC_4_2_or_later
   194     bool
   195     default n
   196 
   197 config CC_GCC_4_3
   198     bool
   199     default n
   200     select CC_GCC_4_3_or_later
   201     select CC_GCC_USE_GMP_MPFR
   202 
   203 config CC_GCC_4_3_or_later
   204     bool
   205     default n
   206     select CC_GCC_4_2_or_later
   207 
   208 config CC_GCC_4_4
   209     bool
   210     default n
   211     select CC_GCC_4_4_or_later
   212     select CC_GCC_USE_GMP_MPFR
   213     select CC_GCC_HAS_GRAPHITE
   214 
   215 config CC_GCC_4_4_or_later
   216     bool
   217     default n
   218     select CC_GCC_4_3_or_later
   219 
   220 config CC_GCC_4_5
   221     bool
   222     default n
   223     select CC_GCC_4_5_or_later
   224     select CC_GCC_USE_GMP_MPFR
   225     select CC_GCC_USE_MPC
   226     select CC_GCC_HAS_GRAPHITE
   227     select CC_GCC_HAS_LTO
   228 
   229 config CC_GCC_4_5_or_later
   230     bool
   231     default n
   232     select CC_GCC_4_4_or_later
   233 
   234 config CC_GCC_4_6
   235     bool
   236     default n
   237     select CC_GCC_4_6_or_later
   238     select CC_GCC_USE_GMP_MPFR
   239     select CC_GCC_USE_MPC
   240     select CC_GCC_HAS_GRAPHITE
   241     select CC_GCC_HAS_LTO
   242 
   243 config CC_GCC_4_6_or_later
   244     bool
   245     default n
   246     select CC_GCC_4_5_or_later
   247 
   248 config CC_GCC_HAS_GRAPHITE
   249     bool
   250     default n
   251 
   252 # The way LTO works is a bit twisted.
   253 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
   254 # Basically:
   255 #   - if binutils has plugins: LTO is handled by ld/gold by loading
   256 #     the plugin when linking
   257 #   - if binutils does not have plugins: LTO is handled by collect2
   258 # In any case, LTO support does not depend on plugins, but takes
   259 # advantage of it
   260 config CC_GCC_HAS_LTO
   261     bool
   262     default n
   263 
   264 # Only enable gcc's support for plugins if binutils has it as well
   265 # They are usefull only when doing LTO, but it does no harm enabling
   266 # them even without LTO.
   267 config CC_GCC_ENABLE_PLUGINS
   268     bool
   269     depends on BINUTILS_PLUGINS
   270     depends on ! STATIC_TOOLCHAIN
   271     default y
   272 
   273 # If binutils installs gold, enable support for gold in gcc
   274 config CC_GCC_GOLD
   275     bool
   276     depends on BINUTILS_GOLD_INSTALLED
   277     default y
   278 
   279 config CC_GCC_USE_GMP_MPFR
   280     bool
   281     default n
   282     select GMP_NEEDED
   283     select MPFR_NEEDED
   284 
   285 config CC_GCC_USE_PPL_CLOOG
   286     bool
   287     default n
   288     select PPL_NEEDED
   289     select CLOOG_NEEDED
   290 
   291 config CC_GCC_USE_MPC
   292     bool
   293     default n
   294     select MPC_NEEDED
   295 
   296 config CC_GCC_USE_LIBELF
   297     bool
   298     default n
   299     select LIBELF_NEEDED
   300 
   301 config CC_VERSION
   302     string
   303 # Don't remove next line
   304 # CT_INSERT_VERSION_STRING_BELOW
   305     default "4.4.6" if CC_V_4_4_6
   306     default "linaro-4.6-2011.03-0" if CC_V_linaro_4_6_2011_03_0
   307     default "4.6.0" if CC_V_4_6_0
   308     default "linaro-4.5-2011.03-0" if CC_V_linaro_4_5_2011_03_0
   309     default "4.5.2" if CC_V_4_5_2
   310     default "4.5.1" if CC_V_4_5_1
   311     default "4.5.0" if CC_V_4_5_0
   312     default "linaro-4.4-2011.02-0" if CC_V_linaro_4_4_2011_02_0
   313     default "4.4.5" if CC_V_4_4_5
   314     default "4.4.4" if CC_V_4_4_4
   315     default "4.4.3" if CC_V_4_4_3
   316     default "4.4.2" if CC_V_4_4_2
   317     default "4.4.1" if CC_V_4_4_1
   318     default "4.4.0" if CC_V_4_4_0
   319     default "4.3.5" if CC_V_4_3_5
   320     default "4.3.4" if CC_V_4_3_4
   321     default "4.3.3" if CC_V_4_3_3
   322     default "4.3.2" if CC_V_4_3_2
   323     default "4.3.1" if CC_V_4_3_1
   324     default "4.3.0" if CC_V_4_3_0
   325     default "4.2.4" if CC_V_4_2_4
   326     default "4.2.3" if CC_V_4_2_3
   327     default "4.2.2" if CC_V_4_2_2
   328     default "4.2.1" if CC_V_4_2_1
   329     default "4.2.0" if CC_V_4_2_0
   330     default "4.1.2" if CC_V_4_1_2
   331     default "4.0.4" if CC_V_4_0_4
   332     default "3.4.6" if CC_V_3_4_6
   333 
   334 config CC_LANG_JAVA_USE_ECJ
   335     bool
   336     default y
   337     depends on CC_LANG_JAVA
   338     depends on CC_GCC_4_3_or_later