config/binutils/binutils.in
author Yann Diorcet <diorcet.yann@gmail.com>
Mon Nov 19 21:45:09 2012 +0100 (2012-11-19)
changeset 3121 5016315d88ba
parent 3089 3662412ddd59
child 3142 6569f6a9060c
permissions -rw-r--r--
binutils/binutils: simplify gold dependencies

In preparation of adding a new kernel-type, Yann D. came up
with a change in semantic on binutils/gold availability.

So far, it was architectures' responsibility to declare that
they did support binutils/gold or not. It makes much more sense
that binutils/gold declares its own availability depending on
the current architecture; after all, architectures have no way
to know wether gold supports them, while gold does know it.

Signed-off-by:Yann Diorcet <diorcet.yann@gmail.com>
[yann.morin.1998@free.fr: split up original patch for self-contained changes]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <d3d1d51f399e6d2c1163.1353320546@macbook-smorlat.local>
Patchwork-Id: 199971
     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 # gold only suports the listed architectures
   119 config BINUTILS_GOLD_SUPPORTS_ARCH
   120     bool
   121     default y if ARCH_arm
   122     default y if ARCH_x86
   123 
   124 config BINUTILS_HAS_PLUGINS
   125     bool
   126 
   127 config BINUTILS_HAS_PKGVERSION_BUGURL
   128     bool
   129 
   130 # Force using the BFD linker if needed
   131 # This is the case for some C libraries (eg. glibc and
   132 # eglibc at least) and affected components can select this
   133 config BINUTILS_FORCE_LD_BFD
   134     bool
   135 
   136 choice
   137     bool
   138     prompt "Linkers to enable"
   139 
   140 config BINUTILS_LINKER_LD
   141     bool
   142     prompt "ld"
   143     help
   144       The historical, bfd linker.
   145 
   146 config BINUTILS_LINKER_GOLD
   147     bool
   148     prompt "gold"
   149     depends on BINUTILS_HAS_GOLD
   150     depends on BINUTILS_GOLD_SUPPORTS_ARCH
   151     depends on ! BINUTILS_FORCE_LD_BFD
   152     depends on EXPERIMENTAL
   153     select BINUTILS_GOLD_INSTALLED
   154     help
   155       gold is a new, optimised, multi-threaded linker with support
   156       for plugins. Designed to be a drop-in replacement for the
   157       original linker, ld, it can be much faster, with a 5:1 or
   158       bigger ratio being not uncommon, YMMV.
   159 
   160 config BINUTILS_LINKER_LD_GOLD
   161     bool
   162     prompt "ld, gold"
   163     depends on BINUTILS_HAS_GOLD
   164     depends on BINUTILS_GOLD_SUPPORTS_ARCH
   165     depends on EXPERIMENTAL
   166     select BINUTILS_GOLD_INSTALLED
   167     select BINUTILS_LINKER_BOTH
   168     help
   169       Both the historical ld and the new gold linkers will be
   170       installed, with ld being the default linker used.
   171       
   172       See help for gold, above.
   173 
   174 config BINUTILS_LINKER_GOLD_LD
   175     bool
   176     prompt "gold, ld"
   177     depends on BINUTILS_HAS_GOLD
   178     depends on BINUTILS_GOLD_SUPPORTS_ARCH
   179     depends on EXPERIMENTAL
   180     select BINUTILS_GOLD_INSTALLED
   181     select BINUTILS_LINKER_BOTH
   182     select BINUTILS_LD_WRAPPER if BINUTILS_FORCE_LD_BFD
   183     help
   184       Both the historical ld and the new gold linkers will be
   185       installed, with gold being the default linker used.
   186       
   187       See help for gold, above.
   188 
   189 endchoice # Enable linkers
   190 
   191 if BINUTILS_LINKER_GOLD
   192 comment "WARNING! gold is not capable of"
   193 comment "|         building glibc/eglibc!"
   194 endif # BINUTILS_LINKER_GOLD
   195 
   196 config BINUTILS_GOLD_INSTALLED
   197     bool
   198 
   199 config BINUTILS_GOLD_THREADS
   200     bool
   201     prompt "|  Enable threaded gold"
   202     depends on BINUTILS_GOLD_INSTALLED
   203     help
   204       When configured with threads, gold can link in parallel,
   205       possibly cooperating with a make jobserver.
   206 
   207 config BINUTILS_LINKER_BOTH
   208     bool
   209 
   210 config BINUTILS_LINKERS_LIST
   211     string
   212     default "ld"        if BINUTILS_LINKER_LD
   213     default "gold"      if BINUTILS_LINKER_GOLD
   214     default "ld,gold"   if BINUTILS_LINKER_LD_GOLD
   215     default "gold,ld"   if BINUTILS_LINKER_GOLD_LD
   216 
   217 config BINUTILS_LD_WRAPPER
   218     bool
   219     prompt "|  Add ld wrapper"
   220     depends on BINUTILS_LINKER_BOTH
   221     help
   222       Add an ld wrapper that calls to either gold or ld.
   223       
   224       By default, the wrapper will call to the default wrapper,
   225       but if you set the environment variable CTNG_LD_IS, you
   226       can change which linker will get called:
   227         CTNG_LD_IS=gold     will unconditionally call the gold linker
   228         CTNG_LD_IS=bfd      will unconditionally call the old bfd ld linker
   229 
   230 config BINUTILS_LINKER_DEFAULT
   231     string
   232     default "bfd"   if BINUTILS_LINKER_LD || BINUTILS_LINKER_LD_GOLD
   233     default "gold"  if BINUTILS_LINKER_GOLD || BINUTILS_LINKER_GOLD_LD
   234 
   235 config BINUTILS_PLUGINS
   236     bool
   237     prompt "Enable support for plugins"
   238     depends on BINUTILS_HAS_PLUGINS
   239     depends on ! STATIC_TOOLCHAIN
   240     help
   241       binutils can be extended through the use of plugins.
   242       Especially, gold can use the lto-plugin, as installed
   243       by gcc, to handle LTO.
   244 
   245 config BINUTILS_EXTRA_CONFIG_ARRAY
   246     string
   247     prompt "binutils extra config"
   248     default ""
   249     help
   250       Extra flags passed onto ./configure when configuring
   251       
   252       You can enter multiple arguments here, and arguments can contain spaces
   253       if they are properly quoted (or escaped, but prefer quotes). Eg.:
   254           --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
   255 
   256 config BINUTILS_FOR_TARGET
   257     bool
   258     prompt "binutils libraries for the target"
   259     depends on ! BARE_METAL
   260     depends on ! BACKEND
   261     help
   262       Some utilities may need binutils libraries to be available on
   263       the target, eg. oprofile.
   264 
   265 if BINUTILS_FOR_TARGET
   266 
   267 config BINUTILS_FOR_TARGET_IBERTY
   268     bool
   269     prompt "libiberty"
   270     default y
   271 
   272 config BINUTILS_FOR_TARGET_BFD
   273     bool
   274     prompt "libbfd"
   275     default y
   276 
   277 endif # BINUTILS_FOR_TARGET