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: [PATCH] PR ada/66205 gnatbind generates invalid code when finalization is enabled in restricted runtime


Simon,

Unfortunately we've discovered that your patch is causing unexpected
consequences and break e.g. testing of ravenscar application, where
although the Ada RM requires no task termination, for practical
purposes, waiting for terminating task is something we rely upon for
automatic testing, so your patch is suitable after all, sorry about
the oversight.

After internal discussions at AdaCore, it appears that if you want
Finalization, you chould set Suppress_Standard_Library_On_Target to
False. All your troubles come from the fac tthat you tries to stick to
Suppress_Standard_Library_On_Target set to True, but this combination
(Suppress_Standard_Library_On_Target set to True, and Finalization enabled)
is simpled not supported in the GNAT runtime, and the binder doesn't
expect it either.

So I'm going to revert your change in bindgen.adb and will let you
experiment with setting Suppress_Standard_Library_On_Target to False in
your system.ads. This is what we do in e.g.. our ravenscar-full runtime
which supports precisely both ravenscar tasking, and finalization (among other
things), on bare metal targets, which seems to correspond to what you are
trying to do.

Arno

> gcc/ada/Changelog:
> 
> 2017-12-05  Simon Wright <simon@pushface.org>
> 
>      PR ada/66205
>       * bindgen.adb (Gen_AdaFinal): If the restriction
>          No_Task_Termination is present, generate a null body.


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