Build error when enable the CONFIG_FIT_SIGNATURE

My platform is LS1046ardb and checkout to v18.06.1.
Now I want to do verified boot. So I modified the .config of uboot. Actually I turn on the needed configs, but error is happend at

CONFIG_FIT_SIGNATURE=y

I get the error "undefined reference to 'pthread_once'".
How to fix it? It seems the error in Makefile.

Here is the error:

/home/jackshih/openwrt/hodaka/staging_dir/host/lib/libssl.a(ssl_init.o): In function `OPENSSL_init_ssl':
ssl_init.c:(.text+0x59): undefined reference to `pthread_once'
/home/jackshih/openwrt/hodaka/staging_dir/host/lib/libcrypto.a(libcrypto_la-crypto_init.o): In function `OPENSSL_init_crypto':
crypto_init.c:(.text+0x51): undefined reference to `pthread_once'
/home/jackshih/openwrt/hodaka/staging_dir/host/lib/libcrypto.a(libcrypto_la-conf_sap.o): In function `OpenSSL_config':
conf_sap.c:(.text+0xbc): undefined reference to `pthread_once'
/home/jackshih/openwrt/hodaka/staging_dir/host/lib/libcrypto.a(libcrypto_la-conf_sap.o): In function `OpenSSL_no_config':
conf_sap.c:(.text+0xf3): undefined reference to `pthread_once'
/home/jackshih/openwrt/hodaka/staging_dir/host/lib/libcrypto.a(libcrypto_la-eng_all.o): In function `ENGINE_load_builtin_engines':
eng_all.c:(.text+0x30): undefined reference to `pthread_once'
/home/jackshih/openwrt/hodaka/staging_dir/host/lib/libcrypto.a(libcrypto_la-err.o):err.c:(.text+0xb4e): more undefined references to `pthread_once' follow
collect2: error: ld returned 1 exit status
scripts/Makefile.host:108: recipe for target 'tools/dumpimage' failed
make[5]: *** [tools/dumpimage] Error 1
Makefile:1264: recipe for target 'tools' failed
make[4]: *** [tools] Error 2

I have fix this issue by modify the uboot source code.
In tools/Makefile, add -lpthread.

$(shell pkg-config --libs libssl libpthread libcrypto 2> /dev/null || echo "-lssl -lpthread -lcrypto")

Thanks for posting your solution. I just ran into this error building 18.06.4. Have you filed a bug with OpenWRT?

The problem is at building tools. Modify the file uboot-xxxx/tools/Makefile.
old: $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "=lssl -lcrypto"
new: $(shell pkg-config --libs libssl libcrypto -lpthread 2> /dev/null || echo "=-lssl -lcrypto -lpthread"

No, I have not post the issue to Openwrt.