Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-28 Thread Michael S. Tsirkin
On Sun, May 26, 2013 at 08:29:35PM +, Blue Swirl wrote: > On Sun, May 26, 2013 at 8:15 PM, Michael S. Tsirkin wrote: > > On Sun, May 26, 2013 at 07:28:40PM +, Blue Swirl wrote: > >> On Sun, May 26, 2013 at 6:24 PM, Michael S. Tsirkin > >> wrote: > >> > On Sun, May 26, 2013 at 06:20:17PM

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Sun, May 26, 2013 at 06:20:17PM +, Blue Swirl wrote: > It's a simple issue. > Each time I reboot during build, I have to make clean and rebuild. > This wastes my time so I looked for ways to save the time. > On my system at least, it has no measureable cost,

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Michael S. Tsirkin
On Sun, May 26, 2013 at 08:29:35PM +, Blue Swirl wrote: > On Sun, May 26, 2013 at 8:15 PM, Michael S. Tsirkin wrote: > > On Sun, May 26, 2013 at 07:28:40PM +, Blue Swirl wrote: > >> On Sun, May 26, 2013 at 6:24 PM, Michael S. Tsirkin > >> wrote: > >> > On Sun, May 26, 2013 at 06:20:17PM

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Blue Swirl
On Sun, May 26, 2013 at 8:15 PM, Michael S. Tsirkin wrote: > On Sun, May 26, 2013 at 07:28:40PM +, Blue Swirl wrote: >> On Sun, May 26, 2013 at 6:24 PM, Michael S. Tsirkin wrote: >> > On Sun, May 26, 2013 at 06:20:17PM +, Blue Swirl wrote: >> >> On Sun, May 26, 2013 at 1:40 PM, Michael S.

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Michael S. Tsirkin
On Sun, May 26, 2013 at 07:28:40PM +, Blue Swirl wrote: > On Sun, May 26, 2013 at 6:24 PM, Michael S. Tsirkin wrote: > > On Sun, May 26, 2013 at 06:20:17PM +, Blue Swirl wrote: > >> On Sun, May 26, 2013 at 1:40 PM, Michael S. Tsirkin > >> wrote: > >> > On Sun, May 26, 2013 at 02:36:28PM

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Blue Swirl
On Sun, May 26, 2013 at 6:24 PM, Michael S. Tsirkin wrote: > On Sun, May 26, 2013 at 06:20:17PM +, Blue Swirl wrote: >> On Sun, May 26, 2013 at 1:40 PM, Michael S. Tsirkin wrote: >> > On Sun, May 26, 2013 at 02:36:28PM +0100, Peter Maydell wrote: >> >> On 26 May 2013 13:31, Michael S. Tsirkin

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Michael S. Tsirkin
On Sun, May 26, 2013 at 06:20:17PM +, Blue Swirl wrote: > On Sun, May 26, 2013 at 1:40 PM, Michael S. Tsirkin wrote: > > On Sun, May 26, 2013 at 02:36:28PM +0100, Peter Maydell wrote: > >> On 26 May 2013 13:31, Michael S. Tsirkin wrote: > >> > On Sun, May 26, 2013 at 10:12:21AM +0100, Peter M

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Blue Swirl
On Sun, May 26, 2013 at 1:40 PM, Michael S. Tsirkin wrote: > On Sun, May 26, 2013 at 02:36:28PM +0100, Peter Maydell wrote: >> On 26 May 2013 13:31, Michael S. Tsirkin wrote: >> > On Sun, May 26, 2013 at 10:12:21AM +0100, Peter Maydell wrote: >> >> I definitely think individual project makefiles

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Michael S. Tsirkin
On Sun, May 26, 2013 at 02:36:28PM +0100, Peter Maydell wrote: > On 26 May 2013 13:31, Michael S. Tsirkin wrote: > > On Sun, May 26, 2013 at 10:12:21AM +0100, Peter Maydell wrote: > >> I definitely think individual project makefiles are the wrong place > >> to fix this. If create-as-temp-and-renam

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Peter Maydell
On 26 May 2013 13:31, Michael S. Tsirkin wrote: > On Sun, May 26, 2013 at 10:12:21AM +0100, Peter Maydell wrote: >> I definitely think individual project makefiles are the wrong place >> to fix this. If create-as-temp-and-rename is useful functionality >> it needs to go in the compiler so that eve

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Michael S. Tsirkin
On Sun, May 26, 2013 at 02:48:11PM +0200, Stefan Weil wrote: > Am 26.05.2013 14:31, schrieb Michael S. Tsirkin: > > On Sun, May 26, 2013 at 10:12:21AM +0100, Peter Maydell wrote: > >> On 26 May 2013 08:35, Michael S. Tsirkin wrote: > >>> On Sat, May 25, 2013 at 05:32:24PM +, Blue Swirl wrote:

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Stefan Weil
Am 26.05.2013 14:31, schrieb Michael S. Tsirkin: > On Sun, May 26, 2013 at 10:12:21AM +0100, Peter Maydell wrote: >> On 26 May 2013 08:35, Michael S. Tsirkin wrote: >>> On Sat, May 25, 2013 at 05:32:24PM +, Blue Swirl wrote: Another way to handle this would be to enhance GCC and linker to

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Michael S. Tsirkin
On Sun, May 26, 2013 at 10:12:21AM +0100, Peter Maydell wrote: > On 26 May 2013 08:35, Michael S. Tsirkin wrote: > > On Sat, May 25, 2013 at 05:32:24PM +, Blue Swirl wrote: > >> Another way to handle this would be to enhance GCC and linker to use > >> atomic operations when producing or combin

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Peter Maydell
On 26 May 2013 08:35, Michael S. Tsirkin wrote: > On Sat, May 25, 2013 at 05:32:24PM +, Blue Swirl wrote: >> Another way to handle this would be to enhance GCC and linker to use >> atomic operations when producing or combining object files. The tools >> could also print a SHA of the object whi

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-26 Thread Michael S. Tsirkin
On Sat, May 25, 2013 at 05:32:24PM +, Blue Swirl wrote: > On Wed, May 22, 2013 at 11:35 AM, Michael S. Tsirkin wrote: > > On Wed, May 22, 2013 at 01:12:15PM +0200, Paolo Bonzini wrote: > >> Il 22/05/2013 13:09, Michael S. Tsirkin ha scritto: > >> > > Usually I do the same---I just do slightly

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-25 Thread Blue Swirl
On Wed, May 22, 2013 at 11:35 AM, Michael S. Tsirkin wrote: > On Wed, May 22, 2013 at 01:12:15PM +0200, Paolo Bonzini wrote: >> Il 22/05/2013 13:09, Michael S. Tsirkin ha scritto: >> > > Usually I do the same---I just do slightly more thorough testing for >> > > configure patches. >> > >> > I've n

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2013 at 01:12:15PM +0200, Paolo Bonzini wrote: > Il 22/05/2013 13:09, Michael S. Tsirkin ha scritto: > > > Usually I do the same---I just do slightly more thorough testing for > > > configure patches. > > > > I've no idea what happens with ccache on a crash by the way. > > It's pos

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 13:09, Michael S. Tsirkin ha scritto: > > Usually I do the same---I just do slightly more thorough testing for > > configure patches. > > I've no idea what happens with ccache on a crash by the way. > It's possible that it's careful to do renames in order to not leave > corrupted out

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2013 at 12:51:42PM +0200, Paolo Bonzini wrote: > Il 22/05/2013 12:50, Michael S. Tsirkin ha scritto: > > On Wed, May 22, 2013 at 12:40:23PM +0200, Paolo Bonzini wrote: > >> Il 22/05/2013 11:42, Michael S. Tsirkin ha scritto: > >>> On Wed, May 22, 2013 at 11:22:52AM +0200, Paolo Bonz

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 12:50, Michael S. Tsirkin ha scritto: > On Wed, May 22, 2013 at 12:40:23PM +0200, Paolo Bonzini wrote: >> Il 22/05/2013 11:42, Michael S. Tsirkin ha scritto: >>> On Wed, May 22, 2013 at 11:22:52AM +0200, Paolo Bonzini wrote: Il 22/05/2013 10:52, Michael S. Tsirkin ha scritto: >>>

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2013 at 12:40:23PM +0200, Paolo Bonzini wrote: > Il 22/05/2013 11:42, Michael S. Tsirkin ha scritto: > > On Wed, May 22, 2013 at 11:22:52AM +0200, Paolo Bonzini wrote: > >> Il 22/05/2013 10:52, Michael S. Tsirkin ha scritto: > >>> The fix is simple here: don't use ccache. I don't.

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 11:42, Michael S. Tsirkin ha scritto: > On Wed, May 22, 2013 at 11:22:52AM +0200, Paolo Bonzini wrote: >> Il 22/05/2013 10:52, Michael S. Tsirkin ha scritto: >>> The fix is simple here: don't use ccache. I don't. >>> >>> In fact, from what I saw people use ccache to work around makef

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2013 at 11:48:54AM +0200, Stefan Hajnoczi wrote: > On Wed, May 22, 2013 at 12:46:45AM +0300, Michael S. Tsirkin wrote: > > Once in a while make gets killed and doesn't > > clean up partial object files after it. > > Result is nasty errors from link. > > This hack checks object is we

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Stefan Hajnoczi
On Wed, May 22, 2013 at 12:46:45AM +0300, Michael S. Tsirkin wrote: > Once in a while make gets killed and doesn't > clean up partial object files after it. > Result is nasty errors from link. > This hack checks object is well formed before linking, > and rebuilds it if not. > > Signed-off-by: Mic

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2013 at 11:22:52AM +0200, Paolo Bonzini wrote: > Il 22/05/2013 10:52, Michael S. Tsirkin ha scritto: > > The fix is simple here: don't use ccache. I don't. > > > > In fact, from what I saw people use ccache to work around makefile bugs, > > so they can do make clean; make and have

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 10:52, Michael S. Tsirkin ha scritto: > The fix is simple here: don't use ccache. I don't. > > In fact, from what I saw people use ccache to work around makefile bugs, > so they can do make clean; make and have it finish quickly. > > Any other examples? Testing configure patches s

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2013 at 10:43:45AM +0200, Paolo Bonzini wrote: > Il 22/05/2013 10:38, Peter Maydell ha scritto: > > On 22 May 2013 09:37, Michael S. Tsirkin wrote: > >> It's my fault for running -rc kernels all the time I guess, I get > >> crashes kind of often, and losing more time on make clean

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2013 at 09:38:39AM +0100, Peter Maydell wrote: > On 22 May 2013 09:37, Michael S. Tsirkin wrote: > > It's my fault for running -rc kernels all the time I guess, I get > > crashes kind of often, and losing more time on make clean > > on top of reboot annoys me. > > But we actually c

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Paolo Bonzini
Il 22/05/2013 10:38, Peter Maydell ha scritto: > On 22 May 2013 09:37, Michael S. Tsirkin wrote: >> It's my fault for running -rc kernels all the time I guess, I get >> crashes kind of often, and losing more time on make clean >> on top of reboot annoys me. >> But we actually could make it robust,

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Peter Maydell
On 22 May 2013 09:37, Michael S. Tsirkin wrote: > It's my fault for running -rc kernels all the time I guess, I get > crashes kind of often, and losing more time on make clean > on top of reboot annoys me. > But we actually could make it robust, even against OS crash. Output to a > temporary file

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Michael S. Tsirkin
On Wed, May 22, 2013 at 09:44:04AM +0200, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Tue, May 21, 2013 at 11:01:05PM +0100, Peter Maydell wrote: > >> On 21 May 2013 22:46, Michael S. Tsirkin wrote: > >> > Once in a while make gets killed and doesn't > >> > clean up partial

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-22 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Tue, May 21, 2013 at 11:01:05PM +0100, Peter Maydell wrote: >> On 21 May 2013 22:46, Michael S. Tsirkin wrote: >> > Once in a while make gets killed and doesn't >> > clean up partial object files after it. >> > Result is nasty errors from link. >> > This hack ch

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-21 Thread Michael S. Tsirkin
On Tue, May 21, 2013 at 11:01:05PM +0100, Peter Maydell wrote: > On 21 May 2013 22:46, Michael S. Tsirkin wrote: > > Once in a while make gets killed and doesn't > > clean up partial object files after it. > > Result is nasty errors from link. > > This hack checks object is well formed before link

Re: [Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-21 Thread Peter Maydell
On 21 May 2013 22:46, Michael S. Tsirkin wrote: > Once in a while make gets killed and doesn't > clean up partial object files after it. > Result is nasty errors from link. > This hack checks object is well formed before linking, > and rebuilds it if not. > > Signed-off-by: Michael S. Tsirkin > -

[Qemu-devel] [PATCH] makefile: detect corrupted elf files

2013-05-21 Thread Michael S. Tsirkin
Once in a while make gets killed and doesn't clean up partial object files after it. Result is nasty errors from link. This hack checks object is well formed before linking, and rebuilds it if not. Signed-off-by: Michael S. Tsirkin --- Is below useful for others? Makefile.target | 7 +++ 1