openssl: drop libdl from pc file
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Sat, 19 Jul 2014 15:16:11 +0000 (12:16 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 19 Jul 2014 16:06:19 +0000 (18:06 +0200)
Fixes:
http://autobuild.buildroot.net/results/2a2/2a274e2dbffd268a391b0e8a15dae5a759b870a1/

[Thomas: move registration of the hook inside the condition.]

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/openssl/openssl.mk

index 743ca52ca93ec6fd0e1cf2137036c6c8f0051d17..7e49a6503e82dfe9724457b28c6113fd6da46d0a 100644 (file)
@@ -115,6 +115,14 @@ define OPENSSL_INSTALL_TARGET_CMDS
        rm -f $(TARGET_DIR)/usr/bin/c_rehash
 endef
 
+# libdl has no business in a static build
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+define OPENSSL_FIXUP_STATIC_PKGCONFIG
+       $(SED) 's/-ldl//' $(STAGING_DIR)/usr/lib/pkgconfig/openssl.pc
+endef
+OPENSSL_POST_INSTALL_STAGING_HOOKS += OPENSSL_FIXUP_STATIC_PKGCONFIG
+endif
+
 ifneq ($(BR2_PREFER_STATIC_LIB),y)
 # libraries gets installed read only, so strip fails
 define OPENSSL_INSTALL_FIXUPS_SHARED