config/binutils/binutils.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Feb 22 23:27:42 2011 +0100 (2011-02-22)
changeset 2316 9139319423fd
parent 2247 49fa28e62b07
child 2372 148e80538623
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>
     1 # binutils options
     2 
     3 comment "GNU binutils"
     4 
     5 choice
     6     bool
     7     prompt "binutils version"
     8 # Don't remove next line
     9 # CT_INSERT_VERSION_BELOW
    10 
    11 config BINUTILS_V_2_21
    12     bool
    13     depends on EXPERIMENTAL
    14     prompt "2.21"
    15     select BINUTILS_2_21_or_later
    16 
    17 config BINUTILS_V_2_20_1
    18     bool
    19     prompt "2.20.1"
    20 
    21 config BINUTILS_V_2_20
    22     bool
    23     prompt "2.20"
    24 
    25 config BINUTILS_V_2_19_1
    26     bool
    27     prompt "2.19.1"
    28 
    29 config BINUTILS_V_2_19
    30     bool
    31     prompt "2.19"
    32 
    33 config BINUTILS_V_2_18
    34     bool
    35     prompt "2.18"
    36 
    37 config BINUTILS_V_2_17
    38     bool
    39     prompt "2.17 (OBSOLETE)"
    40     depends on OBSOLETE
    41 
    42 config BINUTILS_V_2_16_1
    43     bool
    44     prompt "2.16.1 (OBSOLETE)"
    45     depends on OBSOLETE
    46 
    47 endchoice
    48 
    49 config BINUTILS_VERSION
    50     string
    51 # Don't remove next line
    52 # CT_INSERT_VERSION_STRING_BELOW
    53     default "2.21" if BINUTILS_V_2_21
    54     default "2.20.1" if BINUTILS_V_2_20_1
    55     default "2.20" if BINUTILS_V_2_20
    56     default "2.19.1" if BINUTILS_V_2_19_1
    57     default "2.19" if BINUTILS_V_2_19
    58     default "2.18" if BINUTILS_V_2_18
    59     default "2.17" if BINUTILS_V_2_17
    60     default "2.16.1" if BINUTILS_V_2_16_1
    61 
    62 config BINUTILS_2_21_or_later
    63     bool
    64     select BINUTILS_HAS_GOLD
    65     select BINUTILS_HAS_PLUGINS
    66 
    67 config BINUTILS_HAS_GOLD
    68     bool
    69 
    70 config BINUTILS_HAS_PLUGINS
    71     bool
    72 
    73 if BINUTILS_HAS_GOLD
    74 
    75 choice
    76     bool
    77     prompt "Linkers to enable"
    78 
    79 config BINUTILS_LINKER_LD
    80     bool
    81     prompt "ld"
    82     help
    83       The historical, bfd linker.
    84 
    85 config BINUTILS_LINKER_GOLD
    86     bool
    87     prompt "gold"
    88     depends on BINUTILS_HAS_GOLD
    89     depends on EXPERIMENTAL
    90     select BINUTILS_GOLD_INSTALLED
    91     help
    92       gold is a new, optimised, multi-threaded linker with support
    93       for plugins. Designed to be a drop-in replacement for the
    94       original linker, ld, it can be much faster, with a 5:1 or
    95       bigger ratio being not uncommon, YMMV.
    96 
    97 config BINUTILS_LINKER_LD_GOLD
    98     bool
    99     prompt "ld, gold"
   100     depends on BINUTILS_HAS_GOLD
   101     depends on EXPERIMENTAL
   102     select BINUTILS_GOLD_INSTALLED
   103     select BINUTILS_LINKER_BOTH
   104     help
   105       Both the historical ld and the new gold linkers will be
   106       installed, with ld being the default linker used.
   107       
   108       See help for gold, above.
   109 
   110 config BINUTILS_LINKER_GOLD_LD
   111     bool
   112     prompt "gold, ld"
   113     depends on BINUTILS_HAS_GOLD
   114     depends on EXPERIMENTAL
   115     select BINUTILS_GOLD_INSTALLED
   116     select BINUTILS_LINKER_BOTH
   117     help
   118       Both the historical ld and the new gold linkers will be
   119       installed, with gold being the default linker used.
   120       
   121       See help for gold, above.
   122 
   123 endchoice # Enable linkers
   124 
   125 config BINUTILS_GOLD_INSTALLED
   126     bool
   127 
   128 config BINUTILS_GOLD_THREADS
   129     bool
   130     prompt "|  Enable threaded gold"
   131     depends on BINUTILS_GOLD_INSTALLED
   132     help
   133       When configured with threads, gold can link in parallel,
   134       possibly cooperating with a make jobserver.
   135 
   136 config BINUTILS_LINKER_BOTH
   137     bool
   138 
   139 config BINUTILS_LINKERS_LIST
   140     string
   141     default "ld"        if BINUTILS_LINKER_LD
   142     default "gold"      if BINUTILS_LINKER_GOLD
   143     default "ld,gold"   if BINUTILS_LINKER_LD_GOLD
   144     default "gold,ld"   if BINUTILS_LINKER_GOLD_LD
   145 
   146 config BINUTILS_LD_WRAPPER
   147     bool
   148     prompt "|  Add ld wrapper"
   149     depends on BINUTILS_LINKER_BOTH
   150     help
   151       Add an ld wrapper that calls to either gold or ld.
   152       
   153       By default, the wrapper will call to the default wrapper,
   154       but if you set the environment variable CTNG_LD_IS, you
   155       can change which linker will get called:
   156         CTNG_LD_IS=gold     will unconditionally call the gold linker
   157         CTNG_LD_IS=bfd      will unconditionally call the old bfd ld linker
   158 
   159 config BINUTILS_LINKER_DEFAULT
   160     string
   161     depends on BINUTILS_LD_WRAPPER
   162     default "bfd"   if BINUTILS_LINKER_LD_GOLD
   163     default "gold"  if BINUTILS_LINKER_GOLD_LD
   164 
   165 endif # BINUTILS_HAS_GOLD
   166 
   167 config BINUTILS_PLUGINS
   168     bool
   169     prompt "Enable support for plugins"
   170     depends on BINUTILS_HAS_PLUGINS
   171     depends on ! STATIC_TOOLCHAIN
   172     help
   173       binutils can be extended through the use of plugins.
   174       Especially, gold can use the lto-plugin, as installed
   175       by gcc, to handle LTO.
   176 
   177 config BINUTILS_EXTRA_CONFIG
   178     string
   179     prompt "binutils extra config"
   180     default ""
   181     help
   182       Extra flags passed onto ./configure when configuring
   183 
   184 config BINUTILS_FOR_TARGET
   185     bool
   186     prompt "binutils libraries for the target"
   187     depends on ! BARE_METAL
   188     depends on ! BACKEND
   189     default n
   190     help
   191       Some utilities may need binutils libraries to be available on
   192       the target, eg. oprofile.
   193 
   194 if BINUTILS_FOR_TARGET
   195 
   196 config BINUTILS_FOR_TARGET_IBERTY
   197     bool
   198     prompt "libiberty"
   199     default y
   200 
   201 config BINUTILS_FOR_TARGET_BFD
   202     bool
   203     prompt "libbfd"
   204     default y
   205 
   206 endif # BINUTILS_FOR_TARGET