diff options
| author | Bruce Richardson <[email protected]> | 2021-01-19 13:03:24 +0000 |
|---|---|---|
| committer | Thomas Monjalon <[email protected]> | 2021-01-30 01:27:28 +0100 |
| commit | 5a19633079efa223cb47f99afec7ee11e1073604 (patch) | |
| tree | 09a43b0658b22f043798f55fc70a70cd1ebc07f9 /examples/timer | |
| parent | 7e54f18326ca157b5187183bc77838d122cb2564 (diff) | |
examples: warn about broken pkg-config
Since the examples are designed to be built by end-users using Make, we
can detect and warn about broken pkg-config on the user's system as part
of the build process.
Signed-off-by: Bruce Richardson <[email protected]>
Diffstat (limited to 'examples/timer')
| -rw-r--r-- | examples/timer/Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 70b1af9f4b..4c0a0f62f9 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -26,6 +26,14 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) +ifeq ($(MAKECMDGOALS),static) +# check for broken pkg-config +ifeq ($(shell echo $(LDFLAGS_STATIC) | grep 'whole-archive.*l:lib.*no-whole-archive'),) +$(warning "pkg-config output list does not contain drivers between 'whole-archive'/'no-whole-archive' flags.") +$(error "Cannot generate statically-linked binaries with this version of pkg-config") +endif +endif + CFLAGS += -DALLOW_EXPERIMENTAL_API build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build |
