From mboxrd@z Thu Jan 1 00:00:00 1970 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 Date: Tue, 10 Jun 2014 18:41:31 +0800 From: Fam Zheng 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-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <5396DCA4.5090909@codingfarm.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Problems compiling HEAD on Mac OS X 10.9.2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rainer =?iso-8859-1?Q?M=FCller?= Cc: Peter Maydell , QEMU Developers On Tue, 06/10 12:23, Rainer M=FCller 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? > >> > >=20 > > I don't understand that fix now, looks like it was moved onto a wrong= list. > >=20 > > Rainer, does this below patch work for you? (we can't duplicate objec= t, so sort > > is required there). >=20 > No, unfortunately this does not work. With this patch, I end up with: >=20 > $ make V=3D1 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,-h= eaderpad_max_install_names -arch x86_64 -L/opt/local/lib -Wl,-headerpad_m= ax_install_names -arch -lcurl -lssh2 -lz x86_64 -L/opt/local/lib -lgthrea= d-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 >=20 >=20 > You really can't just sort the words as their order is important, at=20 > least for some options such as "-arch" and its argument. >=20 > From config-host.mak: >=20 > LIBSSH2_LIBS=3D-L/opt/local/lib -lssh2 -Wl,-headerpad_max_install_nam= es -arch x86_64 >=20 > I don't understand the make function $(extract-libs) here. First the=20 > contents of $o-libs is added as-is, but then it is added again filtered= =20 > through $(expand-objs). What is the purpose of adding it twice? Good question. $(extract-libs) and $(expand-objs) are always used togethe= r, 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 +=3D -MMD -MP -MT $@ -MF $(*D)/$(*F).d QEMU_INCLUDES +=3D -I$(