Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1443984 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2016-07-15 09:10 +0200 |
| Last post | 2016-07-16 22:50 +0200 |
| Articles | 3 on this page of 43 — 11 participants |
Back to article view | Back to linux.kernel
linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-15 09:10 +0200
Re: linux-next: build failure after merge of the luto-misc tree Peter Zijlstra <peterz@infradead.org> - 2016-07-15 09:30 +0200
Re: linux-next: build failure after merge of the luto-misc tree Peter Zijlstra <peterz@infradead.org> - 2016-07-15 09:40 +0200
Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-07-15 17:10 +0200
Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-07-15 17:30 +0200
Re: linux-next: build failure after merge of the luto-misc tree Peter Zijlstra <peterz@infradead.org> - 2016-07-15 17:30 +0200
Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-07-15 18:00 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Peter Zijlstra <peterz@infradead.org> - 2016-07-15 17:50 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-07-15 18:30 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree "H. Peter Anvin" <hpa@zytor.com> - 2016-07-15 22:30 +0200
[PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-07-15 17:50 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-18 07:20 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Andy Lutomirski <luto@amacapital.net> - 2016-07-18 22:10 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-18 22:40 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-19 00:30 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-19 01:50 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-19 02:30 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-19 02:40 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-19 05:30 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-19 15:00 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-19 19:50 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-20 01:30 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-20 02:00 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Andy Lutomirski <luto@amacapital.net> - 2016-07-20 05:00 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-07-20 05:10 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-20 05:20 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-20 05:00 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-21 01:40 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-21 15:20 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-22 01:30 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Josh Poimboeuf <jpoimboe@redhat.com> - 2016-07-22 05:50 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-22 16:40 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Josh Poimboeuf <jpoimboe@redhat.com> - 2016-07-22 21:20 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-22 21:40 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Josh Poimboeuf <jpoimboe@redhat.com> - 2016-07-22 21:50 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-22 22:00 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-07-23 07:10 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Andy Lutomirski <luto@amacapital.net> - 2016-07-24 20:50 +0200
Re: [PATCH/RFC] Re: linux-next: build failure after merge of the luto-misc tree Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-07-25 15:00 +0200
[tip:perf/core] x86: Make the vdso2c compiler use the host architecture headers tip-bot for Stephen Rothwell <tipbot@zytor.com> - 2016-07-25 20:20 +0200
[tip:perf/core] tools build: Fix objtool build with ARCH=x86_64 tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2016-07-25 20:20 +0200
[tip:perf/core] objtool: Always use host headers tip-bot for Arnaldo Carvalho de Melo <tipbot@zytor.com> - 2016-07-25 20:20 +0200
[tip:perf/core] tools: Simplify BITS_PER_LONG define tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2016-07-16 22:50 +0200
Page 3 of 3 — ← Prev page 1 2 [3]
| From | tip-bot for Josh Poimboeuf <tipbot@zytor.com> |
|---|---|
| Date | 2016-07-25 20:20 +0200 |
| Subject | [tip:perf/core] tools build: Fix objtool build with ARCH=x86_64 |
| Message-ID | <rYSDV-7Sa-35@gated-at.bofh.it> |
| In reply to | #1448728 |
Commit-ID: 60cbdf5d051d4f4db23d267d511ca241d4be7c0d
Gitweb: http://git.kernel.org/tip/60cbdf5d051d4f4db23d267d511ca241d4be7c0d
Author: Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Fri, 22 Jul 2016 14:19:20 -0500
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 22 Jul 2016 16:37:44 -0300
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":
tools/objtool/objtool-in.o: In function `decode_instructions':
tools/objtool/builtin-check.c:276: undefined reference to `arch_decode_instruction'
We could override the ARCH environment variable and change it back to
x86, similar to what the objtool Makefile was doing before; but it's
tricky to override environment variables consistently.
Instead, take a similar approach used by the Linux top-level Makefile
and introduce a SRCARCH Makefile variable which evaluates to "x86" when
ARCH is either "x86_64" or "x86".
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160722191920.ej62fnspnqurbaa7@treble
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/objtool/Build | 2 +-
tools/objtool/Makefile | 2 +-
tools/scripts/Makefile.arch | 32 ++++++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/tools/objtool/Build b/tools/objtool/Build
index 2457916..d6cdece 100644
--- a/tools/objtool/Build
+++ b/tools/objtool/Build
@@ -1,4 +1,4 @@
-objtool-y += arch/$(ARCH)/
+objtool-y += arch/$(SRCARCH)/
objtool-y += builtin-check.o
objtool-y += elf.o
objtool-y += special.o
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 91b5f98..0b43770 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -33,7 +33,7 @@ elfshdr := $(shell echo '\#include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | gre
CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
AWK = awk
-export srctree OUTPUT CFLAGS ARCH AWK
+export srctree OUTPUT CFLAGS SRCARCH AWK
include $(srctree)/tools/build/Makefile.include
$(OBJTOOL_IN): fixdep FORCE
diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
index 887321c..ad85b92 100644
--- a/tools/scripts/Makefile.arch
+++ b/tools/scripts/Makefile.arch
@@ -5,10 +5,42 @@ HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
-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
+SRCARCH := $(ARCH)
+
+# Additional ARCH settings for x86
+ifeq ($(ARCH),i386)
+ SRCARCH := x86
+endif
+ifeq ($(ARCH),x86_64)
+ SRCARCH := x86
+endif
+
+# Additional ARCH settings for sparc
+ifeq ($(ARCH),sparc32)
+ SRCARCH := sparc
+endif
+ifeq ($(ARCH),sparc64)
+ SRCARCH := sparc
+endif
+
+# Additional ARCH settings for sh
+ifeq ($(ARCH),sh64)
+ SRCARCH := sh
+endif
+
+# Additional ARCH settings for tile
+ifeq ($(ARCH),tilepro)
+ SRCARCH := tile
+endif
+ifeq ($(ARCH),tilegx)
+ SRCARCH := tile
+endif
+
LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
ifeq ($(LP64), 1)
IS_64_BIT := 1
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Arnaldo Carvalho de Melo <tipbot@zytor.com> |
|---|---|
| Date | 2016-07-25 20:20 +0200 |
| Subject | [tip:perf/core] objtool: Always use host headers |
| Message-ID | <rYSDV-7Sa-33@gated-at.bofh.it> |
| In reply to | #1448364 |
Commit-ID: 0cf6eb603b83ea386f26363b5b12e64297822bb1 Gitweb: http://git.kernel.org/tip/0cf6eb603b83ea386f26363b5b12e64297822bb1 Author: Arnaldo Carvalho de Melo <acme@redhat.com> AuthorDate: Fri, 22 Jul 2016 16:28:46 -0300 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Fri, 22 Jul 2016 16:28:46 -0300 objtool: Always use host headers From a conversation with Josh: From http://lkml.kernel.org/r/20160722034118.guckaniobf3f7czc@treble : It needs to be compiled with the host (powerpc) compiler, but then it needs to disassemble target (x86) files. ---- So use HOSTARCH instead of ARCH. 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/r/20160722034118.guckaniobf3f7czc@treble Link: http://lkml.kernel.org/n/tip-le1m1yzxnfpt3msbblu40nm8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/objtool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index 988129c..91b5f98 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile @@ -24,7 +24,7 @@ OBJTOOL_IN := $(OBJTOOL)-in.o all: $(OBJTOOL) -INCLUDES := -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(ARCH)/include/uapi +INCLUDES := -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi CFLAGS += -Wall -Werror $(EXTRA_WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES) LDFLAGS += -lelf $(LIBSUBCMD)
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Peter Zijlstra <tipbot@zytor.com> |
|---|---|
| Date | 2016-07-16 22:50 +0200 |
| Subject | [tip:perf/core] tools: Simplify BITS_PER_LONG define |
| Message-ID | <rVEH7-8rP-3@gated-at.bofh.it> |
| In reply to | #1443991 |
Commit-ID: e81fcd43723d32e9c9dbb8e8d66f147b5b84256b Gitweb: http://git.kernel.org/tip/e81fcd43723d32e9c9dbb8e8d66f147b5b84256b Author: Peter Zijlstra <peterz@infradead.org> AuthorDate: Fri, 15 Jul 2016 12:38:18 -0300 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Fri, 15 Jul 2016 17:26:41 -0300 tools: Simplify BITS_PER_LONG define Do it using (__CHAR_BIT__ * __SIZEOF_LONG__), simpler, works everywhere, reduces the complexity by ditching CONFIG_64BIT, that was being synthesized from yet another set of defines, which proved fragile, breaking the build on linux-next for no obvious reasons. Committer Note: Except on: gcc version 4.1.2 20080704 (Red Hat 4.1.2-55) Fallback to __WORDSIZE in that case... Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20160715072243.GP30154@twins.programming.kicks-ass.net Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/include/asm-generic/bitsperlong.h | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tools/include/asm-generic/bitsperlong.h b/tools/include/asm-generic/bitsperlong.h index cfd661c..45eca51 100644 --- a/tools/include/asm-generic/bitsperlong.h +++ b/tools/include/asm-generic/bitsperlong.h @@ -3,31 +3,12 @@ #include <uapi/asm-generic/bitsperlong.h> -/* - * In the kernel, where this file comes from, we can rely on CONFIG_64BIT, - * here we have to make amends with what the various compilers provides us - * to figure out if we're on a 64-bit machine... - */ #ifdef __SIZEOF_LONG__ -# if __SIZEOF_LONG__ == 8 -# define CONFIG_64BIT -# endif +#define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) #else -# ifdef __WORDSIZE -# if __WORDSIZE == 64 -# define CONFIG_64BIT -# endif -# else -# error Failed to determine BITS_PER_LONG value -# endif +#define BITS_PER_LONG __WORDSIZE #endif -#ifdef CONFIG_64BIT -#define BITS_PER_LONG 64 -#else -#define BITS_PER_LONG 32 -#endif /* CONFIG_64BIT */ - #if BITS_PER_LONG != __BITS_PER_LONG #error Inconsistent word size. Check asm/bitsperlong.h #endif
[toc] | [prev] | [standalone]
Page 3 of 3 — ← Prev page 1 2 [3]
Back to top | Article view | linux.kernel
csiph-web