mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 06/11] tools build: Add HOSTARCH Makefile variable
Date: Mon, 25 Jul 2016 12:57:53 -0300	[thread overview]
Message-ID: <1469462278-31556-7-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1469462278-31556-1-git-send-email-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

For tools that needs to be always compiled with the host headers.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-907q32k2nep6q670dkxypmu6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/scripts/Makefile.arch | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
index e11fbd6fae78..887321ce5827 100644
--- a/tools/scripts/Makefile.arch
+++ b/tools/scripts/Makefile.arch
@@ -1,14 +1,13 @@
-ifndef ARCH
-ARCH := $(shell uname -m 2>/dev/null || echo not)
-endif
-
-ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
+HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
                                   -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
                                   -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
                                   -e s/s390x/s390/ -e s/parisc64/parisc/ \
                                   -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
                                   -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
                                   -e s/tile.*/tile/ )
+ifndef ARCH
+ARCH := $(HOSTARCH)
+endif
 
 LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
 ifeq ($(LP64), 1)
-- 
2.7.4

  parent reply	other threads:[~2016-07-25 15:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25 15:57 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 01/11] x86/insn: perf tools: Fix vcvtph2ps instruction decoding Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 02/11] x86/insn: Add AVX-512 support to the instruction decoder Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 03/11] perf tools: Add AVX-512 support to the instruction decoder used by Intel PT Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 04/11] perf tools: Add AVX-512 instructions to the new instructions test Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 05/11] perf tests kmod-path: Fix build on ubuntu:16.04-x-armhf Arnaldo Carvalho de Melo
2016-07-25 15:57 ` Arnaldo Carvalho de Melo [this message]
2016-07-25 15:57 ` [PATCH 07/11] objtool: Use tools/scripts/Makefile.arch to get ARCH and HOSTARCH Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 08/11] objtool: Always use host headers Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 09/11] tools build: Fix objtool build with ARCH=x86_64 Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 10/11] x86: Make the vdso2c compiler use the host architecture headers Arnaldo Carvalho de Melo
2016-07-25 15:57 ` [PATCH 11/11] Revert "perf tools: event.h needs asm/perf_regs.h" Arnaldo Carvalho de Melo
2016-07-25 17:49 ` [GIT PULL 00/11] perf/core improvements and fixes Ingo Molnar

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=1469462278-31556-7-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=wangnan0@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome