libwd/0010-uadk-libs-update-compile-options.patch
2023-05-26 16:41:41 +08:00

99 lines
3.5 KiB
Diff

From 019cc3dd67eb90e7a131c1ad04bfde20de0d25a7 Mon Sep 17 00:00:00 2001
From: Longfang Liu <liulongfang@huawei.com>
Date: Wed, 28 Dec 2022 09:56:04 +0800
Subject: [PATCH 10/28] uadk/libs: update compile options
On the new uadk framework, dynamic library loading functions such
as dlopen are used, and corresponding compilation options need to
be added -ldl.
Signed-off-by: Longfang Liu <liulongfang@huawei.com>
---
Makefile.am | 4 ++--
sample/Makefile.am | 2 +-
test/Makefile.am | 4 ++--
test/hisi_sec_test/Makefile.am | 2 +-
test/hisi_zip_test/Makefile.am | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 1ea6d6b..bd7b36f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,7 +86,7 @@ if WD_STATIC_DRV
AM_CFLAGS += -DWD_STATIC_DRV
AM_CFLAGS += -DWD_NO_LOG
-libwd_la_LIBADD = $(libwd_la_OBJECTS) -lnuma
+libwd_la_LIBADD = $(libwd_la_OBJECTS) -ldl -lnuma
libwd_comp_la_LIBADD = $(libwd_la_OBJECTS) -ldl -lnuma
libwd_comp_la_DEPENDENCIES = libwd.la
@@ -108,7 +108,7 @@ UADK_COMP_SYMBOL= -Wl,--version-script,$(top_srcdir)/libwd_comp.map
UADK_V1_SYMBOL= -Wl,--version-script,$(top_srcdir)/v1/libwd.map
libwd_la_LDFLAGS=$(UADK_VERSION) $(UADK_WD_SYMBOL) $(UADK_V1_SYMBOL)
-libwd_la_LIBADD= -lnuma
+libwd_la_LIBADD= -ldl -lnuma
libwd_comp_la_LIBADD= -lwd -ldl -lnuma
libwd_comp_la_LDFLAGS=$(UADK_VERSION) $(UADK_COMP_SYMBOL)
diff --git a/sample/Makefile.am b/sample/Makefile.am
index eb8d71b..2f2d5ac 100644
--- a/sample/Makefile.am
+++ b/sample/Makefile.am
@@ -9,7 +9,7 @@ if WD_STATIC_DRV
AM_CFLAGS+=-Bstatic
uadk_comp_LDADD=../.libs/libwd.a \
../.libs/libwd_comp.a \
- ../.libs/libhisi_zip.a -lpthread -lnuma
+ ../.libs/libhisi_zip.a -ldl -lpthread -lnuma
else
uadk_comp_LDADD=-L../.libs -l:libwd.so.2 -l:libwd_comp.so.2 -lpthread -lnuma
endif
diff --git a/test/Makefile.am b/test/Makefile.am
index 860a103..87b97ca 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -6,9 +6,9 @@ wd_mempool_test_SOURCES=wd_mempool_test.c
if WD_STATIC_DRV
AM_CFLAGS+=-Bstatic
wd_mempool_test_LDADD=../.libs/libwd.a ../.libs/libwd_crypto.a \
- ../.libs/libhisi_sec.a -lnuma -lpthread
+ ../.libs/libhisi_sec.a -ldl -lnuma -lpthread
else
-wd_mempool_test_LDADD=-L../.libs -lwd -lwd_crypto -lnuma -lpthread
+wd_mempool_test_LDADD=-L../.libs -lwd -ldl -lwd_crypto -lnuma -lpthread
endif
wd_mempool_test_LDFLAGS=-Wl,-rpath,'/usr/local/lib'
diff --git a/test/hisi_sec_test/Makefile.am b/test/hisi_sec_test/Makefile.am
index 9955ab1..61506d4 100644
--- a/test/hisi_sec_test/Makefile.am
+++ b/test/hisi_sec_test/Makefile.am
@@ -8,7 +8,7 @@ test_hisi_sec_SOURCES=test_hisi_sec.c
if WD_STATIC_DRV
AM_CFLAGS+=-Bstatic
test_hisi_sec_LDADD=../../.libs/libwd.a ../../.libs/libwd_crypto.a \
- ../../.libs/libhisi_sec.a -lnuma
+ ../../.libs/libhisi_sec.a -ldl -lnuma
else
test_hisi_sec_LDADD=-L../../.libs -l:libwd.so.2 -l:libwd_crypto.so.2 -lnuma
endif
diff --git a/test/hisi_zip_test/Makefile.am b/test/hisi_zip_test/Makefile.am
index 0782ef7..f671582 100644
--- a/test/hisi_zip_test/Makefile.am
+++ b/test/hisi_zip_test/Makefile.am
@@ -7,7 +7,7 @@ zip_sva_perf_SOURCES=test_sva_perf.c test_lib.c testsuit.c
if WD_STATIC_DRV
zip_sva_perf_LDADD=../../.libs/libwd.a ../../.libs/libwd_comp.a \
- ../../.libs/libhisi_zip.a -lpthread -lnuma $(libcrypto_LIBS)
+ ../../.libs/libhisi_zip.a -ldl -lpthread -lnuma $(libcrypto_LIBS)
else
zip_sva_perf_LDADD=-L../../.libs -l:libwd.so.2 -l:libwd_comp.so.2 \
-lpthread -lnuma $(libcrypto_LIBS)
--
2.25.1