Undefined "__Unwind_Resme" when building libc++

I’m trying to build libc++ with top-of-tree clang (which was built on the same system).

I’m running Mac OS X 10.5.8 on an Intel Core 2 Duo.

When I run ./buildit from the libcxx/lib directory, I get the following error:

Undefined symbols for architecture i386:
“__Unwind_Resume”, referenced from:

followed by lots of mangled symbols.

Anyone know what might be going wrong?

I’ve attached the output of ./buildit, some information about the version of GCC that is installed, and the output of the clang -print-search-dirs.

clang_search_dirs (318 Bytes)

gcc-4.2_info (1.45 KB)

libcxx_build_output (42.7 KB)

It's not linking against libUnwind. Basically, the libcxx build system
doesn't appear to expect to run on anything earlier than 10.6. Patches
welcome, I think; you'll need to figure out what framework/dylib
provides libUnwind on Leopard and make sure you both link against
it and re-export its symbols.


I identified (using the nm -m command) that Leopard’s version of libSystem.B.dylib does in fact have the functions from libUnwind, but they are not exported. However, they are also present in /usr/lib/libgcc_s.1.dylib and they are exported from that lib.

I assume that the proper course would be to have the buildit script link libgcc_s when run on 10.5? Or should it be if the MACOSX_DEVELOPMENT_TARGET is 10.5?

Is there anyone else that would be able to review a patch on 10.5 once I get it working?

Hopefully that will be the last of my roadblocks.