config/binutils/binutils.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 28 00:11:33 2010 +0100 (2010-12-28)
changeset 2244 dc2d2342e4a9
parent 2243 1fb02a4ca444
child 2245 a6d790bc17af
permissions -rw-r--r--
binutils/binutils: add option to enable gold

gold is a new, optimised, multi-threaded linker with support
for plugins.

Add support for gold starting with binutils 2.21. Although 2.20
also had gold, the configure flags have changed, and supporting
2.20 would be a mess in the code.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@1345
     1
# binutils options
yann@1345
     2
yann@1345
     3
comment "GNU binutils"
yann@1345
     4
yann@1345
     5
choice
yann@1345
     6
    bool
yann@1345
     7
    prompt "binutils version"
yann@1535
     8
# Don't remove next line
yann@1535
     9
# CT_INSERT_VERSION_BELOW
yann@1345
    10
bryanhundven@2226
    11
config BINUTILS_V_2_21
bryanhundven@2226
    12
    bool
bryanhundven@2226
    13
    depends on EXPERIMENTAL
bryanhundven@2226
    14
    prompt "2.21"
yann@2243
    15
    select BINUTILS_2_21_or_later
bryanhundven@2226
    16
js@2012
    17
config BINUTILS_V_2_20_1
js@2012
    18
    bool
js@2012
    19
    prompt "2.20.1"
js@2012
    20
yann@1614
    21
config BINUTILS_V_2_20
yann@1614
    22
    bool
yann@1614
    23
    prompt "2.20"
yann@1614
    24
yann@1534
    25
config BINUTILS_V_2_19_1
yann@1345
    26
    bool
yann@1534
    27
    prompt "2.19.1"
yann@1345
    28
yann@1534
    29
config BINUTILS_V_2_19
yann@1345
    30
    bool
yann@1534
    31
    prompt "2.19"
yann@1345
    32
yann@1534
    33
config BINUTILS_V_2_18
yann@1345
    34
    bool
yann@1534
    35
    prompt "2.18"
yann@1345
    36
yann@1534
    37
config BINUTILS_V_2_17
yann@1345
    38
    bool
yann@1615
    39
    prompt "2.17 (OBSOLETE)"
yann@1615
    40
    depends on OBSOLETE
yann@1345
    41
yann@1534
    42
config BINUTILS_V_2_16_1
yann@1345
    43
    bool
yann@1615
    44
    prompt "2.16.1 (OBSOLETE)"
yann@1615
    45
    depends on OBSOLETE
yann@1345
    46
yann@1345
    47
endchoice
yann@1345
    48
yann@1345
    49
config BINUTILS_VERSION
yann@1345
    50
    string
yann@1535
    51
# Don't remove next line
yann@1535
    52
# CT_INSERT_VERSION_STRING_BELOW
bryanhundven@2226
    53
    default "2.21" if BINUTILS_V_2_21
js@2012
    54
    default "2.20.1" if BINUTILS_V_2_20_1
yann@1614
    55
    default "2.20" if BINUTILS_V_2_20
yann@1534
    56
    default "2.19.1" if BINUTILS_V_2_19_1
yann@1534
    57
    default "2.19" if BINUTILS_V_2_19
yann@1534
    58
    default "2.18" if BINUTILS_V_2_18
yann@1534
    59
    default "2.17" if BINUTILS_V_2_17
yann@1534
    60
    default "2.16.1" if BINUTILS_V_2_16_1
yann@1345
    61
yann@2243
    62
config BINUTILS_2_21_or_later
yann@2243
    63
    bool
yann@2244
    64
    select BINUTILS_HAS_GOLD
yann@2244
    65
yann@2244
    66
config BINUTILS_HAS_GOLD
yann@2244
    67
    bool
yann@2244
    68
yann@2244
    69
if BINUTILS_HAS_GOLD
yann@2244
    70
yann@2244
    71
choice
yann@2244
    72
    bool
yann@2244
    73
    prompt "Linkers to enable"
yann@2244
    74
yann@2244
    75
config BINUTILS_LINKER_LD
yann@2244
    76
    bool
yann@2244
    77
    prompt "ld"
yann@2244
    78
    help
yann@2244
    79
      The historical, bfd linker.
