All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Bruno <sbruno@ignoranthack.me>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <famz@redhat.com>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk
Date: Mon, 16 Jun 2014 07:20:54 -0700	[thread overview]
Message-ID: <1402928454.16961.4.camel@bruno> (raw)
In-Reply-To: <539EFC0A.2070201@redhat.com>

On Mon, 2014-06-16 at 16:15 +0200, Paolo Bonzini wrote:
> Il 16/06/2014 15:58, Sean Bruno ha scritto:
> > On Mon, 2014-06-16 at 06:55 -0700, Sean Bruno wrote:
> >>>> Sean, could you show the configure command line?
> >>>
> >>> Also please attach the "make V=1" output and config-host.mak file.
> >>>
> >>> Paolo
> >>>
> >>>
> >>
> >> I'm using:
> >>
> >>  ./configure --static --target-list="i386-bsd-user sparc-bsd-user
> >> sparc64-bsd-user x86_64-bsd-user"
> >>
> >> Log:
> >> http://people.freebsd.org/~sbruno/qemu_build_fail.txt
> >>
> >> sean
> >>
> >>
> >
> > Also, configure output
> >
> > http://people.freebsd.org/~sbruno/qemu_user_configure.txt
> 
> So this is happening because the $(sort) removes the ordering between 
> libraries and breaks static linking.  Your patch likely does nothing 
> except adding more copies of the libraries, which lets the linker work.
> 
> The executable that breaks is qemu-nbd, which I suspect you couldn't 
> care less about.
> 
> The bug remains, and ought to be fixed, probably like this:
> 
> diff --git a/rules.mak b/rules.mak
> index dde8e00..50b305e 100644
> --- a/rules.mak
> +++ b/rules.mak
> @@ -22,7 +22,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
>   # Same as -I$(SRC_PATH) -I., but for the nested source/object directories
>   QEMU_INCLUDES += -I$(<D) -I$(@D)
> 
> -extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))))
> +extract-libs = $(foreach o,$1,$($o-libs))
>   expand-objs = $(strip $(sort $(filter %.o,$1)) \
>                     $(foreach o,$(filter %.mo,$1),$($o-objs)) \
>                     $(filter-out %.o %.mo,$1))
> 
> but the other question is: do we care about static linking of anything 
> except the user-mode emulators?  Should --static automatically imply 
> --disable-tools --disable-system?
> 
> Paolo


Seems like this works for me on FreeBSD with my test case.  

sean

  reply	other threads:[~2014-06-16 14:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15 20:47 [Qemu-devel] [PATCH 0/3 v2] bsd-user: Fix linking/dependency issues Sean Bruno
2014-06-15 20:47 ` [Qemu-devel] [PATCH 1/3 v2] bsd-user: Revert part of update to rules.mk Sean Bruno
2014-06-16  7:36   ` Peter Maydell
2014-06-16  9:12     ` Fam Zheng
2014-06-16 10:08       ` Paolo Bonzini
2014-06-16 13:55         ` Sean Bruno
2014-06-16 13:58           ` Sean Bruno
2014-06-16 14:15             ` Paolo Bonzini
2014-06-16 14:20               ` Sean Bruno [this message]
2014-06-16 14:57               ` Peter Maydell
2014-06-15 20:47 ` [Qemu-devel] [PATCH 2/3 v2] bsd-user: Add patches to fix AES_* link errors Sean Bruno
2014-06-15 20:47 ` [Qemu-devel] [PATCH 3/3 v2] bsd-user: Implement strace support for getcwd syscall Sean Bruno

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=1402928454.16961.4.camel@bruno \
    --to=sbruno@ignoranthack.me \
    --cc=famz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sbruno@freebsd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.