X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fuboot-tools%2F0004-tools-use-pkg-config-when-available-to-get-SSL-flags.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fuboot-tools%2F0004-tools-use-pkg-config-when-available-to-get-SSL-flags.patch;h=9eb74834da16a327d1860c7106e954708c705c8b;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/uboot-tools/0004-tools-use-pkg-config-when-available-to-get-SSL-flags.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/uboot-tools/0004-tools-use-pkg-config-when-available-to-get-SSL-flags.patch new file mode 100644 index 0000000..9eb7483 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/uboot-tools/0004-tools-use-pkg-config-when-available-to-get-SSL-flags.patch @@ -0,0 +1,39 @@ +From 99bc38ac6ebdd3b5d741cb9e50d842fa13d409f7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 12 May 2015 22:54:29 +0200 +Subject: [PATCH] tools: use pkg-config when available to get SSL flags + +Instead of hardcoding -lssl -lcrypto as the flags needed to build +mkimage with FIT signature enabled, use pkg-config when +available. This allows to properly support cases where static linking +is used, which requires linking with -lz, since OpenSSL uses zlib +internally. + +We gracefully fallback on the previous behavior of hardcoding -lssl +-lcrypto if pkg-config is not available or fails with an error. + +Patch submitted upstream at +http://lists.denx.de/pipermail/u-boot/2015-May/214489.html + +Signed-off-by: Thomas Petazzoni +--- + tools/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tools/Makefile b/tools/Makefile +index 4bbb153..8ff9c2e 100644 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -122,7 +122,8 @@ endif + + # MXSImage needs LibSSL + ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),) +-HOSTLOADLIBES_mkimage += -lssl -lcrypto ++HOSTLOADLIBES_mkimage += \ ++ $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") + endif + + HOSTLOADLIBES_dumpimage := $(HOSTLOADLIBES_mkimage) +-- +2.1.0 +