objtool: Always use host headers
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 22 Jul 2016 19:28:46 +0000 (16:28 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 22 Jul 2016 19:28:46 +0000 (16:28 -0300)
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

index 988129cb77269da8655e70f21eb79f7e275e76d7..91b5f986d335b80ce0d36da94b42d33d9e9f9e92 100644 (file)
@@ -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)