[cfe-dev] Making libc++ on Linux user-friendly

Hal Finkel hfinkel at anl.gov
Mon Mar 31 09:45:54 PDT 2014


----- Original Message -----
> From: "David Chisnall" <David.Chisnall at cl.cam.ac.uk>
> To: "Sebastian Redl" <sebastian.redl at getdesigned.at>
> Cc: cfe-dev at cs.uiuc.edu
> Sent: Monday, March 31, 2014 10:55:09 AM
> Subject: Re: [cfe-dev] Making libc++ on Linux user-friendly
> 
> On 31 Mar 2014, at 16:27, Sebastian Redl
> <sebastian.redl at getdesigned.at> wrote:
> 
> > The other problem is this: how do we make it so that no additional
> > command line flags are required, no matter what ABI library is
> > used? Ideally, the libc++.so would just tell the linker to pull
> > the ABI library into the link, or claim to export the symbols
> > itself but really just forward to the underlying library.
> 
> This is what we do on FreeBSD:
> 
> $ cat /usr/lib/libc++.so
> /* $FreeBSD: release/10.0.0/lib/libc++/libc++.ldscript 253917
> 2013-08-03 16:23:43Z dim $ */
> GROUP ( /usr/lib/libc++.so.1 /usr/lib/libcxxrt.so )

Can this work for static libraries also?

 -Hal

> 
> This allows -stdlib=libc++ to just add -lc++ to the ld command line
> and Just Work™.  It also meant that we could add or remove
> dependencies without having to alter linker command lines.  We do
> the same thing with libc.so, and I'd recommend that this be the
> default way of installing libc++ on Linux.  Then clang++ (or g++)
> just needs to know to link to libc++ and doesn't need to know
> anything about the specific configuration.
> 
> David
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the cfe-dev mailing list