config/cc/gcc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Feb 22 23:27:42 2011 +0100 (2011-02-22)
branch1.10
changeset 2392 578509ec492d
parent 2287 61608c9365ab
permissions -rw-r--r--
cc/gcc: do not build plugins for static toolchains

Plugins are shared objects, and when building a toolchain statically,
the gcc build system breaks havok (although there is no hard technical
reasons it should not be possible)...

And consequently, do not enable plugin supoprt in binutils.

Reported-by: Thomas Spurden <thomas@ado.is-a-geek.net>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 9139319423fd7d71017dfc974d3a06ab79e08fb8)
     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 choice
    17     bool
    18     prompt "gcc version"
    19 # Don't remove next line
    20 # CT_INSERT_VERSION_BELOW
    21 
    22 config CC_V_4_5_2
    23     bool
    24     prompt "4.5.2 (EXPERIMENTAL)"
    25     depends on EXPERIMENTAL
    26     select CC_GCC_4_5_or_later
    27 
    28 config CC_V_4_5_1
    29     bool
    30     prompt "4.5.1 (EXPERIMENTAL)"
    31     depends on EXPERIMENTAL
    32     select CC_GCC_4_5_or_later
    33 
    34 config CC_V_4_5_0
    35     bool
    36     prompt "4.5.0 (EXPERIMENTAL)"
    37     depends on EXPERIMENTAL
    38     select CC_GCC_4_5_or_later
    39 
    40 config CC_V_4_4_5
    41     bool
    42     prompt "4.4.5"
    43     select CC_GCC_4_4_or_later
    44 
    45 config CC_V_4_4_4
    46     bool
    47     prompt "4.4.4"
    48     select CC_GCC_4_4_or_later
    49 
    50 config CC_V_4_4_3
    51     bool
    52     prompt "4.4.3"
    53     select CC_GCC_4_4_or_later
    54 
    55 config CC_V_4_4_2
    56     bool
    57     prompt "4.4.2"
    58     select CC_GCC_4_4_or_later
    59 
    60 config CC_V_4_4_1
    61     bool
    62     prompt "4.4.1"
    63     select CC_GCC_4_4_or_later
    64 
    65 config CC_V_4_4_0
    66     bool
    67     prompt "4.4.0"
    68     select CC_GCC_4_4_or_later
    69 
    70 config CC_V_4_3_5
    71     bool
    72     prompt "4.3.5"
    73     select CC_GCC_4_3_or_later
    74 
    75 config CC_V_4_3_4
    76     bool
    77     prompt "4.3.4"
    78     select CC_GCC_4_3_or_later
    79 
    80 config CC_V_4_3_3
    81     bool
    82     prompt "4.3.3"
    83     select CC_GCC_4_3_or_later
    84 
    85 config CC_V_4_3_2
    86     bool
    87     prompt "4.3.2"
    88     select CC_GCC_4_3_or_later
    89 
    90 config CC_V_4_3_1
    91     bool
    92     prompt "4.3.1"
    93     select CC_GCC_4_3_or_later
    94 
    95 config CC_V_4_2_4
    96     bool
    97     prompt "4.2.4"
    98     select CC_GCC_4_2_or_later
    99 
   100 config CC_V_4_2_3
   101     bool
   102     prompt "4.2.3 (OBSOLETE)"
   103     select CC_GCC_4_2_or_later
   104     depends on OBSOLETE
   105 
   106 config CC_V_4_2_2
   107     bool
   108     prompt "4.2.2"
   109     select CC_GCC_4_2_or_later
   110 
   111 config CC_V_4_2_1
   112     bool
   113     prompt "4.2.1 (OBSOLETE)"
   114     select CC_GCC_4_2_or_later
   115     depends on OBSOLETE
   116 
   117 config CC_V_4_2_0
   118     bool
   119     prompt "4.2.0 (OBSOLETE)"
   120     select CC_GCC_4_2_or_later
   121     depends on OBSOLETE
   122 
   123 config CC_V_4_1_2
   124     bool
   125     prompt "4.1.2 (OBSOLETE)"
   126     depends on OBSOLETE
   127 
   128 config CC_V_4_0_4
   129     bool
   130     prompt "4.0.4 (OBSOLETE)"
   131     depends on OBSOLETE
   132 
   133 config CC_V_3_4_6
   134     bool
   135     prompt "3.4.6 (OBSOLETE)"
   136     depends on OBSOLETE
   137 
   138 endchoice
   139 
   140 config CC_GCC_4_2_or_later
   141     bool
   142     default n
   143 
   144 config CC_GCC_4_3_or_later
   145     bool
   146     default n
   147     select CC_GCC_4_2_or_later
   148     select CC_GCC_USE_GMP_MPFR
   149 
   150 config CC_GCC_4_4_or_later
   151     bool
   152     default n
   153     select CC_GCC_4_3_or_later
   154     select CC_GCC_HAS_GRAPHITE
   155 
   156 config CC_GCC_4_5_or_later
   157     bool
   158     default n
   159     select CC_GCC_4_4_or_later
   160     select CC_GCC_USE_MPC
   161     select CC_GCC_HAS_LTO
   162 
   163 config CC_GCC_HAS_GRAPHITE
   164     bool
   165     default n
   166 
   167 # The way LTO works is a bit twisted.
   168 # See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
   169 # Basically:
   170 #   - if binutils has plugins: LTO is handled by ld/gold by loading
   171 #     the plugin when linking
   172 #   - if binutils does not have plugins: LTO is handled by collect2
   173 # In any case, LTO support does not depend on plugins, but takes
   174 # advantage of it
   175 config CC_GCC_HAS_LTO
   176     bool
   177     default n
   178 
   179 # Only enable gcc's support for plugins if binutils has it as well
   180 # They are usefull only when doing LTO, but it does no harm enabling
   181 # them even without LTO.
   182 config CC_GCC_ENABLE_PLUGINS
   183     bool
   184     depends on BINUTILS_PLUGINS
   185     depends on ! STATIC_TOOLCHAIN
   186     default y
   187 
   188 # If binutils installs gold, enable support for gold in gcc
   189 config CC_GCC_GOLD
   190     bool
   191     depends on BINUTILS_GOLD_INSTALLED
   192     default y
   193 
   194 config CC_GCC_USE_GMP_MPFR
   195     bool
   196     default n
   197     select GMP_NEEDED
   198     select MPFR_NEEDED
   199 
   200 config CC_GCC_USE_PPL_CLOOG
   201     bool
   202     default n
   203     select PPL_NEEDED
   204     select CLOOG_NEEDED
   205 
   206 config CC_GCC_USE_MPC
   207     bool
   208     default n
   209     select MPC_NEEDED
   210 
   211 config CC_GCC_USE_LIBELF
   212     bool
   213     default n
   214     select LIBELF_NEEDED
   215 
   216 config CC_VERSION
   217     string
   218 # Don't remove next line
   219 # CT_INSERT_VERSION_STRING_BELOW
   220     default "4.5.2" if CC_V_4_5_2
   221     default "4.5.1" if CC_V_4_5_1
   222     default "4.5.0" if CC_V_4_5_0
   223     default "4.4.5" if CC_V_4_4_5
   224     default "4.4.4" if CC_V_4_4_4
   225     default "4.4.3" if CC_V_4_4_3
   226     default "4.4.2" if CC_V_4_4_2
   227     default "4.4.1" if CC_V_4_4_1
   228     default "4.4.0" if CC_V_4_4_0
   229     default "4.3.5" if CC_V_4_3_5
   230     default "4.3.4" if CC_V_4_3_4
   231     default "4.3.3" if CC_V_4_3_3
   232     default "4.3.2" if CC_V_4_3_2
   233     default "4.3.1" if CC_V_4_3_1
   234     default "4.3.0" if CC_V_4_3_0
   235     default "4.2.4" if CC_V_4_2_4
   236     default "4.2.3" if CC_V_4_2_3
   237     default "4.2.2" if CC_V_4_2_2
   238     default "4.2.1" if CC_V_4_2_1
   239     default "4.2.0" if CC_V_4_2_0
   240     default "4.1.2" if CC_V_4_1_2
   241     default "4.0.4" if CC_V_4_0_4
   242     default "3.4.6" if CC_V_3_4_6
   243 
   244 config CC_LANG_JAVA_USE_ECJ
   245     bool
   246     default y
   247     depends on CC_LANG_JAVA
   248     depends on CC_GCC_4_3_or_later
   249 
   250 config CC_PKGVERSION
   251     string
   252     prompt "gcc ID string"
   253     depends on CC_GCC_4_3_or_later
   254     default "crosstool-NG-${CT_VERSION}"
   255     help
   256       Specify a string that identifies your package. You may wish to include
   257       a build number or build date. This version string will be included in
   258       the output of gcc --version.
   259 
   260       This is passed to the configure flag --with-pkgversion.
   261 
   262 config CC_BUGURL
   263     string
   264     prompt "gcc bug URL"
   265     depends on CC_GCC_4_3_or_later
   266     default ""
   267     help
   268       Specify the URL that users should visit if they wish to report a bug.
   269 
   270 config CC_ENABLE_CXX_FLAGS
   271     string
   272     prompt "Flags to pass to --enable-cxx-flags"
   273     default ""
   274     help
   275       Enter here the value of the gcc's ./configure option --enable-cxx-flags.
   276       Leave empty if you don't know better.
   277       
   278       Note: just pass in the option _value_, that is only the part that goes
   279       after the '=' sign.
   280 
   281 config CC_CORE_EXTRA_CONFIG
   282     string
   283     prompt "Core gcc extra config"
   284     default ""
   285     help
   286       Extra flags to pass onto ./configure when configuring the core gcc.
   287       
   288       The core gcc is a stripped down, C-only compiler needed to build
   289       the C library. Kinda bootstrap gcc, if you wish.
   290 
   291 config CC_EXTRA_CONFIG
   292     string
   293     prompt "gcc extra config"
   294     default ""
   295     depends on ! BARE_METAL
   296     help
   297       Extra flags to pass onto ./configure when configuring gcc.