From e17f291107728a7271fd011e2f0419a143f63e36 Mon Sep 17 00:00:00 2001 From: Zhang Qiang Date: Wed, 20 Jun 2012 08:55:51 +0800 Subject: [PATCH] build arch: ia32 support and use system arch by default --- gitbuildsys/cmd_build.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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))) -- 2.7.4