config/binutils/binutils.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Apr 05 23:34:16 2011 +0200 (2011-04-05)
changeset 2375 1752ade7dc52
parent 2373 edbd46e8bb97
child 2376 369664fd7cba
permissions -rw-r--r--
binutils/binutils: also install the wrapper for the internall ld

ld is also installed in PREFIX/TUPLE/bin, so we need to wrap that
as well.

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