This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: building unwind-sjlj.o with / without -fexceptions
- From: Richard Henderson <rth at redhat dot com>
- To: Joern Rennecke <joern dot rennecke at embecosm dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 06 Dec 2011 12:54:43 -0800
- Subject: Re: building unwind-sjlj.o with / without -fexceptions
- References: <20111205190551.nwxfllj9ycwwwoos-nzlynne@webmail.spamcop.net>
On 12/05/2011 04:05 PM, Joern Rennecke wrote:
> I find that exception handling doesn't work properly for the epiphany with
> recent gcc sources (it worked in the pre-merged port with sources from July).
> I suppose that is related to the change mentioned in:
> http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01926.html
>
> Looking at the cleanup-5.c failure, I see that _Unwind_ForcedUnwind
> calls _Unwind_SjLj_Register, thus we never unwind to where we are supposed
> to unwind.
>
> I can fix this in libgcc/config/epiphany/t-epiphany with:
>
> unwind-sjlj.o : CFLAGS += -fno-exceptions
> unwind-sjlj.o : c_flags := $(filter-out -fexceptions,$(cflags))
>
> Is that the right way to do it? Or should we more generally remove -fexceptions
> from the build rules for the exception handling runtime?
No. In general removing -fexceptions from the unwind routines will cause
the unwind routines to fail. Both problems are almost certainly problems
with Matz' scope clobbers vs exception regions.
r~