[PATCH] D55503: Change llvm call once check for building Swift for PowerPC(ppc64le)

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 12 04:21:59 PST 2018


nemanjai added subscribers: seurer, hfinkel, echristo.
nemanjai added a comment.

This code has been in place for quite a long time as there is some sort of bug in libstdc++. I don't remember what the problem was but I remember that this was required because of an issue with the GNU C++ runtime.
My concern is that the intent with defining `LLVM_THREADING_USE_STD_CALL_ONCE` to zero when `__ppc__` is defined is that we would use the non GNU one on **all** PPC platforms.
However, gcc does not define `__ppc__`.
So the behaviour before this change is that anything built with clang on any PPC system will use the clang version of `std::call_once` and anything built with gcc will use the GNU version. This was the case on all little endian and big endian systems (both 32 and 64 bit). After this change, this is what the situation will be (`compiler-rt` == clang's `libc++`, `GNU` == GNU `libstdc+++`):

|       | PPC64LE     | PPC64BE     | PPC32       |
| CLANG | compiler-rt | compiler-rt | compiler-rt |
| GCC   | compiler-rt | GNU         | GNU         |
|

Of course, that may be what we want, but I don't know for sure. Perhaps @hfinkel, @echristo  or @seurer can shed some further light on this.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55503





More information about the llvm-commits mailing list