libunwind patch for java library

Steve Ellcey
Thu Jun 13 12:31:00 GMT 2002

This is one of three patches to support the use of a seperate unwind
library instead of having the _Unwind_* functions in libgcc.  An
equivelent patch for libstdc++ library was sent and checked in some time
ago and a third patch to add -lunwind to the compiler link line is being
sent to just the gcc-patches mailing list.

This change is to support the IA64 HP-UX platform where we want to use
the HP libunwind library instead of putting the unwind code into libgcc.
Using the HP unwind library helps with interoperability between GCC and
HP's compilers and debuggers.

I have a copyright assignment on file but no write access so if someone
could review it and check it in I would appreciate it.

Steve Ellcey

2002-06-13  Steve Ellcey  <>
	if --enable-libunwind-exceptions is set.
	* gcc/libjava/ (*lib): Add @LIBUNWINDSPEC@.

*** gcc.orig/libjava/	Thu Jun 13 10:37:08 2002
--- gcc/libjava/	Thu Jun 13 10:46:19 2002
*************** if test $can_unwind_signal = no && test 
*** 170,175 ****
--- 170,196 ----
+ dnl
+ dnl Check for libunwind exception handling support.  If an explicit
+ dnl enable/disable libunwind exceptions is given, use that otherwise
+ dnl default to disable.
+ dnl
+ dnl --enable-libunwind-exceptions forces the use of libunwind.
+ dnl --disable-libunwind-exceptions assumes there is no libunwind.
+ dnl
+ AC_ARG_ENABLE(libunwind-exceptions,
+ [  --enable-libunwind-exceptions  force use of libunwind for exceptions],
+ use_libunwind_exceptions=$enableval,
+ use_libunwind_exceptions=no)
+ AC_MSG_RESULT($use_libunwind_exceptions)
+ dnl Option parsed, now set things appropriately
+ if test x"$use_libunwind_exceptions" = xyes; then
+    LIBUNWINDSPEC="-lunwind"
+ else
+ fi
  dnl See if the user wants to disable  This is the mildly
  dnl ugly way that we admit that target-side configuration sucks.
*** gcc.orig/libjava/	Thu Jun 13 10:37:19 2002
--- gcc/libjava/	Thu Jun 13 10:46:34 2002
*** 4,9 ****
  # to link with libgcj.
  %rename lib liborig
! *lib: -lgcj -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) %(liborig)
--- 4,9 ----
  # to link with libgcj.
  %rename lib liborig
! *lib: -lgcj -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @LIBUNWINDSPEC@ @SYSTEMSPEC@ %(libgcc) %(liborig)

More information about the Gcc-patches mailing list