bpf: Fix cross build for CONFIG_DEBUG_INFO_BTF option
authorJiri Olsa <jolsa@kernel.org>
Tue, 14 Jul 2020 10:25:34 +0000 (12:25 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 14 Jul 2020 17:20:31 +0000 (10:20 -0700)
commit11bb2f7a45909f4f64afe471875672ae1b84a380
treecef1bd07a1a9a88e3cf568ef9d676a458e30a765
parent079ef53673f2e3b3ee1728800311f20f28eed4f7
bpf: Fix cross build for CONFIG_DEBUG_INFO_BTF option

Stephen and 0-DAY CI Kernel Test Service reported broken cross build
for arm (arm-linux-gnueabi-gcc (GCC) 9.3.0), with following output:

   /tmp/ccMS5uth.s: Assembler messages:
   /tmp/ccMS5uth.s:69: Error: unrecognized symbol type ""
   /tmp/ccMS5uth.s:82: Error: unrecognized symbol type ""

Having '@object' for .type  diretive is  wrong because '@' is comment
character for some architectures. Using STT_OBJECT instead that should
work everywhere.

Also using HOST* variables to build resolve_btfids so it's properly
build in crossbuilds (stolen from objtool's Makefile).

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/bpf/20200714102534.299280-2-jolsa@kernel.org
include/linux/btf_ids.h
tools/bpf/resolve_btfids/Makefile