mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <jiada_wang@mentor.com>
To: <acme@redhat.com>, <jpoimboe@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <jiada_wang@mentor.com>,
	<erosca@de.adit-jv.com>
Subject: [PATCH v2 1/1] tools build: transform ARCH to supported values
Date: Sun, 2 Apr 2017 23:41:59 -0700	[thread overview]
Message-ID: <1491201719-3532-2-git-send-email-jiada_wang@mentor.com> (raw)
In-Reply-To: <1491201719-3532-1-git-send-email-jiada_wang@mentor.com>

From: Jiada Wang <jiada_wang@mentor.com>

with commit: 0a943cb10ce7 (tools build: Add HOSTARCH Makefile variable)
the following build failure is seen with ARCH=x86_84

In file included from util/event.c:2:0:
tools/include/uapi/linux/mman.h:4:27: fatal error: uapi/asm/mman.h: No such file or directory
compilation terminated.

This patch by evaluate ARCH to supported values just as the behavior before
above mentioned patch to fix the issue.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
---
 tools/scripts/Makefile.arch |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
index ad85b92..41cfc56 100644
--- a/tools/scripts/Makefile.arch
+++ b/tools/scripts/Makefile.arch
@@ -1,4 +1,4 @@
-HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
+purify-arch = $(shell echo $1 | 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/ \
@@ -6,8 +6,12 @@ HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
                                   -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
                                   -e s/tile.*/tile/ )
 
+HOSTARCH := $(call purify-arch,$(shell uname -m))
+
 ifndef ARCH
 ARCH := $(HOSTARCH)
+else
+ARCH := $(call purify-arch,$(ARCH))
 endif
 
 SRCARCH := $(ARCH)
-- 
1.7.9.5

  reply	other threads:[~2017-04-03  6:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03  6:41 [PATCH v2 0/1] fix perf build issue when ARCH=x86_64 jiada_wang
2017-04-03  6:41 ` jiada_wang [this message]
2017-04-04 13:58   ` [PATCH v2 1/1] tools build: transform ARCH to supported values Arnaldo Carvalho de Melo

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=1491201719-3532-2-git-send-email-jiada_wang@mentor.com \
    --to=jiada_wang@mentor.com \
    --cc=acme@redhat.com \
    --cc=erosca@de.adit-jv.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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