[Openmp-commits] [PATCH] D59451: Fix gettid warnings and one test on FreeBSD

Dimitry Andric via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Mar 17 04:39:58 PDT 2019


dim added a comment.

In D59451#1432386 <https://reviews.llvm.org/D59451#1432386>, @Hahnfeld wrote:

> In D59451#1432251 <https://reviews.llvm.org/D59451#1432251>, @dim wrote:
>
> > In D59451#1432201 <https://reviews.llvm.org/D59451#1432201>, @protze.joachim wrote:
> >
> > > This code does not directly use pthreads, but uses C++11 threads.
> > >  Why does the compiler not link the necessary threading library, when using C++11 threads?
> >
> >
> > How would the compiler know up-front what is in the code?  I have not often seen compilers that influence linking flags from the code that was compiled, unless maybe the Microsoft specific `#pragma lib` feature (which somebody is now adding to clang, I believe).  Usually, these kinds of flags are specified by the user, and passed from the frontend to the linker.
>
>
> The point is that the test case is using `std::thread` and the compiler needs to link all libraries that are needed for the stdlib to work. If this includes `libpthread` that's up to the compiler, so I agree with Joachim that adding linking flags does not seem right.


Okay, then I admit to not understanding what you are suggesting.  Do we need to start modifying the compiler to make one test case work?  That seems rather... excessive.


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D59451





More information about the Openmp-commits mailing list