qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: "Rainer Müller" <raimue@codingfarm.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2
Date: Tue, 10 Jun 2014 18:41:31 +0800	[thread overview]
Message-ID: <20140610104131.GD11308@T430.nay.redhat.com> (raw)
In-Reply-To: <5396DCA4.5090909@codingfarm.de>

On Tue, 06/10 12:23, Rainer Müller wrote:
> On 2014-06-06 04:04, Fam Zheng wrote:
> >> Ugh. This was supposed to be fixed by commit 6295b98d7b767c.
> >> Fam, can you re-check your fix, please?
> >>
> > 
> > I don't understand that fix now, looks like it was moved onto a wrong list.
> > 
> > Rainer, does this below patch work for you? (we can't duplicate object, so sort
> > is required there).
> 
> No, unfortunately this does not work. With this patch, I end up with:
> 
> $ make V=1 qemu-img
> ...
> ... qemu-img.o qemu-io-cmds.o qemu-timer.o thread-pool.o libqemuutil.a libqemustub.a  -lz -L/opt/local/lib -lcurl -L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -arch -lcurl -lssh2 -lz x86_64 -L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl   -lz -lz
> clang: error: no such file or directory: 'x86_64'
> clang: error: invalid arch name '-arch -lcurl'
> make: *** [qemu-img] Error 1
> 
> 
> You really can't just sort the words as their order is important, at 
> least for some options such as "-arch" and its argument.
> 
> From config-host.mak:
> 
>   LIBSSH2_LIBS=-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_names -arch x86_64
> 
> I don't understand the make function $(extract-libs) here. First the 
> contents of $o-libs is added as-is, but then it is added again filtered 
> through $(expand-objs). What is the purpose of adding it twice?

Good question. $(extract-libs) and $(expand-objs) are always used together, so
I think we can drop it, together with the sort, hoping it works this time:

diff --git a/rules.mak b/rules.mak
index b12d312..1513b0f 100644
--- a/rules.mak
+++ b/rules.mak
@@ -23,8 +23,7 @@ QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
 QEMU_INCLUDES += -I$(<D) -I$(@D)

 maybe-add = $(filter-out $1, $2) $1
-extract-libs = $(strip $(sort $(foreach o,$1,$($o-libs))) \
-                  $(foreach o,$(call expand-objs,$1),$($o-libs)))
+extract-libs = $(strip $(foreach o,$1,$($o-libs)))
 expand-objs = $(strip $(sort $(filter %.o,$1)) \
                   $(foreach o,$(filter %.mo,$1),$($o-objs)) \
                   $(filter-out %.o %.mo,$1))

  reply	other threads:[~2014-06-10 10:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 17:45 [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 Christian Mahnke
2014-03-13 18:05 ` Peter Maydell
2014-03-13 18:34   ` Christian Mahnke
     [not found]   ` <CAKKtb+szAOsdt2po3Yw=51YG-3qQ31rFb8oqD-HiRAgLevvcvg@mail.gmail.com>
2014-03-13 18:35     ` Peter Maydell
2014-03-13 18:42       ` Christian Mahnke
2014-03-13 18:48         ` Peter Maydell
2014-03-13 18:53           ` Christian Mahnke
2014-03-14 12:29           ` Paolo Bonzini
2014-06-05 13:38             ` Rainer Müller
2014-06-05 16:11               ` Peter Maydell
2014-06-06  2:04                 ` Fam Zheng
2014-06-10 10:23                   ` Rainer Müller
2014-06-10 10:41                     ` Fam Zheng [this message]
2014-06-10 11:19                     ` Paolo Bonzini

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=20140610104131.GD11308@T430.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raimue@codingfarm.de \
    /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).