config/binutils/binutils.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Apr 05 01:17:58 2011 +0200 (2011-04-05)
branch1.10
changeset 2397 aee55f7b7ea7
parent 2316 9139319423fd
child 2373 edbd46e8bb97
permissions -rw-r--r--
binutils/binutils: hide gold option if no support for current architecture

The gold linker does currently support only a limited set of architectures:
- x86 (32- and 64-bit)
- ARM

Hide the gold option for other architectures.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 148e80538623dd4fdb7895546138eabaf5712518)
     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_GOLD_SUPPORTS_ARCH
    71     bool
    72 
    73 config BINUTILS_HAS_PLUGINS
    74     bool
    75 
    76 # Only these architectures have support in gold
    77 config ARCH_arm
    78     select BINUTILS_GOLD_SUPPORTS_ARCH
    79 
    80 config ARCH_x86
    81     select BINUTILS_GOLD_SUPPORTS_ARCH
    82 
    83 if BINUTILS_HAS_GOLD && BINUTILS_GOLD_SUPPORTS_ARCH
    84 
    85 choice
    86     bool
    87     prompt "Linkers to enable"
    88 
    89 config BINUTILS_LINKER_LD
    90     bool
    91     prompt "ld"
    92     help
    93       The historical, bfd linker.
    94 
    95 config BINUTILS_LINKER_GOLD
    96     bool
    97     prompt "gold"
    98     depends on BINUTILS_HAS_GOLD
    99     depends on EXPERIMENTAL
   100     select BINUTILS_GOLD_INSTALLED
   101     help
   102       gold is a new, optimised, multi-threaded linker with support
   103       for plugins. Designed to be a drop-in replacement for the
   104       original linker, ld, it can be much faster, with a 5:1 or
   105       bigger ratio being not uncommon, YMMV.
   106 
   107 config BINUTILS_LINKER_LD_GOLD
   108     bool
   109     prompt "ld, gold"
   110     depends on BINUTILS_HAS_GOLD
   111     depends on EXPERIMENTAL
   112     select BINUTILS_GOLD_INSTALLED
   113     select BINUTILS_LINKER_BOTH
   114     help
   115       Both the historical ld and the new gold linkers will be
   116       installed, with ld being the default linker used.
   117       
   118       See help for gold, above.
   119 
   120 config BINUTILS_LINKER_GOLD_LD
   121     bool
   122     prompt "gold, ld"
   123     depends on BINUTILS_HAS_GOLD
   124     depends on EXPERIMENTAL
   125     select BINUTILS_GOLD_INSTALLED
   126     select BINUTILS_LINKER_BOTH
   127     help
   128       Both the historical ld and the new gold linkers will be
   129       installed, with gold being the default linker used.
   130       
   131       See help for gold, above.
   132 
   133 endchoice # Enable linkers
   134 
   135 config BINUTILS_GOLD_INSTALLED
   136     bool
   137 
   138 config BINUTILS_GOLD_THREADS
   139     bool
   140     prompt "|  Enable threaded gold"
   141     depends on BINUTILS_GOLD_INSTALLED
   142     help
   143       When configured with threads, gold can link in parallel,
   144       possibly cooperating with a make jobserver.
   145 
   146 config BINUTILS_LINKER_BOTH
   147     bool
   148 
   149 config BINUTILS_LINKERS_LIST
   150     string
   151     default "ld"        if BINUTILS_LINKER_LD
   152     default "gold"      if BINUTILS_LINKER_GOLD
   153     default "ld,gold"   if BINUTILS_LINKER_LD_GOLD
   154     default "gold,ld"   if BINUTILS_LINKER_GOLD_LD
   155 
   156 config BINUTILS_LD_WRAPPER
   157     bool
   158     prompt "|  Add ld wrapper"
   159     depends on BINUTILS_LINKER_BOTH
   160     help
   161       Add an ld wrapper that calls to either gold or ld.
   162       
   163       By default, the wrapper will call to the default wrapper,
   164       but if you set the environment variable CTNG_LD_IS, you
   165       can change which linker will get called:
   166         CTNG_LD_IS=gold     will unconditionally call the gold linker
   167         CTNG_LD_IS=bfd      will unconditionally call the old bfd ld linker
   168 
   169 config BINUTILS_LINKER_DEFAULT
   170     string
   171     depends on BINUTILS_LD_WRAPPER
   172     default "bfd"   if BINUTILS_LINKER_LD_GOLD
   173     default "gold"  if BINUTILS_LINKER_GOLD_LD
   174 
   175 endif # BINUTILS_HAS_GOLD
   176 
   177 config BINUTILS_PLUGINS
   178     bool
   179     prompt "Enable support for plugins"
   180     depends on BINUTILS_HAS_PLUGINS
   181     depends on ! STATIC_TOOLCHAIN
   182     help
   183       binutils can be extended through the use of plugins.
   184       Especially, gold can use the lto-plugin, as installed
   185       by gcc, to handle LTO.
   186 
   187 config BINUTILS_EXTRA_CONFIG
   188     string
   189     prompt "binutils extra config"
   190     default ""
   191     help
   192       Extra flags passed onto ./configure when configuring
   193 
   194 config BINUTILS_FOR_TARGET
   195     bool
   196     prompt "binutils libraries for the target"
   197     depends on ! BARE_METAL
   198     depends on ! BACKEND
   199     default n
   200     help
   201       Some utilities may need binutils libraries to be available on
   202       the target, eg. oprofile.
   203 
   204 if BINUTILS_FOR_TARGET
   205 
   206 config BINUTILS_FOR_TARGET_IBERTY
   207     bool
   208     prompt "libiberty"
   209     default y
   210 
   211 config BINUTILS_FOR_TARGET_BFD
   212     bool
   213     prompt "libbfd"
   214     default y
   215 
   216 endif # BINUTILS_FOR_TARGET