fio/0001-fio-fix-dynamic-engines-soname-definition.patch

33 lines
1.1 KiB
Diff

From 1b2f9943db0d74f4533567b7c8ed54d9c343e3f0 Mon Sep 17 00:00:00 2001
From: Yigal Korman <ykorman@gmail.com>
Date: Thu, 17 Sep 2020 21:55:14 +0300
Subject: [PATCH] fio: fix dynamic engines soname definition
The SONAME of the engines should not match the name of the dependent
library. Otherwise it confuses the dynamic loader into thinking the
dependency is already resolved.
Prefixing the name with fio make more sense here.
Signed-off-by: Yigal Korman <ykorman@gmail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 8e1ebc90..e2d0833c 100644
--- a/Makefile
+++ b/Makefile
@@ -256,7 +256,7 @@ define engine_template =
$(1)_OBJS := $$($(1)_SRCS:.c=.o)
$$($(1)_OBJS): CFLAGS := -fPIC $$($(1)_CFLAGS) $(CFLAGS)
engines/lib$(1).so: $$($(1)_OBJS)
- $$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,lib$(1).so.1 $$($(1)_LIBS) -o $$@ $$<
+ $$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 $$($(1)_LIBS) -o $$@ $$<
ENGS_OBJS += engines/lib$(1).so
all install: $(ENGS_OBJS)
endef
--
2.17.1