]> code.ossystems Code Review - openembedded-core.git/commit
llvm: Use YOCTO_ALTERNATE_MULTILIB_NAME environment variable in llvm-config
authorKhem Raj <raj.khem@gmail.com>
Sun, 19 Aug 2018 17:23:37 +0000 (10:23 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 20 Aug 2018 09:43:59 +0000 (10:43 +0100)
commit865eb1c1400e60d09c8f413504123fdfc116a71b
tree43eae794e103dda91fa6586ed84a71b13fd08f93
parentbd4a02d8d3cfb476a2da0f4616605c92604266c0
llvm: Use YOCTO_ALTERNATE_MULTILIB_NAME environment variable in llvm-config

llvm-config is a tool on similar veins as pkg-config but provides a lot
more information and packages which use llvm e.g. mesa use this tool to
poke for llvm related informaiton e.g. version, libpath, includepaths
to name a few, this has few challanges in cross build environments where
llvm-config is supposed to be build for buildhost but provide information
about target llvm which is addressed by building native llvm-config along
with target llvm build, but this is frowned upon by OE build system since
it detects that host paths are being used so we have to build it as part
of llvm-native but then it means install paths for llvm and llvm-native
are different and wrong paths get reported when llvm-config is used.
This is solved by providing YOCTO_ALTERNATE_EXE_PATH variable to let
llvm-config use that path instead of self-relative path to report back

Second problem is when building multi-lib packages base_libdir is different
for target packages but native llvm-config does not know about it so
it reports non-multilibbed paths as libdir and packages can not find
llvm in sysroot. This is fixed by adding another environment variable
YOCTO_ALTERNATE_MULTILIB_NAME which can be set from recipes to set
proper multilib path

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch