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: [Ada] Clean ups in exception handling code and Makefile


On 11/15/05, Arnaud Charlet <charlet@adacore.com> wrote:
> 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

This patch seems to be (partly) unapplied.  At least the
         (LIBGNAT_OBJS): Add raise-gcc.o
is missing.  This causes bootstrap failures on s390x:

../../xgcc -B../../ -DIN_GCC   `echo -O2 -fmessage-length=0 -Wall
-U_FORTIFY_SOURCE -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -fno-common |sed -e 's/-pedantic//g' -e
's/-Wtraditional//g'`   -o ../../gnatmake b_gnatm.o a-except.o
ctrl_c.o ali.o ali-util.o s-casuti.o alloc.o atree.o binderr.o butil.o
casing.o csets.o debug.o elists.o einfo.o erroutc.o errutil.o
err_vars.o fmap.o fname.o fname-uf.o fname-sf.o gnatmake.o gnatvsn.o
hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o make.o makeusg.o
makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o namet.o
nlists.o opt.o osint.o osint-m.o output.o prj.o prj-attr.o
prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o
prj-nmsc.o prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o
prj-util.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o
scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o sinfo.o
sinput.o sinput-c.o sinput-p.o snames.o stand.o stringt.o styleg.o
stylesw.o system.o validsw.o switch.o switch-m.o table.o targparm.o
tempdir.o tree_io.o types.o uintp.o  uname.o urealp.o usage.o
widechar.o  \
      ../rts/libgnat.a  ../../prefix.o ../../version.o link.o
../../../libiberty/libiberty.a
a-except.o:(.eh_frame+0x12): undefined reference to `__gnat_eh_personality'
ali.o: In function `ali__scan_ali':
ali.adb:(.text+0x5b2c): undefined reference to `__gnat_begin_handler'
ali.adb:(.text+0x5b44): undefined reference to `__gnat_end_handler'
ali.adb:(.text+0x5d62): undefined reference to `__gnat_end_handler'
...


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