X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fbuildman%2Ftoolchain.py;h=27dc31889b8021c64d0af0d9bdf2898253e0b993;hb=0bd51251331a341dae8c19ae2e36a3262ae2ef72;hp=a292338b6d0894bd4cd5ca78154bd3c4c9b77b66;hpb=f835c77fb7e57508ffe8d8ca3a092ee28add77b2;p=u-boot diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index a292338b6d..27dc31889b 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -39,7 +39,8 @@ class Toolchain: # As a basic sanity check, run the C compiler with --version cmd = [fname, '--version'] if test: - result = command.RunPipe([cmd], capture=True, env=env) + result = command.RunPipe([cmd], capture=True, env=env, + raise_on_error=False) self.ok = result.return_code == 0 if verbose: print 'Tool chain test: ', @@ -65,7 +66,7 @@ class Toolchain: Returns: Priority of toolchain, 0=highest, 20=lowest. """ - priority_list = ['-elf', '-unknown-linux-gnu', '-linux', '-elf', + priority_list = ['-elf', '-unknown-linux-gnu', '-linux', '-none-linux-gnueabi', '-uclinux', '-none-eabi', '-gentoo-linux-gnu', '-linux-gnueabi', '-le-linux', '-uclinux'] for prio in range(len(priority_list)): @@ -98,18 +99,20 @@ class Toolchains: def __init__(self): self.toolchains = {} self.paths = [] + self._make_flags = dict(bsettings.GetItems('make-flags')) + + def GetSettings(self): toolchains = bsettings.GetItems('toolchain') if not toolchains: print ("Warning: No tool chains - please add a [toolchain] section" " to your buildman config file %s. See README for details" % - config_fname) + bsettings.config_fname) for name, value in toolchains: if '*' in value: self.paths += glob.glob(value) else: self.paths.append(value) - self._make_flags = dict(bsettings.GetItems('make-flags')) def Add(self, fname, test=True, verbose=False): """Add a toolchain to our list @@ -197,7 +200,7 @@ class Toolchains: >>> tcs.ResolveReferences(var_dict, 'this=${oblique}_set${first}nd') 'this=OBLIQUE_setfi2ndrstnd' """ - re_var = re.compile('(\$\{[a-z0-9A-Z]{1,}\})') + re_var = re.compile('(\$\{[-_a-z0-9A-Z]{1,}\})') while True: m = re_var.search(args)