config/cc/gcc.in
author David Holsgrove <david.holsgrove@xilinx.com>
Thu Oct 11 14:39:41 2012 +1000 (2012-10-11)
changeset 3088 7f5a3382968f
parent 3068 27db02096a6f
child 3093 f5af323f7805
permissions -rw-r--r--
cc/gcc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom

CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: don't patch custom directory location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <f2272ac0f37cedd0bb91.1349931194@localhost.localdomain>
PatchWork-Id: 190787
     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 
    37 config CC_V_SVN
    38     bool
    39     prompt "gcc from svn"
    40     depends on EXPERIMENTAL
    41     depends on CONFIGURE_has_svn
    42     select CC_GCC_latest
    43 
    44 # Don't remove next line
    45 # CT_INSERT_VERSION_BELOW
    46 
    47 config CC_V_linaro_4_7_2012_10
    48     bool
    49     prompt "linaro-4.7-2012.10 (EXPERIMENTAL)"
    50     depends on CC_GCC_SHOW_LINARO
    51     select CC_GCC_4_7
    52 
    53 config CC_V_4_7_2
    54     bool
    55     prompt "4.7.2"
    56     select CC_GCC_4_7
    57 
    58 config CC_V_4_7_1
    59     bool
    60     prompt "4.7.1 (EXPERIMENTAL)"
    61     depends on EXPERIMENTAL
    62     select CC_GCC_4_7
    63 
    64 config CC_V_4_7_0
    65     bool
    66     prompt "4.7.0 (EXPERIMENTAL)"
    67     depends on EXPERIMENTAL
    68     select CC_GCC_4_7
    69 
    70 config CC_V_linaro_4_6_2012_10
    71     bool
    72     prompt "linaro-4.6-2012.10 (EXPERIMENTAL)"
    73     depends on CC_GCC_SHOW_LINARO
    74     select CC_GCC_4_6
    75 
    76 config CC_V_4_6_3
    77     bool
    78     prompt "4.6.3"
    79     select CC_GCC_4_6
    80 
    81 config CC_V_4_6_2
    82     bool
    83     prompt "4.6.2"
    84     select CC_GCC_4_6
    85 
    86 config CC_V_4_6_1
    87     bool
    88     prompt "4.6.1"
    89     select CC_GCC_4_6
    90 
    91 config CC_V_4_6_0
    92     bool
    93     prompt "4.6.0"
    94     select CC_GCC_4_6
    95 
    96 config CC_V_linaro_4_5_2012_03
    97     bool
    98     prompt "linaro-4.5-2012.03 (EXPERIMENTAL)"
    99     depends on CC_GCC_SHOW_LINARO
   100     select CC_GCC_4_5
   101 
   102 config CC_V_4_5_3
   103     bool
   104     prompt "4.5.3"
   105     select CC_GCC_4_5
   106 
   107 config CC_V_4_5_2
   108     bool
   109     prompt "4.5.2"
   110     select CC_GCC_4_5
   111 
   112 config CC_V_4_5_1
   113     bool
   114     prompt "4.5.1"
   115     select CC_GCC_4_5
   116 
   117 config CC_V_4_5_0
   118     bool
   119     prompt "4.5.0"
   120     select CC_GCC_4_5
   121 
   122 
   123 config CC_V_linaro_4_4_2011_02_0
   124     bool
   125     prompt "linaro-4.4-2011.02-0 (EXPERIMENTAL)"
   126     depends on CC_GCC_SHOW_LINARO
   127     select CC_GCC_4_4
   128 
   129 config CC_V_4_4_7
   130     bool
   131     prompt "4.4.7"
   132     select CC_GCC_4_4
   133 
   134 config CC_V_4_4_6
   135     bool
   136     prompt "4.4.6"
   137     select CC_GCC_4_4
   138 
   139 config CC_V_4_4_5
   140     bool
   141     prompt "4.4.5"
   142     select CC_GCC_4_4
   143 
   144 config CC_V_4_4_4
   145     bool
   146     prompt "4.4.4"
   147     select CC_GCC_4_4
   148 
   149 config CC_V_4_4_3
   150     bool
   151     prompt "4.4.3"
   152     select CC_GCC_4_4
   153 
   154 config CC_V_4_4_2
   155     bool
   156     prompt "4.4.2"
   157     select CC_GCC_4_4
   158 
   159 config CC_V_4_4_1
   160     bool
   161     prompt "4.4.1"
   162     select CC_GCC_4_4
   163 
   164 config CC_V_4_4_0
   165     bool
   166     prompt "4.4.0"
   167     select CC_GCC_4_4
   168 
   169 config CC_V_4_3_6
   170     bool
   171     prompt "4.3.6"
   172     select CC_GCC_4_3
   173 
   174 config CC_V_4_3_5
   175     bool
   176     prompt "4.3.5"
   177     select CC_GCC_4_3
   178 
   179 config CC_V_4_3_4
   180     bool
   181     prompt "4.3.4"
   182     select CC_GCC_4_3
   183 
   184 config CC_V_4_3_3
   185     bool
   186     prompt "4.3.3"
   187     select CC_GCC_4_3
   188 
   189 config CC_V_4_3_2
   190     bool
   191     prompt "4.3.2"
   192     select CC_GCC_4_3
   193 
   194 config CC_V_4_3_1
   195     bool
   196     prompt "4.3.1"
   197     select CC_GCC_4_3
   198 
   199 config CC_V_4_2_4
   200     bool
   201     prompt "4.2.4"
   202     select CC_GCC_4_2
   203 
   204 config CC_V_4_2_3
   205     bool
   206     prompt "4.2.3 (OBSOLETE)"
   207     select CC_GCC_4_2
   208     depends on OBSOLETE
   209 
   210 config CC_V_4_2_2
   211     bool
   212     prompt "4.2.2"
   213     select CC_GCC_4_2
   214 
   215 config CC_V_4_2_1
   216     bool
   217     prompt "4.2.1 (OBSOLETE)"
   218     select CC_GCC_4_2
   219     depends on OBSOLETE
   220 
   221 config CC_V_4_2_0
   222     bool
   223     prompt "4.2.0 (OBSOLETE)"
   224     select CC_GCC_4_2
   225     depends on OBSOLETE
   226 
   227 config CC_V_4_1_2
   228     bool
   229     prompt "4.1.2 (OBSOLETE)"
   230     depends on OBSOLETE
   231 
   232 config CC_V_4_0_4
   233     bool
   234     prompt "4.0.4 (OBSOLETE)"
   235     depends on OBSOLETE
   236 
   237 config CC_V_3_4_6
   238     bool
   239     prompt "3.4.6 (OBSOLETE)"
   240     depends on OBSOLETE
   241 
   242 config CC_CUSTOM
   243     bool
   244     prompt "Custom gcc"
   245     depends on EXPERIMENTAL
   246     select CC_GCC_latest
   247 
   248 endchoice
   249 
   250 if CC_V_SVN
   251 
   252 config GCC_BRANCH
   253     string
   254     prompt "Branch or tag to use"
   255     default "trunk"
   256     help
   257       Enter the branch of gcc to use. Default is trunk
   258       
   259       A few examples might be:
   260       * trunk
   261       * branches/gcc-4_7-branch
   262       * branches/gcc-4_4-branch
   263       * branches/gccgo
   264       * branches/google
   265       * tags/gcc_4_7_1_release
   266       * tags/microblaze-4.4.2
   267 
   268 config GCC_REVISION
   269     string
   270     prompt "Revision to use"
   271     default "HEAD"
   272     help
   273       Enter the revision of you want to use. Default is HEAD
   274       
   275       A revision argument can be one of:
   276           NUMBER       revision number
   277           '{' DATE '}' revision at start of the date (*)
   278           'HEAD'       latest in repository
   279       
   280       (*) If you want to use a date, please use ISO-8601 formats if
   281       at all possible.
   282 
   283 config GCC_HTTP
   284     bool
   285     prompt "use http:// instead of svn://"
   286     help
   287       By default, when gcc is downloaded it is checked out using
   288       svn://gcc.gnu.org/svn/gcc. This option allows you to download gcc
   289       from http://gcc.gnu.org/svn/gcc, if you are behind a proxy or firewall.
   290       If you are behind a proxy, don't forget to update your
   291       .subversion/servers file with your proxy info in [global].
   292 
   293 config GCC_CHECKOUT
   294     bool
   295     prompt "checkout instead of export"
   296     help
   297       By default, the gcc download will be an export of the subversion
   298       repository. If you say 'y' here, then the repository will instead be
   299       checked-out, so that you can update it later.
   300       
   301       Note that crosstool-NG will *not* update your working copy, you will
   302       have to do that yourself.
   303 
   304 endif
   305 
   306 if CC_CUSTOM
   307 
   308 config CC_CUSTOM_LOCATION
   309     string
   310     prompt "Full path to custom gcc source"
   311     default ""
   312     help
   313       Enter the path to the directory (or tarball) of your source for gcc,
   314       or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/gcc
   315 
   316 endif #CC_CUSTOM
   317 
   318 config CC_GCC_4_2
   319     bool
   320     select CC_GCC_4_2_or_later
   321 
   322 config CC_GCC_4_2_or_later
   323     bool
   324 
   325 config CC_GCC_4_3
   326     bool
   327     select CC_GCC_4_3_or_later
   328     select CC_GCC_USE_GMP_MPFR
   329     select CC_GCC_HAS_PKGVERSION_BUGURL
   330 
   331 config CC_GCC_4_3_or_later
   332     bool
   333     select CC_GCC_4_2_or_later
   334 
   335 config CC_GCC_4_4
   336     bool
   337     select CC_GCC_4_4_or_later
   338     select CC_GCC_USE_GMP_MPFR
   339     select CC_GCC_HAS_GRAPHITE
   340     select CC_GCC_HAS_PKGVERSION_BUGURL
   341 
   342 config CC_GCC_4_4_or_later
   343     bool
   344     select CC_GCC_4_3_or_later
   345 
   346 config CC_GCC_4_5
   347     bool
   348     select CC_GCC_4_5_or_later
   349     select CC_GCC_USE_GMP_MPFR
   350     select CC_GCC_USE_MPC
   351     select CC_GCC_HAS_GRAPHITE
   352     select CC_GCC_HAS_LTO
   353     select CC_GCC_HAS_PKGVERSION_BUGURL
   354     select CC_GCC_HAS_BUILD_ID
   355 
   356 config CC_GCC_4_5_or_later
   357     bool
   358     select CC_GCC_4_4_or_later
   359 
   360 config CC_GCC_4_6
   361     bool
   362     select CC_GCC_4_6_or_later
   363     select CC_GCC_USE_GMP_MPFR
   364     select CC_GCC_USE_MPC
   365     select CC_GCC_HAS_GRAPHITE
   366     select CC_GCC_HAS_LTO
   367     select CC_GCC_HAS_PKGVERSION_BUGURL
   368     select CC_GCC_HAS_BUILD_ID
   369     select CC_GCC_HAS_LIBQUADMATH
   370 
   371 config CC_GCC_4_6_or_later
   372     bool
   373     select CC_GCC_4_5_or_later
   374 
   375 config CC_GCC_4_7
   376     bool
   377     select CC_GCC_4_7_or_later
   378     select CC_GCC_USE_GMP_MPFR
   379     select CC_GCC_USE_MPC
   380     select CC_GCC_HAS_GRAPHITE
   381     select CC_GCC_HAS_LTO
   382     select CC_GCC_HAS_PKGVERSION_BUGURL
   383     select CC_GCC_HAS_BUILD_ID
   384     select CC_GCC_HAS_LNK_HASH_STYLE
   385     select CC_GCC_HAS_LIBQUADMATH
   386 
   387 config CC_GCC_4_7_or_later
   388     bool
   389     select CC_GCC_4_6_or_later
   390 
   391 config CC_GCC_latest
   392     bool
   393     select CC_GCC_4_7_or_later
   394     select CC_GCC_USE_GMP_MPFR
   395     select CC_GCC_USE_MPC
   396     select CC_GCC_HAS_GRAPHITE
   397     select CC_GCC_HAS_LTO
   398     select CC_GCC_HAS_PKGVERSION_BUGURL
   399     select CC_GCC_HAS_BUILD_ID
   400     select CC_GCC_HAS_LNK_HASH_STYLE
   401     select CC_GCC_HAS_LIBQUADMATH
   402 
   403 config CC_GCC_HAS_GRAPHITE
   404     bool
   405 
   406 # The way LTO works is a bit twisted.
   407 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
   408 # Basically:
   409 #   - if binutils has plugins: LTO is handled by ld/gold by loading
   410 #     the plugin when linking
   411 #   - if binutils does not have plugins: LTO is handled by collect2
   412 # In any case, LTO support does not depend on plugins, but takes
   413 # advantage of it
   414 config CC_GCC_HAS_LTO
   415     bool
   416 
   417 config CC_GCC_HAS_PKGVERSION_BUGURL
   418     bool
   419 
   420 config CC_GCC_HAS_BUILD_ID
   421     bool
   422 
   423 config CC_GCC_HAS_LNK_HASH_STYLE
   424     bool
   425 
   426 # Only enable gcc's support for plugins if binutils has it as well
   427 # They are usefull only when doing LTO, but it does no harm enabling
   428 # them even without LTO.
   429 config CC_GCC_ENABLE_PLUGINS
   430     bool
   431     depends on BINUTILS_PLUGINS
   432     depends on ! STATIC_TOOLCHAIN
   433     default y
   434 
   435 # If binutils installs gold, enable support for gold in gcc
   436 config CC_GCC_GOLD
   437     bool
   438     depends on BINUTILS_GOLD_INSTALLED
   439     default y
   440 
   441 config CC_GCC_USE_GMP_MPFR
   442     bool
   443     select GMP_NEEDED
   444     select MPFR_NEEDED
   445 
   446 config CC_GCC_USE_PPL_CLOOG
   447     bool
   448     select PPL_NEEDED
   449     select CLOOG_NEEDED
   450 
   451 config CC_GCC_USE_MPC
   452     bool
   453     select MPC_NEEDED
   454 
   455 config CC_GCC_USE_LIBELF
   456     bool
   457     select LIBELF_NEEDED
   458 
   459 config CC_GCC_HAS_LIBQUADMATH
   460     bool
   461 
   462 config CC_VERSION
   463     string
   464     default "SVN" if CC_V_SVN
   465 # Don't remove next line
   466 # CT_INSERT_VERSION_STRING_BELOW
   467     default "linaro-4.7-2012.10" if CC_V_linaro_4_7_2012_10
   468     default "4.7.2" if CC_V_4_7_2
   469     default "4.7.1" if CC_V_4_7_1
   470     default "4.7.0" if CC_V_4_7_0
   471     default "linaro-4.6-2012.10" if CC_V_linaro_4_6_2012_10
   472     default "4.6.3" if CC_V_4_6_3
   473     default "4.6.2" if CC_V_4_6_2
   474     default "4.6.1" if CC_V_4_6_1
   475     default "4.6.0" if CC_V_4_6_0
   476     default "linaro-4.5-2012.03" if CC_V_linaro_4_5_2012_03
   477     default "4.5.3" if CC_V_4_5_3
   478     default "4.5.2" if CC_V_4_5_2
   479     default "4.5.1" if CC_V_4_5_1
   480     default "4.5.0" if CC_V_4_5_0
   481     default "linaro-4.4-2011.02-0" if CC_V_linaro_4_4_2011_02_0
   482     default "4.4.7" if CC_V_4_4_7
   483     default "4.4.6" if CC_V_4_4_6
   484     default "4.4.5" if CC_V_4_4_5
   485     default "4.4.4" if CC_V_4_4_4
   486     default "4.4.3" if CC_V_4_4_3
   487     default "4.4.2" if CC_V_4_4_2
   488     default "4.4.1" if CC_V_4_4_1
   489     default "4.4.0" if CC_V_4_4_0
   490     default "4.3.6" if CC_V_4_3_6
   491     default "4.3.5" if CC_V_4_3_5
   492     default "4.3.4" if CC_V_4_3_4
   493     default "4.3.3" if CC_V_4_3_3
   494     default "4.3.2" if CC_V_4_3_2
   495     default "4.3.1" if CC_V_4_3_1
   496     default "4.3.0" if CC_V_4_3_0
   497     default "4.2.4" if CC_V_4_2_4
   498     default "4.2.3" if CC_V_4_2_3
   499     default "4.2.2" if CC_V_4_2_2
   500     default "4.2.1" if CC_V_4_2_1
   501     default "4.2.0" if CC_V_4_2_0
   502     default "4.1.2" if CC_V_4_1_2
   503     default "4.0.4" if CC_V_4_0_4
   504     default "3.4.6" if CC_V_3_4_6
   505     default "custom" if CC_CUSTOM
   506 
   507 config CC_LANG_JAVA_USE_ECJ
   508     bool
   509     default y
   510     depends on CC_LANG_JAVA
   511     depends on CC_GCC_4_3_or_later
   512 
   513 # Fortran always requires GMP+MPFR, whatever the gcc version
   514 config CC_LANG_FORTRAN
   515     select CC_GCC_USE_GMP_MPFR