Browse code

tls: Makefile - link libdl dynamically

- libcrypto uses dlopen() and dlclose()
- GH #3115

Daniel-Constantin Mierla authored on 15/06/2022 09:36:30
Showing 1 changed files
... ...
@@ -39,7 +39,7 @@ ifneq ($(CRYPTO_BUILDER),)
39 39
 	LIBS += $(shell $(CRYPTO_BUILDER) --libs-only-L)
40 40
 endif # ifneq ($(CRYPTO_BUILDER),)
41 41
 
42
-	LIBS += -l:libssl.a -l:libcrypto.a -l:libz.a -l:libdl.a
42
+	LIBS += -l:libssl.a -l:libcrypto.a -l:libz.a -ldl
43 43
 	# TODO: explore use of LIBS += -Wl,-Bstatic $(shell $(SSL_BUILDER) --libs-only-l)
44 44
 
45 45
 else
... ...
@@ -53,7 +53,7 @@ else # ifneq ($(SSL_BUILDER),)
53 53
 	DEFS += -I$(LOCALBASE)/ssl/include
54 54
 	LIBS += -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib \
55 55
 			-L$(LOCALBASE)/lib64 -L$(LOCALBASE)/ssl/lib64 \
56
-			-l:libssl.a -l:libcrypto.a -l:libz.a -l:libdl.a
56
+			-l:libssl.a -l:libcrypto.a -l:libz.a -ldl
57 57
 endif # ifneq ($(SSL_BUILDER),)
58 58
 
59 59
 include ../../Makefile.modules