selftests/bpf: use simply-expanded variables for libpcap flags
authorEduard Zingerman <eddyz87@gmail.com>
Fri, 23 Aug 2024 19:44:09 +0000 (12:44 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Fri, 23 Aug 2024 21:33:30 +0000 (14:33 -0700)
commit5772c3458bb8d17d763e0f411e1bae1bf4eda88d
treeb08c86ecc70da8bd2741c709f2623fa178d046d2
parent5cd0aea0b16a74769533ca605bc43634a4485dd9
selftests/bpf: use simply-expanded variables for libpcap flags

Save pkg-config output for libpcap as simply-expanded variables.
For an obscure reason 'shell' call in LDLIBS/CFLAGS recursively
expanded variables makes *.test.o files compilation non-parallel
when make is executed with -j option.

While at it, reuse 'pkg-config --cflags' call to define
-DTRAFFIC_MONITOR=1 option, it's exit status is the same as for
'pkg-config --exists'.

Fixes: f52403b6bfea ("selftests/bpf: Add traffic monitor functions.")
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20240823194409.774815-1-eddyz87@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/Makefile