Commit 366e1740 authored by Guilherme Amadio's avatar Guilherme Amadio Committed by Namhyung Kim

perf build: Ensure libtraceevent and libtracefs versions have 3 components

When either of these have a shorter version, like 1.8, the expression
that computes the version has a syntax error that can be seen in the
output of make:

expr: syntax error: missing argument after +

Link: https://bugs.gentoo.org/917559Reported-by: default avatarPeter Volkov <peter.volkov@gmail.com>
Signed-off-by: default avatarGuilherme Amadio <amadio@gentoo.org>
Reviewed-by: default avatarLeo Yan <leo.yan@arm.com>
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240606153625.2255470-3-amadio@gentoo.org
parent 0f0e1f44
......@@ -1179,7 +1179,7 @@ ifneq ($(NO_LIBTRACEEVENT),1)
CFLAGS += -DHAVE_LIBTRACEEVENT
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libtraceevent)
EXTLIBS += $(shell $(PKG_CONFIG) --libs-only-l libtraceevent)
LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent)
LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent).0.0
LIBTRACEEVENT_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
LIBTRACEEVENT_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
LIBTRACEEVENT_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
......@@ -1195,7 +1195,7 @@ ifneq ($(NO_LIBTRACEEVENT),1)
CFLAGS += $(shell $(PKG_CONFIG) --cflags libtracefs)
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libtracefs)
EXTLIBS += $(shell $(PKG_CONFIG) --libs-only-l libtracefs)
LIBTRACEFS_VERSION := $(shell $(PKG_CONFIG) --modversion libtracefs)
LIBTRACEFS_VERSION := $(shell $(PKG_CONFIG) --modversion libtracefs).0.0
LIBTRACEFS_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEFS_VERSION)))
LIBTRACEFS_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEFS_VERSION)))
LIBTRACEFS_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEFS_VERSION)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment