diff options
author | Arun Sharma <arun.sharma@google.com> | 2008-06-16 14:28:36 -0600 |
---|---|---|
committer | David Mosberger-Tang <davidm@koala.mostang.com> | 2008-06-16 14:28:36 -0600 |
commit | 8081e82ba168c06c8ee28332b5924784889226fc (patch) | |
tree | c878ea969600b8a6710a988fc5d383a9eb492a15 | |
parent | 1eddefc371c80012e0299eec78805dedfed89a89 (diff) | |
download | libunwind-8081e82ba168c06c8ee28332b5924784889226fc.tar.gz |
Make the linking of C++ ABI related code for exceptions optional.
The default is to have it enabled.
Signed-off-by: Arun Sharma <arun.sharma@google.com>
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/configure.in b/configure.in index c2374c5d..7f7aef8e 100644 --- a/configure.in +++ b/configure.in @@ -116,6 +116,14 @@ AC_ARG_ENABLE(debug, [ --enable-debug turn on debug support (slows down execution)], [enable_debug=yes], []) +AC_ARG_ENABLE(cxx_exceptions, +[ --enable-cxx-exceptions use libunwind to handle C++ exceptions], +[enable_cxx_exceptions=$enableval], [enable_cxx_exceptions=yes]) +if test x$enable_cxx_exceptions = xyes; then + AC_MSG_NOTICE([Enabling C++ exception support]) +fi +AM_CONDITIONAL([SUPPORT_CXX_EXCEPTIONS], [test x$enable_cxx_exceptions = xyes]) + LIBUNWIND___THREAD save_LDFLAGS="$LDFLAGS" diff --git a/src/Makefile.am b/src/Makefile.am index ae113f47..7de30269 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -61,6 +61,7 @@ libunwind_la_SOURCES_generic = \ mi/Gget_fpreg.c mi/Gset_fpreg.c \ mi/Gset_caching_policy.c +if SUPPORT_CXX_EXCEPTIONS libunwind_la_SOURCES_local_unwind = \ unwind/Backtrace.c unwind/DeleteException.c \ unwind/FindEnclosingFunction.c unwind/ForcedUnwind.c \ @@ -69,6 +70,7 @@ libunwind_la_SOURCES_local_unwind = \ unwind/GetRegionStart.c unwind/GetTextRelBase.c \ unwind/RaiseException.c unwind/Resume.c \ unwind/Resume_or_Rethrow.c unwind/SetGR.c unwind/SetIP.c +endif # List of arch-independent files needed by local-only library (libunwind): libunwind_la_SOURCES_local_nounwind = \ |