Re: [PATCH 5/8] selftests/bpf: add output dir to include list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 21, 2020 at 9:14 PM Yauheni Kaliuta
<yauheni.kaliuta@xxxxxxxxxx> wrote:
>
> Some headers (skel) are generated in the output directory and used
> for build (test_cpp.cpp), so add it to the list (as well as
> CURDIR) otherwise out of tree build is broken.
>

So this is needed only for test_cpp, right? Because test_prog's tests
are built with a special rule changing their workdir to the one that
contains proper skeleton. Let's just add -I$(OUTPUT) to test_cpp rule
instead of adding it to every single .c build rule? If we later still
need this, then we should consider adding it widely.


> Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@xxxxxxxxxx>
> ---
>  tools/testing/selftests/bpf/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 1ba3d72c3261..efab82151ce2 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -22,7 +22,8 @@ LLVM_OBJCOPY  ?= llvm-objcopy
>  BPF_GCC                ?= $(shell command -v bpf-gcc;)
>  SAN_CFLAGS     ?=
>  CFLAGS += -g -rdynamic -Wall -O2 $(GENFLAGS) $(SAN_CFLAGS)             \
> -         -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR)          \
> +         -I$(CURDIR) -I$(abspath $(OUTPUT))                            \
> +         -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR)                      \
>           -I$(TOOLSINCDIR) -I$(APIDIR)                                  \
>           -Dbpf_prog_load=bpf_prog_test_load                            \
>           -Dbpf_load_program=bpf_test_load_program
> --
> 2.26.2
>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux