[PATCH] D11153: [Compiler-RT] If unwind/c++abi is set, don't include libgcc

Renato Golin renato.golin at linaro.org
Wed Jul 22 03:16:17 PDT 2015


rengolin added a comment.

In http://reviews.llvm.org/D11153#209397, @logan wrote:

> Although it is difficult to use, we can remove the default libraries with `-nostdlib`.  This is what I am using when I am building different configurations of libc++abi and libunwind on Linux.


Right. In that case, I'd rather --rtlib=compiler-rt didn't include anything, and forced you to include your own libraries, instead of assuming a GNU environment.

> For your long-term plan on the default standard library, I agree that we should select the default standard library according to the environment.  However, I am still concerning the overloaded meaning for `-l` options.  For example, what will happen if the users specified `-lunwind` when they are mean to link with libunwind[1] from Savannah?  The libunwind from Savannah does not include C++ level 1 unwinding library by default.


That's a good point. That's why I didn't want to call our unwind libraries "libunwind". But that's also not an excuse to rely on string-match.

I think that removing the automatic include of libgcc is the least problematic solution.

Though it would be good to have an easier way to include unwind/eh libraries if detected, I'd rather do that on detection of presence, than on absence. This would be for another patch, of course.

Do you agree I should remove the libgcc inclusions altogether?


http://reviews.llvm.org/D11153







More information about the cfe-commits mailing list