[PATCH] D119590: exclude openembedded distributions from setting rpath on openmp executables
Khem Raj via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 10 07:22:10 PST 2022
raj.khem added a comment.
Herald added a project: All.
In D119590#3316050 <https://reviews.llvm.org/D119590#3316050>, @JonChesterfield wrote:
> Cross compilers are a hazard here. I'd expect there to be a fairly long list of magic flags you need to pass to clang to get it to find the right libraries. Can you add fno-openmp-implicit-rpath to that list instead?
hmmm, I would say the original patch made assumption about native compile is the only option, clang claims to be inherently cross compiler. Anyway adding `-fno-openmp-implicit-rpath` would mean that all SDKs generated by OpenEmbedded/Yocto project will have to somehow specify this option by default as well. it might work for system builds by specifying in global CFLAGS or adding to CC var itself.
> A better solution might be a cmake flag to specify where to use for the implicit rpath directory instead of deriving it from sys::path::parent_path. That would let your target set up a cross compiling toolchain that creates binaries that are able to find libomp et al in whatever directory they're located, without assuming a whole llvm toolchain installed onto the target.
right. Cmake flag route seems a good one. I will explore it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119590/new/
https://reviews.llvm.org/D119590
More information about the cfe-commits
mailing list