netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* resolve_btfids breaks kernel cross-compilation
@ 2020-09-16 19:47 Seth Forshee
  2020-09-17  8:04 ` Jiri Olsa
  0 siblings, 1 reply; 8+ messages in thread
From: Seth Forshee @ 2020-09-16 19:47 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Alexei Starovoitov, Daniel Borkmann, netdev, bpf, linux-kernel

The requirement to build resolve_btfids whenever CONFIG_DEBUG_INFO_BTF
is enabled breaks some cross builds. For example, when building a 64-bit
powerpc kernel on amd64 I get:

 Auto-detecting system features:
 ...                        libelf: [ [32mon[m  ]
 ...                          zlib: [ [32mon[m  ]
 ...                           bpf: [ [31mOFF[m ]
 
 BPF API too old
 make[6]: *** [Makefile:295: bpfdep] Error 1

The contents of tools/bpf/resolve_btfids/feature/test-bpf.make.output:

 In file included from /home/sforshee/src/u-k/unstable/tools/arch/powerpc/include/uapi/asm/bitsperlong.h:11,
                  from /usr/include/asm-generic/int-ll64.h:12,
                  from /usr/include/asm-generic/types.h:7,
                  from /usr/include/x86_64-linux-gnu/asm/types.h:1,
                  from /home/sforshee/src/u-k/unstable/tools/include/linux/types.h:10,
                  from /home/sforshee/src/u-k/unstable/tools/include/uapi/linux/bpf.h:11,
                  from test-bpf.c:3:
 /home/sforshee/src/u-k/unstable/tools/include/asm-generic/bitsperlong.h:14:2: error: #error Inconsistent word size. Check asm/bitsperlong.h
    14 | #error Inconsistent word size. Check asm/bitsperlong.h
       |  ^~~~~

This is because tools/arch/powerpc/include/uapi/asm/bitsperlong.h sets
__BITS_PER_LONG based on the predefinied compiler macro __powerpc64__,
which is not defined by the host compiler. What can we do to get cross
builds working again?

Thanks,
Seth

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-18 18:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16 19:47 resolve_btfids breaks kernel cross-compilation Seth Forshee
2020-09-17  8:04 ` Jiri Olsa
2020-09-17  8:38   ` Jiri Olsa
2020-09-17  9:14     ` Jiri Olsa
2020-09-17  9:54       ` Jiri Olsa
2020-09-17 12:54       ` Seth Forshee
2020-09-18 10:05         ` Jiri Olsa
2020-09-18 18:50           ` Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).