[Openmp-commits] [PATCH] D93727: [OpenMP] Add using bit flags to select Libomptarget Information

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 26 21:48:38 PST 2021


jdoerfert added a comment.

In D93727#2524396 <https://reviews.llvm.org/D93727#2524396>, @vzakhari wrote:

> `offloading/dynamic_module_load.c` fails due to this commit in my environment with x86_64 offload.  It fails because `std::call_once` cannot be used without `libpthread`, and `libomptarget.rtl.x86_64.so` is not linked with `libpthread`.  Basically, gdb shows that `include/c++/7.3.0/x86_64-linux-gnu/bits/gthr-default.h::__gthread_active_p()` returns `false`, when `std::call_once` is called from `libomptarget.rtl.x86_64.so`.  It does return `true`, though, when `std::call_once` is called from `libomptarget.so`, because `libomptarget.so` is linked with `libpthread`.
>
> It looks like GCC11 will have a fix: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55394
> For the time being, all plugins have to be linked with `libpthread`, since `Debug.h` is considered to be common code for all plugins.
>
> Any disagreement?

Linking `libpthread` also into the plugins seems plausible. Can you write the patch?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93727/new/

https://reviews.llvm.org/D93727



More information about the Openmp-commits mailing list