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

Attachment: signature.asc
Description: PGP signature

Reply via email to