[PATCH] D43168: Don't use -ldl on BSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 10:56:49 PST 2018


krytarowski added a comment.

NetBSD's libc has stubs for threading functions (weak references), but it cannot work as long as there is no linking with `-lpthread` (with GCC syntax: `-pthread`).
The `-lpthread` form shouldn't be used as is in FreeBSD the threading function is called something like `-lthr` (in NetBSD it's called `libpthread.{so,a}`).
`-lstdc++` on NetBSD is required to get linked with `-lpthread` in order to get related functions functional (without them, there is abort with a message).

Regarding refactoring CMake's usage, I'm not sure it's worth the churn to move things around unless we address real bugs.


Repository:
  rL LLVM

https://reviews.llvm.org/D43168





More information about the llvm-commits mailing list