[PATCH] D85630: [cmake] Don't build with -O3 -fPIC on Solaris/sparcv9

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 02:21:23 PDT 2020


ro added a comment.

In D85630#2222583 <https://reviews.llvm.org/D85630#2222583>, @jyknight wrote:

> Presumably this is a bug in //something// -- either the solaris linker, in g++, or in the llvm code being mis-compiled? It seems unfortunate to put in place a hacky workaround like this, without a bug reference to the responsible component.

True. That's because at the time I posted this workaround/hack, the bug hadn't fully been analysed yet.  This has changed in the meantime: it's been found that `gcc` doesn't correctly heed some TLS code sequences. To make things worse, Solaris `ld` doesn't properly validate its assumptions against the input, generating wrong code.

`gld` like `gcc` is more liberal here and correctly deals with the code it gets fed from `gcc`.

There's PR target/96607: GCC feeds SPARC/Solaris linker with unrecognized TLS sequences <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96607> now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85630



More information about the llvm-commits mailing list