From patchwork Sun Sep 30 23:20:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 1529331 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BCA353FE80 for ; Sun, 30 Sep 2012 23:50:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751705Ab2I3XuE (ORCPT ); Sun, 30 Sep 2012 19:50:04 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:52338 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751553Ab2I3XtX (ORCPT ); Sun, 30 Sep 2012 19:49:23 -0400 X-Greylist: delayed 1755 seconds by postgrey-1.27 at vger.kernel.org; Sun, 30 Sep 2012 19:49:23 EDT DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date; bh=o2yfbs6PN6DJImuvA8lAsX/GDhVMlJTXq5RGU9ziIG4=; b=Yy4oDfBaQbbbCs24+oUxuOd0ovu8ANDa1Z00CcxduR4T8C7J10auxtAKRG++NeC9GqafFfA+zeB2fgb/G6PTasQz4uh+ZEDHoWSganirnIZ2BBkFGPosvOAktUmj/Ec2z4rqNFzlsSHgwh+04l+AaD4TBteQE+GVDdJ1DiVxRfI=; Received: from jgg by quartz.orcorp.ca with local (Exim 4.72) (envelope-from ) id 1TISnt-00081u-RM; Sun, 30 Sep 2012 17:20:05 -0600 Date: Sun, 30 Sep 2012 17:20:05 -0600 From: Jason Gunthorpe To: linux-kbuild@vger.kernel.org Cc: Michal Marek Subject: [PATCH] [KBUILD] Put the CROSS_COMPILE and ARCH variables in the build directory makefile Message-ID: <20120930232005.GB30637@obsidianresearch.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org To make cross building a little simpler. The usage with mini-config would be something like: $ mkdir build $ make ARCH=arm CROSS_COMPILE=arm-v5te-linux-gnueabi- \ KCONFIG_ALLCONFIG=mini.config O=build allnoconfig $ make -C build/ After configuring subsequent builds do not need to specify the cross options. Signed-off-by: Jason Gunthorpe --- scripts/mkmakefile | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 0cc0442..7cdc3fb 100644 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile @@ -56,4 +56,9 @@ Makefile:; %/: all @: + +CROSS_COMPILE?=${CROSS_COMPILE:-} +${CROSS_COMPILE:+export CROSS_COMPILE} +ARCH?=${ARCH:-} +${ARCH:+export ARCH} EOF