Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614912 > unrolled thread

[PATCH v2 0/1] fix perf build issue when ARCH=x86_64

Started by<jiada_wang@mentor.com>
First post2017-04-03 08:50 +0200
Last post2017-04-04 16:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/1] fix perf build issue when ARCH=x86_64 <jiada_wang@mentor.com> - 2017-04-03 08:50 +0200
    [PATCH v2 1/1] tools build: transform ARCH to supported values <jiada_wang@mentor.com> - 2017-04-03 08:50 +0200
      Re: [PATCH v2 1/1] tools build: transform ARCH to supported values Arnaldo Carvalho de Melo <acme@redhat.com> - 2017-04-04 16:00 +0200

#1614912 — [PATCH v2 0/1] fix perf build issue when ARCH=x86_64

From<jiada_wang@mentor.com>
Date2017-04-03 08:50 +0200
Subject[PATCH v2 0/1] fix perf build issue when ARCH=x86_64
Message-ID<ts3Ym-3kh-13@gated-at.bofh.it>
From: Jiada Wang <jiada_wang@mentor.com>


Jiada Wang (1):
  tools build: transform ARCH to supported values

Changes from v2:
 added function purify-arch, transforms both HOSTARCH and ARCH
 to supported values

 tools/scripts/Makefile.arch |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
1.7.9.5

[toc] | [next] | [standalone]


#1614913 — [PATCH v2 1/1] tools build: transform ARCH to supported values

From<jiada_wang@mentor.com>
Date2017-04-03 08:50 +0200
Subject[PATCH v2 1/1] tools build: transform ARCH to supported values
Message-ID<ts3Ym-3kh-15@gated-at.bofh.it>
In reply to#1614912
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

[toc] | [prev] | [next] | [standalone]


#1616053 — Re: [PATCH v2 1/1] tools build: transform ARCH to supported values

FromArnaldo Carvalho de Melo <acme@redhat.com>
Date2017-04-04 16:00 +0200
SubjectRe: [PATCH v2 1/1] tools build: transform ARCH to supported values
Message-ID<tsxa3-5BM-33@gated-at.bofh.it>
In reply to#1614913
Em Sun, Apr 02, 2017 at 11:41:59PM -0700, jiada_wang@mentor.com escreveu:
> 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.

Humm, why not use what the kernel proper uses
6752ed90da032af72f2f1fa23d1abf0889b56db0), and that objtool adopted in:

commit 60cbdf5d051d4f4db23d267d511ca241d4be7c0d
Author: Josh Poimboeuf <jpoimboe@redhat.com>
Date:   Fri Jul 22 14:19:20 2016 -0500

    tools build: Fix objtool build with ARCH=x86_64
    
    The objtool build fails in a cross-compiled environment on a non-x86
    host with "ARCH=x86_64":

- Arnaldo
 
> 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
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web