[U-Boot] [PATCH] Add -pthread to HOSTLOADLIBES_mkimage

Tom Rini trini at konsulko.com
Fri Dec 6 16:13:56 CET 2019


On Tue, Dec 03, 2019 at 09:06:39AM +0000, Benedikt-Alexander Mokroß wrote:

> On some unix distributions, pthread is not automatically linked.
> This results in unresolved symbols when e.g. building u-boot via OpenWRT (using LibreSSL) in dumpimage and other host tools when i.E. CONFIG_FIT_SIGNATURE is set.
> Using -pthread to link pthread should be portable across all distributions and OS X.
> 
> CHANGELOG:
> * Added -pthread to HOSTLOADLIBES_mkimage
> ---
>  tools/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/Makefile b/tools/Makefile
> index 24581adccd..2f122bed8e 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -150,7 +150,8 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CON
>  HOSTCFLAGS_kwbimage.o += \
>  $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "")
>  HOSTLOADLIBES_mkimage += \
> -$(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto")
> +$(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") \
> +-pthread
> 
>  # OS X deprecate openssl in favour of CommonCrypto, supress deprecation
>  # warnings on those systems

My first reaction is that it's a bug within openwrt pkg-config files to
not say that -pthread is required.  Would that not be the normal case?
Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191206/74a6f25e/attachment.sig>


More information about the U-Boot mailing list