On Thursday 2014-07-17 00:02, Jonas 'Sortie' Termansen wrote:
>
>I ported libressl to my custom hobby OS and it has been a pleasant
>experience. Nonetheless, I did run into some minor portability problems
>that I wish to share:
>
>* apps/Makefile.am.tpl links libcrypto and libssl in the wrong order.
> The libssl library depends on libcrypto and libcrypto doesn't depend
> on libssl.
>diff -Nur libressl-2.0.2/apps/Makefile.am libssl/apps/Makefile.am
>--- libressl-2.0.2/apps/Makefile.am 2014-07-16 05:25:52.000000000 +0200
>+++ libssl/apps/Makefile.am 2014-07-16 13:26:55.425448073 +0200
>@@ -4,8 +4,8 @@
>
> openssl_CFLAGS = $(USER_CFLAGS)
> openssl_LDADD = $(PLATFORM_LDADD)
>-openssl_LDADD += $(top_builddir)/crypto/libcrypto.la
> openssl_LDADD += $(top_builddir)/ssl/libssl.la
>+openssl_LDADD += $(top_builddir)/crypto/libcrypto.la
If libssl depends on libcrypto, we should set
libssl_la_LIBADD += ${top_builddir}/crypto/libcrypto.la
in the first place for proper transitivity. (And then, openssl_LDADD
becomes the dependency list just for openssl_SOURCES.)