Skip to contentSkip to conversation

qemu 32 bits on AMD64

Qemu-devel [email protected] 2 participants 4 messages Mar 7, 2005 – Mar 14, 2005

lore
Share & tools
lore
#0 lore raw

I have read the posts about the gcc "internal compiler error: Segmentation fault" on x86_64. ok. I have just tried with CVS (7 feb 2005 ) . I use gcc-3.4.1-4mdk on Mandrake 10.1-64.
How can I tell ./configure to compile as a x86_32 program on a 64 bits machine ?

#1 lore raw
Quoted 11 lines · On Mon, 2005-03-07 at 07:41 -0500, [email protected] wrote:

I have read the posts about the gcc "internal compiler error: Segmentation fault" on x86_64. ok. I have just tried with CVS (7 feb 2005 ) . I use gcc-3.4.1-4mdk on Mandrake 10.1-64.
How can I tell ./configure to compile as a x86_32 program on a 64 bits machine ?

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Disclaimer: The following worked for me Fedora Core 3 x86_64 - I don't use Mandrake, and this solution may not work for you.

$ linux32 /bin/bash

This should make sure that your 'arch' is recognized as i686 instead of x86_64

$ CC="gcc -m32" LD="ld -m32" ./configure <extra-options-that-you-want>

Should set you up for compiling and linking 32-bit binaries.

$ make

Sincerely,

Bob Deblier

#2 lore raw
Quoted 4 lines · Bob Deblier

Disclaimer: The following worked for me Fedora Core 3 x86_64 - I don't use Mandrake, and this solution may not work for you.

$ linux32 /bin/bash

=> OK
I did not know "linux32"

Quoted 4 lines

This should make sure that your 'arch' is recognized as i686 instead of x86_64

$ CC="gcc -m32" LD="ld -m32" ./configure <extra-options-that-you-want>
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /home/ds/install/qemu/cvs/qemu
C compiler        gcc
make              make
host CPU          i386
host big endian   no
target list       i386-user arm-user armeb-user sparc-user ppc-user 
i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu
gprof enabled     no
static build      no
SDL support       yes
SDL static link   yes
mingw32 support   no
Adlib support     no
FMOD support      no

=>OK

Quoted 3 lines

Should set you up for compiling and linking 32-bit binaries.

$ make

/home/moi/install/qemu/cvs/qemu/target-i386/op.c:1: error:
-mpreferred-stack-boundary=2 is not between 4 and 12 make[1]: *** [op.o] Error 1
make[1]: Leaving directory `/home/moi/install/qemu/cvs/qemu/i386-user'
make: *** [all] Error 1

Have you already seen this ?

#3 lore raw
Quoted 8 lines · On Mon, 2005-03-14 at 09:43 +0000, [email protected] wrote:
Quoted 1 line
$ make

/home/moi/install/qemu/cvs/qemu/target-i386/op.c:1: error:
-mpreferred-stack-boundary=2 is not between 4 and 12 make[1]: *** [op.o] Error 1
make[1]: Leaving directory `/home/moi/install/qemu/cvs/qemu/i386-user'
make: *** [all] Error 1

Have you already seen this ?

Yes, I've run into this problem too. I had to work around that with the following patch:

diff -p -r1.62 Makefile.target
*** Makefile.target 13 Mar 2005 16:52:10 -0000 1.62
--- Makefile.target 14 Mar 2005 09:17:00 -0000
*************** endif
*** 120,126 ****

ifeq ($(ARCH),i386) CFLAGS+=-fomit-frame-pointer
! OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2
ifeq ($(HAVE_GCC3_OPTIONS),yes) OP_CFLAGS+= -falign-functions=0 -fno-gcse else
--- 120,126 ----

ifeq ($(ARCH),i386) CFLAGS+=-fomit-frame-pointer
! OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=4
ifeq ($(HAVE_GCC3_OPTIONS),yes) OP_CFLAGS+= -falign-functions=0 -fno-gcse else

Sincerely,

Bob Deblier