Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit@wsystem.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] openssl: fix static build
Date: Tue,  7 Jul 2015 12:37:58 +0200	[thread overview]
Message-ID: <1436265478-3738-1-git-send-email-benoit@wsystem.com> (raw)

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.

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

Signed-off-by: Beno?t Th?baudeau <benoit@wsystem.com>
---
 package/openssl/openssl.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
index 4068cf1..37c640d 100644
--- a/package/openssl/openssl.mk
+++ b/package/openssl/openssl.mk
@@ -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
-- 
2.1.4

             reply	other threads:[~2015-07-07 10:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 10:37 Benoît Thébaudeau [this message]
2015-07-09  6:53 ` [Buildroot] [PATCH] openssl: fix static build Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436265478-3738-1-git-send-email-benoit@wsystem.com \
    --to=benoit@wsystem.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox