All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Perrad <fperrad@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/4] add host arch detection and Kconfig BR2_HOSTARCH
Date: Wed, 18 Jul 2012 15:59:09 +0200	[thread overview]
Message-ID: <1342619953-15512-1-git-send-email-francois.perrad@gadz.org> (raw)

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 <plagnioj@jcrosoft.com>
---
 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:
 
-- 
1.7.9.5

             reply	other threads:[~2012-07-18 13:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 13:59 Francois Perrad [this message]
2012-07-18 13:59 ` [Buildroot] [PATCH 2/4] luajit: new package Francois Perrad
2012-07-18 13:59 ` [Buildroot] [PATCH 3/4] luajit: fix dependencies of Lua modules Francois Perrad
2012-07-18 13:59 ` [Buildroot] [PATCH 4/4] lua: refactor without sed Francois Perrad
2012-07-18 17:37 ` [Buildroot] [PATCH 1/4] add host arch detection and Kconfig BR2_HOSTARCH Thomas Petazzoni
2012-07-19 12:48   ` François Perrad
2012-07-19 13:03     ` Thomas Petazzoni
2012-07-20 11:40       ` [Buildroot] [UNSURE]Re: " François Perrad
2012-07-20 12:14         ` Thomas Petazzoni
2012-07-20 18:24           ` François Perrad
2012-07-20 18:41             ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342619953-15512-1-git-send-email-francois.perrad@gadz.org \
    --to=fperrad@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.