Lines Matching +full:buildman +full:- +full:toolchains

3 # SPDX-License-Identifier:	GPL-2.0+
36 self._match = '_%s-' % arch
54 cross: Cross compile string, e.g. 'arm-linux-'
56 component of the filename. E.g. arm-linux-gcc becomes arm
73 # Find the CROSS_COMPILE prefix to use for U-Boot. For example,
74 # 'arm-linux-gnueabihf-gcc' turns into 'arm-linux-gnueabihf-'.
76 pos = basename.rfind('-')
77 self.cross = basename[:pos + 1] if pos != -1 else ''
80 pos = self.cross.find('-')
84 self.arch = self.cross[:pos] if pos != -1 else 'sandbox'
88 # As a basic sanity check, run the C compiler with --version
89 cmd = [fname, '--version']
114 Toolchains are ranked according to their suitability by their
122 priority_list = ['-elf', '-unknown-linux-gnu', '-linux',
123 '-none-linux-gnueabi', '-none-linux-gnueabihf', '-uclinux',
124 '-none-eabi', '-gentoo-linux-gnu', '-linux-gnueabi',
125 '-linux-gnueabihf', '-le-linux', '-uclinux']
135 for name, value in bsettings.GetItems('toolchain-wrapper'):
169 class Toolchains: class
170 """Manage a list of toolchains for building U-Boot
175 toolchains: Dict of Toolchain objects, keyed by architecture name
178 {'x86', 'opt/i386-linux/bin/i386-linux-'}, or the name of
180 {'arm', 'arm-linux-gnueabihf-'}. Wildcards are not supported.
181 paths: List of paths to check for toolchains (may contain wildcards)
185 self.toolchains = {}
188 self._make_flags = dict(bsettings.GetItems('make-flags'))
200 toolchains = bsettings.GetItems('toolchain')
201 if show_warning and not toolchains:
202 print ("Warning: No tool chains. Please run 'buildman "
203 "--fetch-arch all' to download all available toolchains, or "
204 "add a [toolchain] section to your buildman config file "
209 for name, value in toolchains:
222 self.prefixes = bsettings.GetItems('toolchain-prefix')
240 if toolchain.arch in self.toolchains:
242 self.toolchains[toolchain.arch].priority)
244 self.toolchains[toolchain.arch] = toolchain
249 self.toolchains[toolchain.arch].priority))
263 if verbose: print " - looking in '%s'" % dirname
265 if verbose: print " - found '%s'" % fname
286 """Scan for available toolchains and select the best for each arch.
288 We look for all the toolchains we can file, figure out the
297 if verbose: print " - scanning prefix '%s'" % value
312 if verbose: print " - scanning path '%s'" % path
318 """List out the selected toolchains for each architecture"""
320 print col.Color(col.BLUE, 'List of available toolchains (%d):' %
321 len(self.toolchains))
322 if len(self.toolchains):
323 for key, value in sorted(self.toolchains.iteritems()):
324 print '%-10s: %s' % (key, value.gcc)
337 for tag, value in bsettings.GetItems('toolchain-alias'):
340 if alias in self.toolchains:
341 return self.toolchains[alias]
343 if not arch in self.toolchains:
345 return self.toolchains[arch]
360 >>> tcs = Toolchains()
369 re_var = re.compile('(\$\{[-_a-z0-9A-Z]{1,}\})')
375 lookup = m.group(0)[2:-1]
383 The flags are in a section called 'make-flags'. Flags are named
390 [make-flags]
391 at91-boards=ENABLE_AT91_TEST=1
392 snapper9260=${at91-boards} BUILD_TAG=442
393 snapper9g45=${at91-boards} BUILD_TAG=443
420 Look in standard places for available toolchains. At present the
428 List of toolchains
432 arch = command.OutputOneLine('uname', '-m')
463 leaf = url.split('/')[-1]
464 tmpdir = tempfile.mkdtemp('.buildman')
469 size = int(meta.getheaders('Content-Length')[0])
505 stdout = command.Output('tar', 'xvfJ', fname, '-C', dest)
506 return stdout.splitlines()[0][:-1]
509 """Check if buildman will find this toolchain
518 """List architectures with available toolchains to download"""
520 re_arch = re.compile('[-a-z0-9.]*_([^-]*)-.*')
540 print ("Cannot find toolchain for arch '%s' - use 'list' to list" %
544 dest = os.path.join(home, '.buildman-toolchains')
564 print 'Could not locate C compiler - fetch failed.'
567 print col.Color(col.RED, 'Warning, ambiguous toolchains: %s' %
571 # Make sure that it will be found by buildman