From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPhDu-0002jK-UB for qemu-devel@nongnu.org; Thu, 26 May 2011 16:32:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPhDu-0008Ab-0J for qemu-devel@nongnu.org; Thu, 26 May 2011 16:32:02 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:49880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPhDt-0008AN-UH for qemu-devel@nongnu.org; Thu, 26 May 2011 16:32:01 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e4.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4QKAiVU015856 for ; Thu, 26 May 2011 16:10:44 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4QKVm9V106430 for ; Thu, 26 May 2011 16:31:48 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4QGVapF003867 for ; Thu, 26 May 2011 13:31:36 -0300 Received: from [9.59.241.154] (d941e-10.watson.ibm.com [9.59.241.154]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p4QGVa6B003849 for ; Thu, 26 May 2011 13:31:36 -0300 Message-ID: <4DDEB8B3.20807@linux.vnet.ibm.com> Date: Thu, 26 May 2011 16:31:47 -0400 From: Stefan Berger MIME-Version: 1.0 References: <4DDEA34C.4040304@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] host-pcc: enable building with -m32 or -m64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 05/26/2011 04:20 PM, Andreas F=E4rber wrote: > Am 26.05.2011 um 21:00 schrieb Stefan Berger: > >> With the below patch I can build either ppc (-m32) or ppc64 (-m64)=20 >> versions of Qemu (on a ppc64 host) when passing these compiler flags=20 >> via 'configure ... --extra-cflags=3D"-m32"'. > > You probably meant "without passing"? > > Nack. Please don't hardcode -mXX in configure, it's -arch ppc vs.=20 > -arch ppc64 on my host/gcc. What's wrong with passing --extra-cflags? > I posted the following patch today for compiling libcacard with -m32 on=20 a 64 bit machine. http://lists.nongnu.org/archive/html/qemu-devel/2011-05/msg02909.html It adds LDFLAGS. This works fine on x86-64. Then trying this out on=20 ppc64 with -m32 in extra-cflags I find the following in config-host.mak [...] HELPER_CFLAGS=3D LDFLAGS=3D-Wl,--warn-common -g ARLIBS_BEGIN=3D [...] The -m32 doesn't make it into LDFLAGS. The below patch fixed it for me=20 following the pattern of x86-64 and i686 a bit further up in the case=20 statement in configure. Stefan > Andreas > >> Signed-off-by: Stefan Berger >> >> --- >> configure | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> Index: qemu-git/configure >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- qemu-git.orig/configure >> +++ qemu-git/configure >> @@ -807,7 +807,14 @@ case "$cpu" in >> arm*) >> host_guest_base=3D"yes" >> ;; >> - ppc*) >> + ppc) >> + QEMU_CFLAGS=3D"-m32 $QEMU_CFLAGS" >> + LDFLAGS=3D"-m32 $LDFLAGS" >> + host_guest_base=3D"yes" >> + ;; >> + ppc64) >> + QEMU_CFLAGS=3D"-m64 $QEMU_CFLAGS" >> + LDFLAGS=3D"-m64 $LDFLAGS" >> host_guest_base=3D"yes" >> ;; >> mips*) > > >