llvm-config is a compiled host binary used to get infos about the
target installation (sic). It currently lives in the target sysroot,
which may not be usable because now we're mixing build host and
target libraries:
toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/bin/llvm-config-host:
relocation error: /lib/x86_64-linux-gnu/libpthread.so.0: symbol
__libc_vfork version GLIBC_PRIVATE not defined in file
libc.so.6 with link time reference
Move it to $TOOLCHAIN/bin where host binaries belong. But llvm-config
doesn't support spitting out a library path from a different prefix than
its own (which explains the placement in sysroot). Patch that in to
prevail sanity.
Then disable the z3 solver so the target doesn't use build host libraries.
But that's broken too, use debian's patch to fix it up (with the
addition to default to "OFF" instead on "ON").
Finally, disable new options and use the build type "MinSizeRel" for the
host as well, courtesy if @MilhouseVH.