]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libitm/eh_cpp.cc
libitm: Fix bootstrap for targets without HAVE_ELF_STYLE_WEAKREF.
[thirdparty/gcc.git] / libitm / eh_cpp.cc
index 4909427b405a882cff7d51ffd40bebc4d37320ae..57beb1a147fdb1e8508708a3d352b13add3bb8c8 100644 (file)
@@ -178,7 +178,11 @@ GTM::gtm_thread::init_cpp_exceptions ()
 {
   // Only save and restore the number of uncaught exceptions if this is
   // actually used in the program.
-  if (__cxa_get_globals != NULL && __cxa_get_globals () != 0)
+  if (
+#if HAVE_ELF_STYLE_WEAKREF
+      __cxa_get_globals != NULL &&
+#endif
+      __cxa_get_globals () != 0)
     cxa_uncaught_count_ptr = &__cxa_get_globals ()->uncaughtExceptions;
   else
     cxa_uncaught_count_ptr = 0;