This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [libobjc] Make exception.c safe for unwind.h


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."


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