[cfe-dev] libc++abi on linux

Marshall Clow mclow.lists at gmail.com
Mon Jul 9 18:08:58 PDT 2012


On Jul 9, 2012, at 5:46 PM, Nick Kledzik wrote:
> On Jul 9, 2012, at 2:34 PM, Ashok Nalkund wrote:
>> On 7/9/2012 2:11 PM, Richard Smith wrote:
>>> On Mon, Jul 9, 2012 at 9:44 AM, Ashok Nalkund <ashoknn at qualcomm.com
>>> <mailto:ashoknn at qualcomm.com>> wrote:
>>>> 
>>>   So could you suggest a replacement for unwind? libc++abi + libc++ still
>>>   requires unwind.h, and my temporary solution is to pull it from gcc.
>>> 
>>> 
>>> You could pull it from libunwind instead. Ultimately, it seems to me
>>> that we should fix Clang's unwind.h to provide all the necessary
>>> declarations. Is there any reason not to do so? The current
>>> #include_next approach suggests that there might be some Darwin-specific
>>> concerns there?
>> 
>> But is that all, just the unwind.h? The libunwind projects (PathScale or 
>> nongnu website) provide more files and require compilation etc.
> 
> That is what I don't understand about this thread.  Is the problem that libgcc_s.so (which implements _Unwind_* functions) does not exits on these systems?  Or is the problem that the unwind header is missing?  

Either, or both. Or people don't want to use libgcc; which is, after all, GPL.
AFAICT, Apple keeps libgcc_s around for old binaries built with gcc; binaries built with clang + libc++ don't use it.

> I do remember on Darwin that for whatever historical reason, gcc installed libgcc_s in a public location (/usr/lib), but the unwind headers was squirreled away instead the gcc distribution along with other fix-includes headers.  So, unless clang knew where gcc was installed, it could not add the search path pointing into gcc to the standard search path.  

Yeah, that was/is weird.

> If the problem is just a missing unwind.h when building libc++abi on linux, we could just change libc++abi to carry its own copy unwind.h just for linux??

I don't think that's the whole problem; those routines have to come from somewhere; 
and you can't just assume "oh, there will be a copy of gcc laying around on the system".
[ Oblique reference to http://lld.llvm.org :-) ]

-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki





More information about the cfe-dev mailing list