882ecdecc9
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.
14 lines
553 B
Diff
14 lines
553 B
Diff
--- a/tools/llvm-config/llvm-config.cpp 2019-12-15 20:54:21.898634608 +0100
|
|
+++ b/tools/llvm-config/llvm-config.cpp 2019-12-15 20:56:12.280223943 +0100
|
|
@@ -285,6 +285,10 @@
|
|
CurrentExecPrefix =
|
|
sys::path::parent_path(sys::path::parent_path(CurrentPath)).str();
|
|
|
|
+#ifdef LLVM_CONFIG_EXEC_PREFIX
|
|
+ CurrentExecPrefix = LLVM_CONFIG_EXEC_PREFIX;
|
|
+#endif
|
|
+
|
|
// Check to see if we are inside a development tree by comparing to possible
|
|
// locations (prefix style or CMake style).
|
|
if (sys::fs::equivalent(CurrentExecPrefix, LLVM_OBJ_ROOT)) {
|