From patchwork Tue Apr 17 15:05:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe PLAGNIOL-VILLARD X-Patchwork-Id: 153235 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 90F0FB6FD8 for ; Wed, 18 Apr 2012 01:24:31 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 831DEFFD00; Tue, 17 Apr 2012 15:24:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fRir-Sdz-sFm; Tue, 17 Apr 2012 15:24:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id AEF7B101708; Tue, 17 Apr 2012 15:24:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2C19D8F75B for ; Tue, 17 Apr 2012 15:24:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C1B3A88287 for ; Tue, 17 Apr 2012 15:24:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SGFwcFQMACju for ; Tue, 17 Apr 2012 15:24:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mo3.mail-out.ovh.net (5.mo3.mail-out.ovh.net [87.98.178.36]) by whitealder.osuosl.org (Postfix) with ESMTP id B97B08692B for ; Tue, 17 Apr 2012 15:24:12 +0000 (UTC) Received: from mail622.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo3.mail-out.ovh.net (Postfix) with SMTP id F1ECFFF8F60 for ; Tue, 17 Apr 2012 17:25:28 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 17 Apr 2012 17:24:03 +0200 Received: from ns32433.ovh.net (HELO localhost) (plagnioj%jcrosoft.com@213.251.161.87) by ns0.ovh.net with SMTP; 17 Apr 2012 17:24:02 +0200 From: Jean-Christophe PLAGNIOL-VILLARD To: buildroot@busybox.net X-Ovh-Mailout: 178.32.228.3 (mo3.mail-out.ovh.net) Date: Tue, 17 Apr 2012 17:05:39 +0200 Message-Id: <1334675140-20303-1-git-send-email-plagnioj@jcrosoft.com> X-Mailer: git-send-email 1.7.2.3 X-Ovh-Tracer-Id: 10021072121688402902 X-Ovh-Remote: 213.251.161.87 (ns32433.ovh.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeegtddrtdefucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfhrhhomheplfgvrghnqdevhhhrihhsthhophhhvgcurffntefipffkqffnqdggkffnnfettfffuceophhlrghgnhhiohhjsehjtghrohhsohhfthdrtghomheqnecujfgurhephffvufffkffosedttdertdertddt X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeegfedrfeefucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfhrhhomheplfgvrghnqdevhhhrihhsthhophhhvgcurffntefipffkqffnqdggkffnnfettfffuceophhlrghgnhhiohhjsehjtghrohhsohhfthdrtghomheqnecujfgurhephffvufffkffosedttdertdertddt Subject: [Buildroot] [PATCH 1/2] add host arch detection and Kconfig (BR2_HOSTARCH) X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This will allow to install binary package only if they are supported by the host. As example Atmel SAM-BA (x86 only). Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- Config.in | 4 ++++ Makefile | 10 ++++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/Config.in b/Config.in index 68abb9b..be424b7 100644 --- a/Config.in +++ b/Config.in @@ -10,6 +10,10 @@ config BR2_VERSION string option env="BR2_VERSION_FULL" +config BR2_HOSTARCH + string + option env="HOSTARCH" + source "target/Config.in.arch" menu "Build options" diff --git a/Makefile b/Makefile index 3a09417..b14940b 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,16 @@ ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSI $(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required) endif +export HOSTARCH := $(shell uname -m | \ + sed -e s/i.86/x86/ \ + -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ \ + -e s/sa110/arm/ \ + -e s/ppc64/powerpc/ \ + -e s/ppc/powerpc/ \ + -e s/macppc/powerpc/\ + -e s/sh.*/sh/) + # This top-level Makefile can *not* be executed in parallel .NOTPARALLEL: