qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv2 RFC] makefile: detect corrupted elf files
Date: Wed, 22 May 2013 08:32:52 +0200	[thread overview]
Message-ID: <519C6694.4020905@weilnetz.de> (raw)
In-Reply-To: <20130521220709.GA26328@redhat.com>

Am 22.05.2013 00:07, schrieb 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 <mst@redhat.com>
> ---
>
> v1 actually prints some noise on stderr, this shuts it up.
>
>  Makefile.target | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/Makefile.target b/Makefile.target
> index ce4391f..c506d4c 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -191,3 +191,10 @@ endif
>  
>  GENERATED_HEADERS += config-target.h
>  Makefile: $(GENERATED_HEADERS)
> +
> +.SECONDEXPANSION:
> +
> +.PHONY: CORRUPTBINARY
> +
> +$(all-obj-y): % : $$(if $$(shell size % 2>/dev/null), , CORRUPTBINARY)
> +


This modification adds build complexity and execution time for
each build, just to fix a potential problem which is very rare.

I personally prefer the current solution (remove bad object files
manually).

I did not test the patch, but won't cross builds be caught in an
endless loop when the native size command does not know the
cross object format?

Regards,
Stefan

  reply	other threads:[~2013-05-22  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 22:07 [Qemu-devel] [PATCHv2 RFC] makefile: detect corrupted elf files Michael S. Tsirkin
2013-05-22  6:32 ` Stefan Weil [this message]
2013-05-22  7:28   ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519C6694.4020905@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).