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]

[Ada] Clean ups in exception handling code and Makefile


Tested on i686-linux, committed on trunk.

The GNAT run-time can be configured to work with two different kinds of
exception handling: a front-end specific setjmp/longjmp mechanism based
on __builtin_setjmp, and the general GCC EH mechanism (based on either unwind
tables or a different setjmp/longjmp mechanism).
Up to now, the same run-time sources could be used to accomodate both
mechanism, with the consequence that any run-time configured for both
mechanims requires systematically additional dependencies on libgcc*
symbols, even if not used. Under some configurations (e.g. VxWorks 5),
this is problematic, because not all the functions are properly supported
by the OS out of the box.
To solve this issue, we now separate both EH mechanisms in the sources and
only build one at a time instead of mixing the two, to avoid unwanted
references to libgcc symbols when not needed.

Another clean up in Makefile.in to help building cross compilers:
$(AR_FOR_TARGET) and $(RANLIB_FOR_TARGET) should properly be used for
building and installing the gnat runtime, otherwise cross archiving can fail.
$(RANLIB_FLAGS) is a host flag and shouldn't be used for target operations
and so is removed.

2005-11-14  Arnaud Charlet  <charlet@adacore.com>

	* a-except.adb (Zero_Cost_Exceptions): Removed, no longer used.
	(builtin_longjmp, Process_Raise_Exceeption): Move setjmp/longjmp
	related code to a-exexpr.adb
	(Save_Occurrence_And_Private): Move GCC EH related code to
	a-exexpr-gcc.adb
	(Raise_Current_Excep): Add new variable Id with pragma
        volatile, to ensure that the variable lives on stack.

	* a-exexpr-gcc.adb, raise-gcc.c: New file.

	* a-exexpr.adb (builtin_longjmp, Propagate_Exception): Moved here code
	from a-except.adb.
	Move GCC EH related code to a-exexpr-gcc.adb

	* Makefile.in: Add or update g-soccon LIBGNAT pairs for Linux/PPC and
	64-bit Solaris
	Split the Linux version of g-soccon into separate variants for 32 and 64
	bit platforms.
	(gnatlib): Use $(AR_FOR_TARGET) and $(RANLIB_FOR_TARGET)
	vice $(AR) and $(RANLIB). Remove use of host variable $(RANLIB_FLAGS).
	install-gnatlib: Use $(RANLIB_FOR_TARGET) vice $(RANLIB). Remove use
	of host variable $(RANLIB_FLAGS).
	(alpha64-dec-*vms*): Fix translations for 64 bit compiler.
	Code clean up: remove unused/obsolete targets.
	(EH_MECHANISM): New variable introduced to differenciate between the
	two EH mechanisms statically.
	(gnatlib-zcx, gnatlib-sjlj): Force EH_MECHANISM manually.
	(LIBGNAT_OBJS): Add raise-gcc.o
	(LIBGNAT_TARGET_PAIRS for ppc-vxworks): Use an specialized version of
	s-osinte.adb, s-tpopsp.adb, and system.ads for the run time that
	supports VxWorks 6 RTPs.
	(EXTRA_GNATRTL_NONTASKING_OBJS for ppc-vxworks): Remove the use of
	i-vxworks and i-vxwoio from the run time that supports VxWorks 6 RTPs.

	* raise.c: Move all GCC EH-related routines to raise-gcc.c

Attachment: difs.11
Description: Text document


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