qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] host-pcc: enable building with -m32 or -m64


From: Stefan Berger
Subject: Re: [Qemu-devel] [PATCH] host-pcc: enable building with -m32 or -m64
Date: Thu, 26 May 2011 18:25:24 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.10

On 05/26/2011 05:24 PM, Andreas Färber wrote:
Am 26.05.2011 um 22:31 schrieb Stefan Berger:

On 05/26/2011 04:20 PM, Andreas Färber wrote:
Am 26.05.2011 um 21:00 schrieb Stefan Berger:

With the below patch I can build either ppc (-m32) or ppc64 (-m64) versions of Qemu (on a ppc64 host) when passing these compiler flags via 'configure ... --extra-cflags="-m32"'.

You probably meant "without passing"?

Nack. Please don't hardcode -mXX in configure, it's -arch ppc vs. -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 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 ppc64 with -m32 in extra-cflags I find the following in config-host.mak

[...]
HELPER_CFLAGS=
LDFLAGS=-Wl,--warn-common -g
ARLIBS_BEGIN=
[...]

The -m32 doesn't make it into LDFLAGS. The below patch fixed it for me following the pattern of x86-64 and i686 a bit further up in the case statement in configure.

Erm, you did try --extra-ldflags for LDFLAGS, did you? That --extra-cflags doesn't end up there is intentional!

No, I didn't. Here's what happened. On x86_64 host I used to be able to compile 32bit executables with --extra-cflags="-m32". That stopped working when libcacard showed up -- I posted a patch today -- only the linking of vscclient in libcacard/ didn't work. The "work-around" before the patch was --disable-smartcard. Now taking that same habit of passing --extra-cflags="-m32" to the ppc64 machine again didn't work, but was broken somewhere else. So this is where this is all coming from.

   Stefan

Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]