Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 57453

Summary: qemu-0.5.5-r1 and qemu-0.6.0 fail to build softmmu-i386 target on x86 with GCC 3.4.0
Product: Gentoo Linux Reporter: Steven Wilson <excyber>
Component: Current packagesAssignee: Luca Barbato <lu_zero>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Steven Wilson 2004-07-17 23:39:06 UTC
If the softmmu USE flag is enabled, qemu compilation fails with the following error:

gcc -Wall -O2 -g -fomit-frame-pointer -mpreferred-stack-boundary=2 -falign-functions=0 -fno-reorder-blocks -fno-optimize-sibling-calls -I. -I/var/tmp/portage/qemu-0.5.5-r1/work/qemu-0.5.5/target-i386 -I/var/tmp/portage/qemu-0.5.5-r1/work/qemu-0.5.5 -D_GNU_SOURCE -I/var/tmp/portage/qemu-0.5.5-r1/work/qemu-0.5.5/slirp -c -o op.o /var/tmp/portage/qemu-0.5.5-r1/work/qemu-0.5.5/target-i386/op.c
/var/tmp/portage/qemu-0.5.5-r1/work/qemu-0.5.5/target-i386/ops_template_mem.h: In function `op_rolb_kernel_T0_T1_cc':
/var/tmp/portage/qemu-0.5.5-r1/work/qemu-0.5.5/softmmu_header.h:179: error: can't find a register in class `GENERAL_REGS' while reloading `asm'
make[1]: *** [op.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/qemu-0.5.5-r1/work/qemu-0.5.5/i386-softmmu'
make: *** [all] Error 1

!!! ERROR: app-emulation/qemu-0.5.5-r1 failed.
!!! Function src_compile, Line 43, Exitcode 2
!!! make failed

This seems to specifically be a problem with -fgcse, which is enabled by -O2 (qemu defines its own CFLAGS). Adding -fno-gcse to OP_CFLAGS in the architecture-dependent section of Makefile.target removes the error on both 0.5.5-r1 and 0.6.0.
Comment 1 Hanno Böck gentoo-dev 2004-09-25 04:18:56 UTC

*** This bug has been marked as a duplicate of 64858 ***