[Lldb-commits] [review request] move cxa_demangle.cpp to another directory to avoid gcc/rtti errors

Greg Clayton gclayton at apple.com
Thu Dec 6 10:50:57 PST 2012


Don't use this patch. After speaking with Howard Hinnant, the dynamic_cast is indeed needed.

On Dec 6, 2012, at 10:14 AM, Greg Clayton <gclayton at apple.com> wrote:

> Option #3: there are only two dynamic_casts and both of them can be static_casts. 
> 
> <static.patch>
> 
> Try this out.
> 
> On Dec 5, 2012, at 3:13 PM, "Malea, Daniel" <daniel.malea at intel.com> wrote:
> 
>> Hi all,
>> 
>> As I'm trying to fix the gcc build, I ran into some trouble with source/Core/cxa_demangle.cpp: as it uses dynamic_cast<>, gcc complains if it is compiled with -fno-rtti.
>> 
>> I'm afraid I couldn't find any (non-hacky) way to change the compile flags for just that one file. I see two ways to fix the problem "correctly":
>> 
>> 1. Define REQUIRES_RTTI = 1 in source/Core/Makefile, thereby compiling many more files with -rtti than actually need it. It fixes the build, but is not ideal.
>> 
>> 2. Move cxa_demangle.cpp to another directory (I propose "source/Demangle" thereby creating a new static library "liblldbDemangle.a") and set the required RTTI options for just that one directory.
>> 
>> What does the mailing list think? The attached patch implements option 2 above, and also fixes lib/Makefile to correctly include libclangRewriteCore.a and libclangRewriteFrontend.a as those are apparently required...
>> 
>> 
>> Cheers,
>> Dan
>> 
>> <move_cxa_demangle.patch>_______________________________________________
>> lldb-commits mailing list
>> lldb-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list