[PATCH] D42702: Fix llvm-config --system-libs output on FreeBSD and NetBSD

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 10:40:49 PST 2018


dim added a comment.

In https://reviews.llvm.org/D42702#995109, @krytarowski wrote:

> In https://reviews.llvm.org/D42702#995106, @dim wrote:
>
> > In https://reviews.llvm.org/D42702#994985, @krytarowski wrote:
> >
> > > `-l/usr/lib/libexecinfo.so` this should be replaced with `-lexecinfo`.
> >
> >
> > As I said, this is something detected by CMake, not LLVM's scripts.  We could attempt to submit a fix to CMake, but that will take quite some time to arrive, and some vendor versions (such as Red Hat's or Debian's) will not be fixed for years, if ever.
>
>
> This means that we need to implement check manually, in worst case hardcode it under the `FreeBSD|NetBSD` OS.


As a gross hack, we can put in a special case for `s#/usr/lib/libexecinfo.so##-lexecinfo#`.  But I'd rather trust what CMake gives us.

> 
> 
>>> Does it work this way with this patch?
>> 
>> What this patch does, is pass through absolute library paths (even if those might be less desirable) through, unmodified, so programs using `llvm-config --system-libs` will not fail to link.
> 
> static linking is still broken

Huh, why?  (Not that I ever try to statically link...)  I would expect CMake to give `/usr/lib/libexecinfo.a` in that case?


Repository:
  rL LLVM

https://reviews.llvm.org/D42702





More information about the llvm-commits mailing list