From patchwork Fri Apr 26 16:40:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 10919403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53B76912 for ; Fri, 26 Apr 2019 16:43:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4368128DEB for ; Fri, 26 Apr 2019 16:43:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37BB128E04; Fri, 26 Apr 2019 16:43:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CCF0A28DEB for ; Fri, 26 Apr 2019 16:43:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hK3v1-0008RJ-AD; Fri, 26 Apr 2019 16:41:47 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hK3uz-0008Pa-Up for xen-devel@lists.xenproject.org; Fri, 26 Apr 2019 16:41:45 +0000 X-Inumbo-ID: 2bdee566-6842-11e9-916f-1b696d25bbd7 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2bdee566-6842-11e9-916f-1b696d25bbd7; Fri, 26 Apr 2019 16:41:42 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,398,1549929600"; d="scan'208";a="84519759" From: Ian Jackson To: Date: Fri, 26 Apr 2019 17:40:00 +0100 Message-ID: <20190426164002.22381-14-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190426164002.22381-1-ian.jackson@eu.citrix.com> References: <20190426164002.22381-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 13/15] cross builds: mfi-common: Prepare for kernel cross building X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Introduce job_create_build_crossable, which takes a target->host architecture map in its arguments, and use it for build-kern, passing an empty architecture map. Overall functional change is only to add host_arch=$arch to the kernel build jobs, which has no ultimate effect because it's the same as the arch=$arch. (Difference in flight construction verified with standalone-generate-dump-flight-runvars.) Signed-off-by: Ian Jackson --- mfi-common | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/mfi-common b/mfi-common index dad03e39..7b5c894f 100644 --- a/mfi-common +++ b/mfi-common @@ -216,6 +216,32 @@ create_xen_build_job () { $extra_runvars } +job_create_build_crossable () { + # job_create_build_crossable \ + # JOBNAME RECIPE ARCH \ + # [TARGARCH1 HOSTARCH1 [TARGARCH2 HOSTARCH2 ...]]] - \ + # [RUNVAR1 [RUNVAR2 ...]] + local name=$1; shift + local recipe=$1; shift + local arch=$1; shift + local match_arch=$arch + local host_arch=$arch + while true; do + local t_targarch=$1; shift; if [ x$t_targarch = x- ]; then break; fi + local t_hostarch=$1; shift + if [ x$match_arch = x$t_targarch ]; then + host_arch=$t_hostarch + match_arch=X # prevents us mapping again, which would be a bit mad + fi + done + local build_hostflags + set_build_hostflags $host_arch + job_create_build $name $recipe \ + arch=$arch host_arch=$host_arch \ + host_hostflags=$build_hostflags \ + "$@" +} + set_build_hostflags () { # set_build_hostflags HOST_ARCH build_hostflags="share-build-$suite-$1,arch-$1,suite-$suite,purpose-build" @@ -397,11 +423,11 @@ create_build_jobs () { revision_qemuu=$REVISION_QEMU_UPSTREAM fi - job_create_build build-$arch-pvops build-kern \ - arch=$arch kconfighow=xen-enable-xen-config \ + job_create_build_crossable build-$arch-pvops build-kern $arch \ + - \ + kconfighow=xen-enable-xen-config \ $RUNVARS $BUILD_RUNVARS $BUILD_LINUX_RUNVARS $arch_runvars \ $hostos_runvars \ - host_hostflags=$build_hostflags \ $pvops_kernel $pvops_kconfig_overrides \ ${TREEVCS_LINUX:+treevcs_linux=}${TREEVCS_LINUX} \ tree_linuxfirmware=$TREE_LINUXFIRMWARE \