Help with MinGW and 4.8 release candidate

Chris Johns chrisj at rtems.org
Wed Jan 9 07:31:13 UTC 2008


Ralf Corsepius wrote:
> Instead of shooting at sight at what you don't like, we should analyze
> the problem and find a solution.

I have taken a look at the code and see the following:

Newlib:
  Writes to stderr and calls abort.

RTEMS:
  Writes to printk and calls rtems_fatal_error_occurred.

The RTEMS version allows asserts in newlib or any other library to be present 
and to not have newlib's stdio being linked in. This is important for the 
small footprint targets.

So it would seem we have to resolve standards verses small footprint embedded 
systems.

The standard requires the message be printed to stderr. Is printk always 
stderr ? If we state stderr (outside of ptys or redirection) shall always 
appear on the same device as printk would that be ok ?

The standard requires assert call abort. The standard states abort shall cause 
abnormal process termination unless the signal SIGABRT is being caught. We do 
not handle signals so the SIGABRT issue is not important. The newlib code 
calls exit which is nice but is it important to us. We should never get 
asserts outside the development environment so a clean exit is not that 
important. I would consider a watchdog and reset more important.

Looking at this code I wonder if abort should also be replaced (bucket or mug 
at the ready :-)).

I hope this helps.

>> Is this a 4.8 issue as well ?
> No, 4.8 uses newlib-1.15.0

Thanks.

Regards
Chris



More information about the users mailing list