config/binutils/binutils.in
author David Holsgrove <david.holsgrove@xilinx.com>
Thu Oct 11 14:39:41 2012 +1000 (2012-10-11)
changeset 3089 3662412ddd59
parent 2947 479064d9a546
child 3121 5016315d88ba
permissions -rw-r--r--
binutils/binutils: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom

CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <7a604b5df9c84a1e20c3.1349931195@localhost.localdomain>
PatchWork-Id: 190788
     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_22
    12     bool
    13     prompt "2.22 (EXPERIMENTAL)"
    14     depends on EXPERIMENTAL
    15     select BINUTILS_2_22_or_later
    16 
    17 config BINUTILS_V_2_21_53
    18     bool
    19     prompt "2.21.53 (EXPERIMENTAL)"
    20     depends on EXPERIMENTAL
    21     select BINUTILS_2_21_or_later
    22 
    23 config BINUTILS_V_2_21_1a
    24     bool
    25     prompt "2.21.1a"
    26     select BINUTILS_2_21_or_later
    27 
    28 config BINUTILS_V_2_20_1a
    29     bool
    30     prompt "2.20.1a"
    31     select BINUTILS_2_20_or_later
    32 
    33 config BINUTILS_V_2_19_1a
    34     bool
    35     prompt "2.19.1a"
    36     select BINUTILS_2_19_or_later
    37 
    38 config BINUTILS_V_2_18a
    39     bool
    40     prompt "2.18a"
    41     select BINUTILS_2_18_or_later
    42 
    43 config BINUTILS_V_2_17a
    44     bool
    45     prompt "2.17a (OBSOLETE)"
    46     depends on OBSOLETE
    47 
    48 config BINUTILS_V_2_16_1a
    49     bool
    50     prompt "2.16.1a (OBSOLETE)"
    51     depends on OBSOLETE
    52 
    53 config BINUTILS_CUSTOM
    54     bool
    55     prompt "Custom binutils"
    56     depends on EXPERIMENTAL
    57     select BINUTILS_2_22_or_later
    58 
    59 endchoice
    60 
    61 if BINUTILS_CUSTOM
    62 
    63 config BINUTILS_CUSTOM_LOCATION
    64     string
    65     prompt "Full path to custom binutils source"
    66     default ""
    67     help
    68       Enter the path to the directory (or tarball) of your source for binutils,
    69       or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/binutils
    70 
    71 endif # BINUTILS_CUSTOM
    72 
    73 config BINUTILS_VERSION
    74     string
    75 # Don't remove next line
    76 # CT_INSERT_VERSION_STRING_BELOW
    77     default "2.22" if BINUTILS_V_2_22
    78     default "2.21.53" if BINUTILS_V_2_21_53
    79     default "2.21.1a" if BINUTILS_V_2_21_1a
    80     default "2.20.1a" if BINUTILS_V_2_20_1a
    81     default "2.19.1a" if BINUTILS_V_2_19_1a
    82     default "2.18a" if BINUTILS_V_2_18a
    83     default "2.17a" if BINUTILS_V_2_17a
    84     default "2.16.1a" if BINUTILS_V_2_16_1a
    85     default "custom" if BINUTILS_CUSTOM
    86 
    87 config BINUTILS_2_22_or_later
    88     bool
    89     select BINUTILS_2_21_or_later
    90     select BINUTILS_HAS_GOLD
    91     select BINUTILS_HAS_PLUGINS
    92 
    93 config BINUTILS_2_21_or_later
    94     bool
    95     select BINUTILS_2_20_or_later
    96     select BINUTILS_HAS_GOLD
    97     select BINUTILS_HAS_PLUGINS
    98 
    99 config BINUTILS_2_20_or_later
   100     bool
   101     select BINUTILS_2_19_or_later
   102 
   103 config BINUTILS_2_19_or_later
   104     bool
   105     select BINUTILS_2_18_or_later
   106 
   107 config BINUTILS_2_18_or_later
   108     bool
   109     select BINUTILS_HAS_PKGVERSION_BUGURL
   110     select BINUTILS_HAS_HASH_STYLE
   111 
   112 config BINUTILS_HAS_HASH_STYLE
   113     bool
   114 
   115 config BINUTILS_HAS_GOLD
   116     bool
   117 
   118 config BINUTILS_GOLD_SUPPORTS_ARCH
   119     bool
   120 
   121 config BINUTILS_HAS_PLUGINS
   122     bool
   123 
   124 config BINUTILS_HAS_PKGVERSION_BUGURL
   125     bool
   126 
   127 # Only these architectures have support in gold
   128 config ARCH_arm
   129     select BINUTILS_GOLD_SUPPORTS_ARCH
   130 
   131 config ARCH_x86
   132     select BINUTILS_GOLD_SUPPORTS_ARCH
   133 
   134 # Force using the BFD linker if needed
   135 # This is the case for some C libraries (eg. glibc and
   136 # eglibc at least) and affected components can select this
   137 config BINUTILS_FORCE_LD_BFD
   138     bool
   139 
   140 choice
   141     bool
   142     prompt "Linkers to enable"
   143 
   144 config BINUTILS_LINKER_LD
   145     bool
   146     prompt "ld"
   147     help
   148       The historical, bfd linker.
   149 
   150 config BINUTILS_LINKER_GOLD
   151     bool
   152     prompt "gold"
   153     depends on BINUTILS_HAS_GOLD
   154     depends on BINUTILS_GOLD_SUPPORTS_ARCH
   155     depends on ! BINUTILS_FORCE_LD_BFD
   156     depends on EXPERIMENTAL
   157     select BINUTILS_GOLD_INSTALLED
   158     help
   159       gold is a new, optimised, multi-threaded linker with support
   160       for plugins. Designed to be a drop-in replacement for the
   161       original linker, ld, it can be much faster, with a 5:1 or
   162       bigger ratio being not uncommon, YMMV.
   163 
   164 config BINUTILS_LINKER_LD_GOLD
   165     bool
   166     prompt "ld, gold"
   167     depends on BINUTILS_HAS_GOLD
   168     depends on BINUTILS_GOLD_SUPPORTS_ARCH
   169     depends on EXPERIMENTAL
   170     select BINUTILS_GOLD_INSTALLED
   171     select BINUTILS_LINKER_BOTH
   172     help
   173       Both the historical ld and the new gold linkers will be
   174       installed, with ld being the default linker used.
   175       
   176       See help for gold, above.
   177 
   178 config BINUTILS_LINKER_GOLD_LD
   179     bool
   180     prompt "gold, ld"
   181     depends on BINUTILS_HAS_GOLD
   182     depends on BINUTILS_GOLD_SUPPORTS_ARCH
   183     depends on EXPERIMENTAL
   184     select BINUTILS_GOLD_INSTALLED
   185     select BINUTILS_LINKER_BOTH
   186     select BINUTILS_LD_WRAPPER if BINUTILS_FORCE_LD_BFD
   187     help
   188       Both the historical ld and the new gold linkers will be
   189       installed, with gold being the default linker used.
   190       
   191       See help for gold, above.
   192 
   193 endchoice # Enable linkers
   194 
   195 if BINUTILS_LINKER_GOLD
   196 comment "WARNING! gold is not capable of"
   197 comment "|         building glibc/eglibc!"
   198 endif # BINUTILS_LINKER_GOLD
   199 
   200 config BINUTILS_GOLD_INSTALLED
   201     bool
   202 
   203 config BINUTILS_GOLD_THREADS
   204     bool
   205     prompt "|  Enable threaded gold"
   206     depends on BINUTILS_GOLD_INSTALLED
   207     help
   208       When configured with threads, gold can link in parallel,
   209       possibly cooperating with a make jobserver.
   210 
   211 config BINUTILS_LINKER_BOTH
   212     bool
   213 
   214 config BINUTILS_LINKERS_LIST
   215     string
   216     default "ld"        if BINUTILS_LINKER_LD
   217     default "gold"      if BINUTILS_LINKER_GOLD
   218     default "ld,gold"   if BINUTILS_LINKER_LD_GOLD
   219     default "gold,ld"   if BINUTILS_LINKER_GOLD_LD
   220 
   221 config BINUTILS_LD_WRAPPER
   222     bool
   223     prompt "|  Add ld wrapper"
   224     depends on BINUTILS_LINKER_BOTH
   225     help
   226       Add an ld wrapper that calls to either gold or ld.
   227       
   228       By default, the wrapper will call to the default wrapper,
   229       but if you set the environment variable CTNG_LD_IS, you
   230       can change which linker will get called:
   231         CTNG_LD_IS=gold     will unconditionally call the gold linker
   232         CTNG_LD_IS=bfd      will unconditionally call the old bfd ld linker
   233 
   234 config BINUTILS_LINKER_DEFAULT
   235     string
   236     default "bfd"   if BINUTILS_LINKER_LD || BINUTILS_LINKER_LD_GOLD
   237     default "gold"  if BINUTILS_LINKER_GOLD || BINUTILS_LINKER_GOLD_LD
   238 
   239 config BINUTILS_PLUGINS
   240     bool
   241     prompt "Enable support for plugins"
   242     depends on BINUTILS_HAS_PLUGINS
   243     depends on ! STATIC_TOOLCHAIN
   244     help
   245       binutils can be extended through the use of plugins.
   246       Especially, gold can use the lto-plugin, as installed
   247       by gcc, to handle LTO.
   248 
   249 config BINUTILS_EXTRA_CONFIG_ARRAY
   250     string
   251     prompt "binutils extra config"
   252     default ""
   253     help
   254       Extra flags passed onto ./configure when configuring
   255       
   256       You can enter multiple arguments here, and arguments can contain spaces
   257       if they are properly quoted (or escaped, but prefer quotes). Eg.:
   258           --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
   259 
   260 config BINUTILS_FOR_TARGET
   261     bool
   262     prompt "binutils libraries for the target"
   263     depends on ! BARE_METAL
   264     depends on ! BACKEND
   265     help
   266       Some utilities may need binutils libraries to be available on
   267       the target, eg. oprofile.
   268 
   269 if BINUTILS_FOR_TARGET
   270 
   271 config BINUTILS_FOR_TARGET_IBERTY
   272     bool
   273     prompt "libiberty"
   274     default y
   275 
   276 config BINUTILS_FOR_TARGET_BFD
   277     bool
   278     prompt "libbfd"
   279     default y
   280 
   281 endif # BINUTILS_FOR_TARGET