From patchwork Tue Dec 20 20:37:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wookey X-Patchwork-Id: 5903 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1DD3223E01 for ; Tue, 20 Dec 2011 20:37:28 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0DF51A182B3 for ; Tue, 20 Dec 2011 20:37:28 +0000 (UTC) Received: by eaac11 with SMTP id c11so3810854eaa.11 for ; Tue, 20 Dec 2011 12:37:28 -0800 (PST) Received: by 10.205.141.78 with SMTP id jd14mr1386417bkc.107.1324413447760; Tue, 20 Dec 2011 12:37:27 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs22026bkc; Tue, 20 Dec 2011 12:37:27 -0800 (PST) Received: by 10.52.70.167 with SMTP id n7mr2292924vdu.67.1324413445544; Tue, 20 Dec 2011 12:37:25 -0800 (PST) Received: from stoneboat.aleph1.co.uk (stoneboat.aleph1.co.uk. [80.68.88.63]) by mx.google.com with ESMTPS id jk5si1655973vdb.104.2011.12.20.12.37.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Dec 2011 12:37:25 -0800 (PST) Received-SPF: neutral (google.com: 80.68.88.63 is neither permitted nor denied by best guess record for domain of wookey@wookware.org) client-ip=80.68.88.63; Authentication-Results: mx.google.com; spf=neutral (google.com: 80.68.88.63 is neither permitted nor denied by best guess record for domain of wookey@wookware.org) smtp.mail=wookey@wookware.org Received: from cpc5-cmbg4-0-0-cust802.5-4.cable.virginmedia.com ([86.14.235.35] helo=kh.home.wookware.org) by stoneboat.aleph1.co.uk with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Rd6R6-0006BA-Lq; Tue, 20 Dec 2011 20:37:23 +0000 Received: from wookey by kh.home.wookware.org with local (Exim 4.77) (envelope-from ) id 1Rd6R5-00010j-A7; Tue, 20 Dec 2011 20:37:19 +0000 From: wookey@wookware.org To: buildd-tools-devel@lists.alioth.debian.org Cc: patches@linaro.org, Wookey Date: Tue, 20 Dec 2011 20:37:03 +0000 Message-Id: <1324413424-3849-1-git-send-email-wookey@wookware.org> X-Mailer: git-send-email 1.7.7.3 X-SA-Exim-Connect-IP: 86.14.235.35 X-SA-Exim-Mail-From: wookey@wookware.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on stoneboat.aleph1.co.uk X-Spam-Level: X-Spam-Status: No, score=-2.8 required=4.5 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=no version=3.3.1 Subject: [PATCH 1/2] Set up env vars for cross-building X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:51:10 +0000) X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk) From: Wookey --- lib/Sbuild/Build.pm | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm index 05473ec..ccc4d04 100644 --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -1467,6 +1467,17 @@ sub build { $buildenv{'PATH'} = $self->get_conf('PATH'); $buildenv{'LD_LIBRARY_PATH'} = $self->get_conf('LD_LIBRARY_PATH') if defined($self->get_conf('LD_LIBRARY_PATH')); + + #Add cross environment config + if ($host_arch ne $build_arch) { + $buildenv{'CONFIG_SITE'} = "/etc/dpkg-cross/cross-config." . $host_arch; + if (defined($buildenv{'DEB_BUILD_OPTIONS'})) { + $buildenv{'DEB_BUILD_OPTIONS'} .= " nocheck"; + } else { + $buildenv{'DEB_BUILD_OPTIONS'} = "nocheck"; + } + } + # Explicitly add any needed environment to the environment filter # temporarily for dpkg-buildpackage.