diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2016-07-22 22:19:20 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-22 22:37:44 +0300 |
commit | 60cbdf5d051d4f4db23d267d511ca241d4be7c0d (patch) | |
tree | 9efe572143b47a35cee1fe8bf0d20188d88c7237 /tools/objtool/Build | |
parent | 0cf6eb603b83ea386f26363b5b12e64297822bb1 (diff) | |
download | linux-60cbdf5d051d4f4db23d267d511ca241d4be7c0d.tar.xz |
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>
Diffstat (limited to 'tools/objtool/Build')
-rw-r--r-- | tools/objtool/Build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/Build b/tools/objtool/Build index 2457916a3943..d6cdece5e58b 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 |