From patchwork Wed Jul 18 13:59:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francois Perrad X-Patchwork-Id: 171679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 605882C0201 for ; Wed, 18 Jul 2012 23:59:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2E24E8F4DB; Wed, 18 Jul 2012 13:59:43 +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 5nVfLlvtZeRC; Wed, 18 Jul 2012 13:59:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DC31F8F6E6; Wed, 18 Jul 2012 13:59:35 +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 966088F75B for ; Wed, 18 Jul 2012 13:59:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 738BF8F4A1 for ; Wed, 18 Jul 2012 13:59:33 +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 D-n8f4dj4wIQ for ; Wed, 18 Jul 2012 13:59:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id CB01F8F0D9 for ; Wed, 18 Jul 2012 13:59:31 +0000 (UTC) Received: by weyx43 with SMTP id x43so1958905wey.16 for ; Wed, 18 Jul 2012 06:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=q39KKDk4CwqAkNbkW/2kI5iKG4tcIXmNy2HM1/ZGMpo=; b=njRtBeSd+IYWvoyBxvwFvSseMqE5v1heKHkeXDt1C51l33MCNiJJ2ZYJ4/zjtefv3s qpT6PdYoJK2j6IE2lXsha4cSnWMQX+TafrdeXnmPPiqUP65v+D7ReRkmQXLpGup/JqXK MSg45OSuErq66Y1nWSj/N6ZtstvT/pjc3xXTLihHomxlL7jinTTQLcRc9AUtrltABk2Y X86trq7s/KcIgiMctGiRL7QEcyBBM3oV5MaveB9yC1j+6db6YIG8r8Av8eABBlHBDs5y SND/t7WRtBw1kfKkiB4R0NlnTv4x60qjfiIFNUU0sYwCpxTyXHm+tIQfK5ovcQt2OnhR JALg== Received: by 10.216.134.12 with SMTP id r12mr534537wei.164.1342619969803; Wed, 18 Jul 2012 06:59:29 -0700 (PDT) Received: from xubuntu-12.04 (36.167.22.93.rev.sfr.net. [93.22.167.36]) by mx.google.com with ESMTPS id ex20sm42681169wid.7.2012.07.18.06.59.27 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jul 2012 06:59:28 -0700 (PDT) From: Francois Perrad To: buildroot@busybox.net Date: Wed, 18 Jul 2012 15:59:09 +0200 Message-Id: <1342619953-15512-1-git-send-email-francois.perrad@gadz.org> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH 1/4] 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(+) diff --git a/Config.in b/Config.in index 925c247..c182f70 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 d55b136..639fdaa 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: