[libc++][patch] Sort out common Linux linking issues.

Dan Albert danalbert at google.com
Wed Aug 6 09:45:12 PDT 2014


The patch in question:
https://www.mail-archive.com/cfe-commits@cs.uiuc.edu/msg93807.html

I'll try to find some time to take a look more closely at this, but just
looking at the log I'd say it needs some modification because it doesn't
provide anything for libc++abi. It also (as the OP guessed) won't work on
Darwin (doesn't have libsupc++ or libstdc++).

- Dan


On Wed, Aug 6, 2014 at 2:59 AM, İsmail Dönmez <ismail at donmez.ws> wrote:

> Hi,
>
> Would be nice to get this reviewed. Its gets tiring to put -lc++abi
> whenever I need to do -stdlib=libc++
>
> Thanks!
>
>
> On Wed, Apr 9, 2014 at 3:52 PM, Sebastian Redl <
> sebastian.redl at getdesigned.at> wrote:
>
>>
>> Gentle ping on this. Haven't heard anything except that Marshall likes
>> the documentation.
>>
>> On Apr 2, 2014, at 10:54, Dmitri Gribenko wrote:
>>
>> > + Sylvestre Ledru
>> >
>> > On Tue, Apr 1, 2014 at 6:37 PM, Sebastian Redl
>> > <sebastian.redl at getdesigned.at> wrote:
>> >> Following the recent inquiry and David Chisnall's advice, I have
>> created
>> >> a patch that makes libc++ work a lot smoother on Linux. It allows a
>> >> plain "clang++ -stdlib=libc++" command line to work no matter what ABI
>> >> library is used, and fixes the linking errors I encountered.
>> >>
>> >> However, I have absolutely no idea what it does on other platforms.
>> >>
>> >> Log Message:
>> >>
>> >>    Sort out common Linux linking issues.
>> >>
>> >>    Using libc++ on Linux was problematic because using libsupc++ didn't
>> >> pull in
>> >>    all necessary symbols, whereas linking against a dynamic ABI library
>> >> required
>> >>    the user to explicitly link against the ABI library.
>> >>
>> >>    This patch adds a new property, LIBCXX_CXX_ABI_LINK, that can be set
>> >> to dynamic
>> >>    (the default) or static. In dynamic mode, it links against the
>> >> dynamic library,
>> >>    and substitutes its unversioned .so file with a linker script that
>> links
>> >>    against both libc++ and the ABI library. In static mode, it uses
>> >> --whole-archive
>> >>    to force inclusion of the entire ABI library into the libc++.so.
>> >>
>> >>    It also automatically uses libstdc++ for dynamic mode and libsupc++
>> >> for static
>> >>    mode if either was selected; the two ABI names are now synonyms.
>> >>
>> >> _______________________________________________
>> >> cfe-commits mailing list
>> >> cfe-commits at cs.uiuc.edu
>> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>> >>
>> >
>> >
>> >
>> > --
>> > main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
>> > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140806/cc95ba2d/attachment.html>


More information about the cfe-commits mailing list