On Thu, 22 May 2014, Bernd Schmidt wrote:

> The implementations of some functions like fork_execute are changed to those
> from collect2 and the calls in lto-wrapper adapted accordingly. There are some
> minor changes in these functions: for example I avoid calling fatal_error,
> instead using the fatal/fatal_perror functions so that the cleanup routine is
> called properly (lto-wrapper does not use atexit as collect2 does).

Avoiding fatal_error seems like the wrong direction.  Using the common 
diagnostics code from diagnostic.c is preferred to using custom code.  
Thus, as an initial step I'd suggest instead converting lto-wrapper to use 
the common functionality where possible (fatal_error with %m replacing 
fatal_perror), making it use atexit in the process.  Don't move code using 
legacy fatal / fatal_perror functions to a common library.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to