This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unwind and IA64 HP-UX

The g++ compiler on IA64 HP-UX uses the system unwind library.  It does
not have the new _Unwind_Resume_or_Rethrow entry point that Richard
Henderson created in the GCC unwind library.  This patch is to allow
IA64 HP-UX to avoid using the new entry point and use
_Unwind_RaiseException instead.  This will give us slightly different
semantics on HP-UX but it is as close as we can come using only the
functions in the IA64 Unwind ABI.

If approved I would like to check this in on the 3.3 branch as well as
the main line so that it gets into any 3.3.* releases.  Currently some
C++ programs will not link correctly on IA64 HP-UX with the g++ 3.3
compiler.  They get an unsatisfied symbol (_Unwind_Resume_or_Rethrow)
during the link.

Steve Ellcey

2003-05-22  Steve Ellcey  <>

	* config/os/hpux/os_defines.h: Define _LIBUNWIND_STD_ABI if we are
	on IA64 HP-UX.
	* libsupc++/ Don't call _Unwind_Resume_or_Rethrow if

*** gcc.orig/libstdc++-v3/config/os/hpux/os_defines.h	Thu May 22 08:55:55 2003
--- gcc/libstdc++-v3/config/os/hpux/os_defines.h	Thu May 22 08:58:38 2003
*************** namespace std 
*** 84,89 ****
--- 84,96 ----
  typedef long int __padding_type;
+ // GCC on IA64 HP-UX uses the HP-UX system unwind library,
+ // it does not have the _Unwind_Resume_or_Rethrow entry point
+ // because that is not part of the standard IA64 Unwind ABI.
+ #if defined (__ia64__)
+ #define _LIBUNWIND_STD_ABI 1
+ #endif
  /* We need explicit instantiation of the atomicity lock on HPPA if
     there is no weak support.  */
  #if !defined(_GLIBCPP_SUPPORTS_WEAK) && defined (__hppa__)
*** gcc.orig/libstdc++-v3/libsupc++/	Thu May 22 09:00:28 2003
--- gcc/libstdc++-v3/libsupc++/	Thu May 22 08:59:29 2003
*************** __cxa_rethrow ()
*** 98,104 ****
--- 98,108 ----
        _Unwind_SjLj_Resume_or_Rethrow (&header->unwindHeader);
+       _Unwind_RaiseException (&header->unwindHeader);
+ #else
        _Unwind_Resume_or_Rethrow (&header->unwindHeader);
+ #endif
        // Some sort of unwinding error.  Note that terminate is a handler.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]