Lines Matching +full:- +full:- +full:fetch +full:- +full:arch

3 # SPDX-License-Identifier:	GPL-2.0+
23 def __init__(self, arch): argument
31 arch: Architecture to search for
36 self._match = '_%s-' % arch
54 cross: Cross compile string, e.g. 'arm-linux-'
55 arch: Architecture of toolchain as determined from the first
56 component of the filename. E.g. arm-linux-gcc becomes arm
60 arch=None): argument
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('-')
81 if arch:
82 self.arch = arch
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']
101 print "OK, arch='%s', priority %d" % (self.arch,
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'):
170 """Manage a list of toolchains for building U-Boot
178 {'x86', 'opt/i386-linux/bin/i386-linux-'}, or the name of
180 {'arm', 'arm-linux-gnueabihf-'}. Wildcards are not supported.
188 self._make_flags = dict(bsettings.GetItems('make-flags'))
203 "--fetch-arch all' to download all available toolchains, or "
222 self.prefixes = bsettings.GetItems('toolchain-prefix')
226 arch=None): argument
236 arch: Toolchain architecture, or None if not known
238 toolchain = Toolchain(fname, test, verbose, priority, arch)
240 if toolchain.arch in self.toolchains:
242 self.toolchains[toolchain.arch].priority)
244 self.toolchains[toolchain.arch] = toolchain
247 "another toolchain for arch '%s' has priority %d" %
248 (toolchain.gcc, toolchain.priority, toolchain.arch,
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.
290 highest priority toolchain for each arch.
297 if verbose: print " - scanning prefix '%s'" % value
312 if verbose: print " - scanning path '%s'" % path
324 print '%-10s: %s' % (key, value.gcc)
328 def Select(self, arch): argument
337 for tag, value in bsettings.GetItems('toolchain-alias'):
338 if arch == tag:
343 if not arch in self.toolchains:
344 raise ValueError, ("No tool chain found for arch '%s'" % arch)
345 return self.toolchains[arch]
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
424 arch: Architecture to look for, or 'list' for all
432 arch = command.OutputOneLine('uname', '-m')
437 url = '%s/%s/%s/' % (base, arch, version)
448 return arch, links
463 leaf = url.split('/')[-1]
469 size = int(meta.getheaders('Content-Length')[0])
505 stdout = command.Output('tar', 'xvfJ', fname, '-C', dest)
506 return stdout.splitlines()[0][:-1]
520 re_arch = re.compile('[-a-z0-9.]*_([^-]*)-.*')
524 arch = re_arch.match(archive[len(host_arch):])
525 if arch:
526 arch_set.add(arch.group(1))
529 def FetchAndInstall(self, arch): argument
530 """Fetch and install a new toolchain
532 arch:
533 Architecture to fetch, or 'list' to list
537 print col.Color(col.BLUE, "Downloading toolchain for arch '%s'" % arch)
538 url = self.LocateArchUrl(arch)
540 print ("Cannot find toolchain for arch '%s' - use 'list' to list" %
541 arch)
544 dest = os.path.join(home, '.buildman-toolchains')
564 print 'Could not locate C compiler - fetch failed.'