libunwind patch for java library

Steve Ellcey sje@cup.hp.com
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
sje@cup.hp.com


2002-06-13  Steve Ellcey  <sje@cup.hp.com>
	* gcc/libjava/configure.in (LIBUNWINDSPEC): Define LIBUNWINDSPEC
	if --enable-libunwind-exceptions is set.
	* gcc/libjava/libgcj.spec.in (*lib): Add @LIBUNWINDSPEC@.


*** gcc.orig/libjava/configure.in	Thu Jun 13 10:37:08 2002
--- gcc/libjava/configure.in	Thu Jun 13 10:46:19 2002
*************** if test $can_unwind_signal = no && test 
*** 170,175 ****
--- 170,196 ----
    EXCEPTIONSPEC=
  fi
  
+ 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
+    LIBUNWINDSPEC=""
+ fi
+ AC_SUBST(LIBUNWINDSPEC)
+ 
  dnl See if the user wants to disable java.net.  This is the mildly
  dnl ugly way that we admit that target-side configuration sucks.
  AC_ARG_ENABLE(java-net,
*** gcc.orig/libjava/libgcj.spec.in	Thu Jun 13 10:37:19 2002
--- gcc/libjava/libgcj.spec.in	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)
  
  *jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ -fkeep-inline-functions
--- 4,9 ----
  # to link with libgcj.
  #
  %rename lib liborig
! *lib: -lgcj -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @LIBUNWINDSPEC@ @SYSTEMSPEC@ %(libgcc) %(liborig)
  
  *jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ -fkeep-inline-functions



More information about the Gcc-patches mailing list