This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libobjc] Make exception.c safe for unwind.h
- From: Andreas Schwab <schwab at suse dot de>
- To: David Ayers <d dot ayers at inode dot at>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, java-patches at gcc dot gnu dot org
- Date: Thu, 19 May 2005 15:28:37 +0200
- Subject: Re: [libobjc] Make exception.c safe for unwind.h
- References: <428C5CD9.6050404@inode.at>
David Ayers <d.ayers@inode.at> writes:
> This fixes libobjc (including the test suite) by including tsystem.h
> which defines gcc_unreachable before unwind.h (which is the file that
> uses it) is included.
unwind.h is also used by libjava.
../../../libjava/.././libjava/../gcc/unwind.h: In function '_Unwind_Ptr _Unwind_GetTextRelBase(_Unwind_Context*)':
../../../libjava/.././libjava/../gcc/unwind.h:217: error: 'gcc_unreachable' was not declared in this scope
../../../libjava/.././libjava/../gcc/unwind.h:218: warning: no return statement in function returning non-void
make[2]: *** [stacktrace.lo] Error 1
Tested on ia64-suse-linux.
Andreas.
2005-05-19 Andreas Schwab <schwab@suse.de>
* configure.ac (GCC_UNWIND_INCLUDE): Add
`-I$(libgcj_basedir)/../include'.
* configure: Regenerate.
* include/java-stack.h: Include <tsystem.h>.
--- libjava/configure.ac.~1.30.~ 2005-05-18 10:21:02.000000000 +0200
+++ libjava/configure.ac 2005-05-19 14:09:51.000000000 +0200
@@ -719,7 +719,7 @@ AC_SUBST(HASH_SYNC_SPEC)
AM_CONDITIONAL(USING_GCC, test "$GCC" = yes)
# We're in the tree with gcc, and need to include some of its headers.
-GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
+GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc -I$(libgcj_basedir)/../include'
if test "x${with_newlib}" = "xyes"; then
# We are being configured with a cross compiler. AC_REPLACE_FUNCS
--- libjava/include/java-stack.h.~1.3.~ 2005-03-17 10:36:52.000000000 +0100
+++ libjava/include/java-stack.h 2005-05-19 14:09:37.000000000 +0200
@@ -11,6 +11,7 @@ details. */
#ifndef __JV_STACKTRACE_H__
#define __JV_STACKTRACE_H__
+#include <tsystem.h>
#include <unwind.h>
#include <gcj/cni.h>
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."