All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] host-pcc: enable building with -m32 or -m64
Date: Sun, 29 May 2011 18:07:45 -0400	[thread overview]
Message-ID: <4DE2C3B1.6060209@linux.vnet.ibm.com> (raw)
In-Reply-To: <6768C91F-25A5-4A55-B84F-E5EAB67D3762@web.de>

On 05/29/2011 05:09 PM, Andreas Färber wrote:
> Am 27.05.2011 um 00:25 schrieb Stefan Berger:
>
>> 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, I rather care about where this is going, and my unanswered 
> question is: Does it work if you use --extra-cflags=-m32 
> --extra-ldflags=-m32?
> If yes, then we can drop this patch and be good. Otherwise we need to 
> think about a better solution.
>
It works as you show above once this patch here has been applied:

http://lists.nongnu.org/archive/html/qemu-devel/2011-05/msg02909.html

    Stefan

  reply	other threads:[~2011-05-29 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 19:00 [Qemu-devel] [PATCH] host-pcc: enable building with -m32 or -m64 Stefan Berger
2011-05-26 19:14 ` malc
2011-05-26 19:27   ` Stefan Berger
2011-05-26 20:20 ` Andreas Färber
2011-05-26 20:31   ` Stefan Berger
2011-05-26 20:42     ` malc
2011-05-26 21:24     ` Andreas Färber
2011-05-26 22:25       ` Stefan Berger
2011-05-29 21:09         ` Andreas Färber
2011-05-29 22:07           ` Stefan Berger [this message]
2011-05-27  7:12 ` 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=4DE2C3B1.6060209@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=andreas.faerber@web.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.