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
7 prompt "binutils version"
8 # Don't remove next line
9 # CT_INSERT_VERSION_BELOW
11 config BINUTILS_V_2_22
13 prompt "2.22 (EXPERIMENTAL)"
14 depends on EXPERIMENTAL
15 select BINUTILS_2_22_or_later
17 config BINUTILS_V_2_21_53
19 prompt "2.21.53 (EXPERIMENTAL)"
20 depends on EXPERIMENTAL
21 select BINUTILS_2_21_or_later
23 config BINUTILS_V_2_21_1a
26 select BINUTILS_2_21_or_later
28 config BINUTILS_V_2_20_1a
31 select BINUTILS_2_20_or_later
33 config BINUTILS_V_2_19_1a
36 select BINUTILS_2_19_or_later
38 config BINUTILS_V_2_18a
41 select BINUTILS_2_18_or_later
43 config BINUTILS_V_2_17a
45 prompt "2.17a (OBSOLETE)"
48 config BINUTILS_V_2_16_1a
50 prompt "2.16.1a (OBSOLETE)"
53 config BINUTILS_CUSTOM
55 prompt "Custom binutils"
56 depends on EXPERIMENTAL
57 select BINUTILS_2_22_or_later
63 config BINUTILS_CUSTOM_LOCATION
65 prompt "Full path to custom binutils source"
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
71 endif # BINUTILS_CUSTOM
73 config BINUTILS_VERSION
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
87 config BINUTILS_2_22_or_later
89 select BINUTILS_2_21_or_later
90 select BINUTILS_HAS_GOLD
91 select BINUTILS_HAS_PLUGINS
93 config BINUTILS_2_21_or_later
95 select BINUTILS_2_20_or_later
96 select BINUTILS_HAS_GOLD
97 select BINUTILS_HAS_PLUGINS
99 config BINUTILS_2_20_or_later
101 select BINUTILS_2_19_or_later
103 config BINUTILS_2_19_or_later
105 select BINUTILS_2_18_or_later
107 config BINUTILS_2_18_or_later
109 select BINUTILS_HAS_PKGVERSION_BUGURL
110 select BINUTILS_HAS_HASH_STYLE
112 config BINUTILS_HAS_HASH_STYLE
115 config BINUTILS_HAS_GOLD
118 config BINUTILS_GOLD_SUPPORTS_ARCH
121 config BINUTILS_HAS_PLUGINS
124 config BINUTILS_HAS_PKGVERSION_BUGURL
127 # Only these architectures have support in gold
129 select BINUTILS_GOLD_SUPPORTS_ARCH
132 select BINUTILS_GOLD_SUPPORTS_ARCH
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
142 prompt "Linkers to enable"
144 config BINUTILS_LINKER_LD
148 The historical, bfd linker.
150 config BINUTILS_LINKER_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
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.
164 config BINUTILS_LINKER_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
173 Both the historical ld and the new gold linkers will be
174 installed, with ld being the default linker used.
176 See help for gold, above.
178 config BINUTILS_LINKER_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
188 Both the historical ld and the new gold linkers will be
189 installed, with gold being the default linker used.
191 See help for gold, above.
193 endchoice # Enable linkers
195 if BINUTILS_LINKER_GOLD
196 comment "WARNING! gold is not capable of"
197 comment "| building glibc/eglibc!"
198 endif # BINUTILS_LINKER_GOLD
200 config BINUTILS_GOLD_INSTALLED
203 config BINUTILS_GOLD_THREADS
205 prompt "| Enable threaded gold"
206 depends on BINUTILS_GOLD_INSTALLED
208 When configured with threads, gold can link in parallel,
209 possibly cooperating with a make jobserver.
211 config BINUTILS_LINKER_BOTH
214 config BINUTILS_LINKERS_LIST
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
221 config BINUTILS_LD_WRAPPER
223 prompt "| Add ld wrapper"
224 depends on BINUTILS_LINKER_BOTH
226 Add an ld wrapper that calls to either gold or ld.
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
234 config BINUTILS_LINKER_DEFAULT
236 default "bfd" if BINUTILS_LINKER_LD || BINUTILS_LINKER_LD_GOLD
237 default "gold" if BINUTILS_LINKER_GOLD || BINUTILS_LINKER_GOLD_LD
239 config BINUTILS_PLUGINS
241 prompt "Enable support for plugins"
242 depends on BINUTILS_HAS_PLUGINS
243 depends on ! STATIC_TOOLCHAIN
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.
249 config BINUTILS_EXTRA_CONFIG_ARRAY
251 prompt "binutils extra config"
254 Extra flags passed onto ./configure when configuring
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
260 config BINUTILS_FOR_TARGET
262 prompt "binutils libraries for the target"
263 depends on ! BARE_METAL
266 Some utilities may need binutils libraries to be available on
267 the target, eg. oprofile.
269 if BINUTILS_FOR_TARGET
271 config BINUTILS_FOR_TARGET_IBERTY
276 config BINUTILS_FOR_TARGET_BFD
281 endif # BINUTILS_FOR_TARGET