On Tue, 2020-07-28 at 23:12 +0200, Ilya Leoshkevich wrote: > On Tue, 2020-07-28 at 13:48 -0700, Song Liu wrote: > > On Tue, Jul 28, 2020 at 5:15 AM Ilya Leoshkevich <iii@xxxxxxxxxxxxx > > > > > wrote: > > > Building BPF samples out of srctree fails, because the output > > > directory > > > for progs shared with selftests (CGROUP_HELPERS, TRACE_HELPERS) > > > is > > > missing and the compiler cannot create output files. > > > > > > Fix by creating the output directory in Makefile. > > > > What is the make command line we use here? I am trying: > > > > make M=samples/bpf O=./xxx > > > > w/o this patch, make created ./xxx/samples/bpf. > > > > Did I miss something? > > I'm using > > make O=$HOME/linux-build 'CC=ccache gcc' M=samples/bpf -j12 > > My make version is GNU Make 4.2.1. Hmm, I wanted to elaborate a little bit more on why this fix should work, and realized that it works only by accident: cgroup_helpers and trace_helpers are userspace code, and my fix modifies the recipe for building bpf programs. Please disregard this patch - I will have to come up with a better fix.