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

Marshall Clow mclow.lists at gmail.com
Wed Apr 2 19:55:49 PDT 2014


On Apr 1, 2014, at 10:37 AM, 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.
> 

I really like the updated documentation :-)

— Marshall

> 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.
> <linux.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list