yann@2244
    80
yann@2244
    81
config BINUTILS_LINKER_GOLD
yann@2244
    82
    bool
yann@2244
    83
    prompt "gold"
yann@2244
    84
    depends on BINUTILS_HAS_GOLD
yann@2244
    85
    depends on EXPERIMENTAL
yann@2244
    86
    select BINUTILS_GOLD_INSTALLED
yann@2244
    87
    help
yann@2244
    88
      gold is a new, optimised, multi-threaded linker with support
yann@2244
    89
      for plugins. Designed to be a drop-in replacement for the
yann@2244
    90
      original linker, ld, it can be much faster, with a 5:1 or
yann@2244
    91
      bigger ratio being not uncommon, YMMV.
yann@2244
    92
yann@2244
    93
config BINUTILS_LINKER_LD_GOLD
yann@2244
    94
    bool
yann@2244
    95
    prompt "ld, gold"
yann@2244
    96
    depends on BINUTILS_HAS_GOLD
yann@2244
    97
    depends on EXPERIMENTAL
yann@2244
    98
    select BINUTILS_GOLD_INSTALLED
yann@2244
    99
    help
yann@2244
   100
      Both the historical ld and the new gold linkers will be
yann@2244
   101
      installed, with ld being the default linker used.
yann@2244
   102
      
yann@2244
   103
      See help for gold, above.
yann@2244
   104
yann@2244
   105
config BINUTILS_LINKER_GOLD_LD
yann@2244
   106
    bool
yann@2244
   107
    prompt "gold, ld"
yann@2244
   108
    depends on BINUTILS_HAS_GOLD
yann@2244
   109
    depends on EXPERIMENTAL
yann@2244
   110
    select BINUTILS_GOLD_INSTALLED
yann@2244
   111
    help
yann@2244
   112
      Both the historical ld and the new gold linkers will be
yann@2244
   113
      installed, with gold being the default linker used.
yann@2244
   114
      
yann@2244
   115
      See help for gold, above.
yann@2244
   116
yann@2244
   117
endchoice # Enable linkers
yann@2244
   118
yann@2244
   119
config BINUTILS_GOLD_INSTALLED
yann@2244
   120
    bool
yann@2244
   121
yann@2244
   122
config BINUTILS_LINKERS_LIST
yann@2244
   123
    string
yann@2244
   124
    default "ld"        if BINUTILS_LINKER_LD
yann@2244
   125
    default "gold"      if BINUTILS_LINKER_GOLD
yann@2244
   126
    default "ld,gold"   if BINUTILS_LINKER_LD_GOLD
yann@2244
   127
    default "gold,ld"   if BINUTILS_LINKER_GOLD_LD
yann@2244
   128
yann@2244
   129
endif # BINUTILS_HAS_GOLD
yann@2243
   130
yann@1345
   131
config BINUTILS_EXTRA_CONFIG
yann@1345
   132
    string
yann@1345
   133
    prompt "binutils extra config"
yann@1345
   134
    default ""
yann@1345
   135
    help
yann@1345
   136
      Extra flags passed onto ./configure when configuring
yann@1345
   137
yann@1345
   138
config BINUTILS_FOR_TARGET
yann@1345
   139
    bool
yann@1345
   140
    prompt "binutils libraries for the target"
yann@1345
   141
    depends on ! BARE_METAL
yann@1844
   142
    depends on ! BACKEND
yann@1345
   143
    default n
yann@1345
   144
    help
yann@1345
   145
      Some utilities may need binutils libraries to be available on
yann@1345
   146
      the target, eg. oprofile.
yann@1345
   147
yann@1345
   148
if BINUTILS_FOR_TARGET
yann@1345
   149
yann@1345
   150
config BINUTILS_FOR_TARGET_IBERTY
yann@1345
   151
    bool
yann@1345
   152
    prompt "libiberty"
yann@1345
   153
    default y
yann@1345
   154
yann@1345
   155
config BINUTILS_FOR_TARGET_BFD
yann@1345
   156
    bool
yann@1345
   157
    prompt "libbfd"
yann@1345
   158
    default y
yann@1345
   159
yann@1345
   160
endif # BINUTILS_FOR_TARGET