[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No need for object file removal before compilation
From: |
Ralf Wildenhues |
Subject: |
Re: No need for object file removal before compilation |
Date: |
Sat, 12 Apr 2008 09:10:12 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
* Ralf Wildenhues wrote on Sat, Apr 12, 2008 at 08:56:24AM CEST:
> OK for the updated one? It makes for 5% faster
> libtool --mode=compile gcc -c a.c
I should be more precise: the above holds for an empty file a.c,
measured using a script that calls the above 50 times, pre and post
patch.
I should also note that this patch introduces an inevitable race
(of course all dealing with the "no -c -o" case):
After we grabbed the lockfile, but before we install the trap to remove
it, if the user interrupts libtool in between, we have a leftover
lockfile. The next compile will barf out, but the error message will
point the user towards the lockfile.
This is benign, and IMNSHO unavoidable.
Cheers,
Ralf
> 2008-04-12 Ralf Wildenhues <address@hidden>
>
> * libltdl/config/ltmain.m4sh (func_mode_compile): Avoid
> redundant removal of old output files before compilation.
> Do not remove $obj until we have successfully grabbed the
> lockfile (in case the compiler doesn't grok `-c -o'), because
> it might be identical to $output_obj.
> At the end of the function, before we remove the lockfile,
> update $removelist so that if the trap hits after the lockfile
> has been removed, we do not accidentally remove $output_obj that
> does not belong to us.
> (func_write_libtool_object): Use $MV instead of mv.