> 1. rs6000.c (WORLD_SAVE_P) decides on the use of the out-of-line > prologue saves on the basis of cfun->calls_setjmp && flag_exceptions. > of course, flag_exceptions is NOT set by Ada for SjLj - which is > what's used for the compiler build.
It isn't set because GNAT implements a different SJLJ scheme, entirely based on __builtin_setjmp/__builtin_longjmp. It is incompatible with the regular EH scheme so flag_exceptions cannot be set. > - it doesn't seem reasonable to force -fexceptions - until we can > build ada with ZCE. Or change the SJLJ scheme. > - so, given that SjLj exceptions are in use w/out the flag - it > seems that the check should be adjusted. > > 2. (TRUNK-only) > > ** Eric, you removed the setting of cfun->calls_setjmp from gcc/ > builtins.c (in June). This (re)breaks trunk c.f. 4.6 - given the fix > to (1). > Was there some reason to remove this? Yes, the comment just above was obsolete after the SPARC change. Moreover, __builtin_setjmp is not like setjmp, it is lowered into internal constructs that represent all of its effects so using the cfun->calls_setjmp big hammer looks overkill to me. > ... would there be some more appropriate test for rs6000.c to use? Possibly, what's the exact reason why the special routines cannot be used? > 3. There is no multi-lib target set for powerpc64-darwin, thus > bootstrap fails with a Bad Alignment error in building the target libs. > > Since this is a long-standing regression (last bootstrap for powerpc- > darwin was likely in the 4.2 era). > > OK for 4.6 (1, 3) and trunk (1,2 & 3) ? Be careful about system-darwin-ppc64.ads: I don't think you can backport an instance from the trunk to the 4.6 branch, as there is at least one entry missing at the end. Thanks for working on this! -- Eric Botcazou