[PATCH] Support Solaris unused sections' gc link syntax

Xan López xan at igalia.com
Mon Jun 22 07:39:03 PDT 2015


On Mon, Jun 22, 2015 at 08:36:18AM -0400, Rafael Espíndola wrote:
> The question is if the use of discard-unused=sections should be inside
> of the if for  LLVM_NO_DEAD_STRIP or, like the check for gold, outside
> of it.
> 
> Does discard-unused=sections work when the program being gc can load
> plugins (clang for example)?

Oh I see. Unfortunately the answer at the moment is: I don't know! I
have clang for Solaris building locally, and I'm sending the patches
upstream as you can tell, but there's still some work to do to get
things working. In particular there is a lot of hardcoded code for
Solaris/x86 with GCC 4.5 (!) (tools/clang/lib/, grep for Solaris) that
will not work on Solaris/sparc. So I'm working on fixing that, but
until I have a fully working clang I cannot answer your question. As
things stand now everything is pretty broken.

I just sent this patch because this is actually the path we use during
build with standard flags in CMake (since I'm not using GNU gold
obviously), so I thought it made sense to just provide the Solaris
alternative there.

Cheers,

Xan




More information about the llvm-commits mailing list