On Sat, Feb 18, 2012 at 7:36 PM, Jeffrey Yasskin <[email protected]> wrote:
> When trying to build libcxxabi on linux, I discovered that clang's > unwind.h doesn't provide enough definitions. This patch allows linux > builds to take advantage of libunwind if that's installed. > > Another option would be to just copy the interfaces out of > > http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libgcc-s-ddefs.html > , > but since we're relying on the system to provide definitions anyway, > it seems more sensible to try to pull the interface from the system > too. > Personally, I'd rather see us do all of the above. Use libunwind's header if present, and provide the right interfaces otherwise. Still, this patch is clearly an improvement. Can you only define _GNU_SOURCE (and associated silliness) on Linux? Or would BSDs need this as well? Essentially, I'd like to only define _GNU_SOURCE if absolutely necessary. Can we name _SHOULD_UNDEFINE_GNU_SOURCE something still less likely to collide? I could see exactly that macro used in other GNU_SOURCE manipulating contexts... Maybe just prefix with _CLANG_UNWIND_H? No strong opinion here.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
