From patchwork Tue Jun 10 10:41:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 357839 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 11B23140076 for ; Tue, 10 Jun 2014 20:41:53 +1000 (EST) Received: from localhost ([::1]:38136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuJV0-0003At-SU for incoming@patchwork.ozlabs.org; Tue, 10 Jun 2014 06:41:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuJUd-0002u4-On for qemu-devel@nongnu.org; Tue, 10 Jun 2014 06:41:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuJUX-0005SH-L5 for qemu-devel@nongnu.org; Tue, 10 Jun 2014 06:41:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuJUX-0005SD-Ca for qemu-devel@nongnu.org; Tue, 10 Jun 2014 06:41:21 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5AAfGwO016460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jun 2014 06:41:17 -0400 Received: from localhost (dhcp-14-247.nay.redhat.com [10.66.14.247]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5AAfEZM019156; Tue, 10 Jun 2014 06:41:15 -0400 Date: Tue, 10 Jun 2014 18:41:31 +0800 From: Fam Zheng To: Rainer =?iso-8859-1?Q?M=FCller?= Message-ID: <20140610104131.GD11308@T430.nay.redhat.com> References: <5322F612.6070708@redhat.com> <20140606020418.GF10963@T430.nay.redhat.com> <5396DCA4.5090909@codingfarm.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5396DCA4.5090909@codingfarm.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id s5AAfGwO016460 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , QEMU Developers Subject: Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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$(