summaryrefslogtreecommitdiff
path: root/examples/timer
diff options
context:
space:
mode:
authorBruce Richardson <[email protected]>2020-06-30 15:14:32 +0100
committerThomas Monjalon <[email protected]>2020-07-01 19:30:52 +0200
commit8549295db07b1f5777a314ee0b75f768e7ec4913 (patch)
tree433f20d1edaee86124b3a2b270f4ec249428abfd /examples/timer
parentf9c0b1f4319ea4f40ee2ceb8097c9a5a34a56171 (diff)
build/pkg-config: improve static linking flags
Rather than setting -Bstatic in the linker flags when doing a static link, and then having to explicitly set -Bdynamic again afterwards, we can update the pkg-config file to use -l:libfoo.a syntax to explicitly refer to the static library in question. Since this syntax is not supported by meson's pkg-config module directly, we can post-process the .pc files instead to adjust them. Once done, we can simplify the examples' makefiles and the docs by removing the explicit static flag. Signed-off-by: Bruce Richardson <[email protected]> Acked-by: Luca Boccassi <[email protected]> Acked-by: Sunil Pai G <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]>
Diffstat (limited to 'examples/timer')
-rw-r--r--examples/timer/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index e58e90a286..b40b65995e 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)