From ed46c436c0ec605d98359a1440e5f5feacf9ca7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 10 Aug 2015 10:17:32 +0200 Subject: [PATCH] Fix error when loading libmbedtls.so --- ChangeLog | 1 + library/Makefile | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ff7caf2b..d10791f4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,7 @@ Bugfix * Fix missing -static-libgcc when building shared libraries for Windows with make. * Fix link error when building shared libraries for Windows with make. + * Fix error when loading libmbedtls.so. Changes * The PEM parser now accepts a trailing space at end of lines (#226). diff --git a/library/Makefile b/library/Makefile index 6cfd0606f..f72ae8e35 100644 --- a/library/Makefile +++ b/library/Makefile @@ -93,9 +93,9 @@ libmbedtls.a: $(OBJS_TLS) echo " RL $@" $(AR) s $@ -libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) +libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) libmbedx509.so echo " LD $@" - $(CC) -shared -Wl,-soname,$@ $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS) + $(CC) -shared -Wl,-soname,$@ -L. -lmbedcrypto -lmbedx509 $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS) libmbedtls.so: libmbedtls.$(SOEXT_TLS) echo " LN $@ -> $<" @@ -116,9 +116,9 @@ libmbedx509.a: $(OBJS_X509) echo " RL $@" $(AR) s $@ -libmbedx509.$(SOEXT_X509): $(OBJS_X509) +libmbedx509.$(SOEXT_X509): $(OBJS_X509) libmbedcrypto.so echo " LD $@" - $(CC) -shared -Wl,-soname,$@ $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509) + $(CC) -shared -Wl,-soname,$@ -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509) libmbedx509.so: libmbedx509.$(SOEXT_X509) echo " LN $@ -> $<"