From: Zhang Qiang Date: Wed, 20 Jun 2012 00:55:51 +0000 (+0800) Subject: build arch: ia32 support and use system arch by default X-Git-Tag: 0.7~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e17f291107728a7271fd011e2f0419a143f63e36;p=tools%2Fgbs.git build arch: ia32 support and use system arch by default --- diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index ac57c23..ef8d39a 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -53,13 +53,14 @@ obsarchmap = { } buildarchmap = { + 'ia32': 'i686', 'i686': 'i686', 'i586': 'i686', 'i386': 'i686', } supportedarchs = [ - 'x86_64', + 'ia32', 'i686', 'i586', 'armv7hl', @@ -231,12 +232,16 @@ def do(opts, args): workdir = os.path.abspath(args[0]) hostarch = get_hostarch() - buildarch = hostarch if opts.arch: - if opts.arch in buildarchmap: - buildarch = buildarchmap[opts.arch] - else: - buildarch = opts.arch + buildarch = opts.arch + else: + buildarch = hostarch + msger.info('No arch specified, using system arch: %s' % hostarch) + if buildarch in buildarchmap: + buildarch = buildarchmap[buildarch] + else: + buildarch = opts.arch + if not buildarch in supportedarchs: msger.error('arch %s not supported, supported archs are: %s ' % \ (buildarch, ','.join(supportedarchs)))