Commit ca58207d authored by Benoît Thébaudeau's avatar Benoît Thébaudeau Committed by Peter Korsgaard
Browse files

openssl: fix static build

If configured with no-dso, the openssl binary still gets linked with
-ldl, while libdl is not available for static-only builds. The OpenSSL
framework does not support automatically dropping -ldl with no-dso, so
-ldl has to be removed from Makefile after calling ./Configure as
explained in PROBLEMS.

Fixes http://autobuild.buildroot.org/results/cbb35f2582f1cfeb3d11cb4952a80784ff660baf



[Peter: add reference to PROBLEMS file]
Signed-off-by: default avatarBenoît Thébaudeau <benoit@wsystem.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 2b47c7f0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -90,6 +90,14 @@ define OPENSSL_CONFIGURE_CMDS
	$(SED) "s: build_tests::" $(@D)/Makefile
endef

# libdl is not available in a static build, and this is not implied by no-dso
ifeq ($(BR2_STATIC_LIBS),y)
define OPENSSL_FIXUP_STATIC_MAKEFILE
	$(SED) 's/-ldl//g' $(@D)/Makefile
endef
OPENSSL_POST_CONFIGURE_HOOKS += OPENSSL_FIXUP_STATIC_MAKEFILE
endif

define HOST_OPENSSL_BUILD_CMDS
	$(MAKE1) -C $(@D)
endef