Subject: Re: Re: qemu (0.8.0) and MMX/SSE errors
To: Tobias Nygren <tnn@netilium.org>
From: Joel CARNAT <joel@carnat.net>
List: tech-pkg
Date: 01/17/2006 10:13:54
Dans l'épisode précédent (Tue, Jan 17 2006 - 05:50), Tobias Nygren nous apprenait que :
> Joel CARNAT wrote:
> >Hi,
> >
> >I'm trying CFLAGS for my Pentium4 processor and QEmu seem to have issue
> >with them. Flags are set (in mk.conf) as follow :
> >#########################
> >PKGSRC_CPUFLAGS=-march=pentium4 -mfpmath=sse -mmmx -msse -msse2
> >PKGSRC_CFLAGS=-Os -pipe
> >COPTS+=${PKGSRC_CFLAGS} ${PKGSRC_CPUFLAGS}
> >CFLAGS+=${PKGSRC_CFLAGS} ${PKGSRC_CPUFLAGS}
> >CXXFLAGS+=${PKGSRC_CFLAGS} ${PKGSRC_CPUFLAGS}
> >#########################
> >
> >I've attached the error (to have a clean mail content ;)
> >When not using MMX and SSE CFLAGS ("PKGSRC_CPUFLAGS=-march=pentium4"),
> >qemu compiles OK.
> >
> >According to qemu changelog (0.7.0), it should be able to use
> >"MMX/SSE/SSE2/PNI support". Is the issue worth a PR ?
> 
> This is a known problem. In fact, the qemu package disables
> march if set. It doesn't catch -mmx though.
> 

OK.

> # Remove -march/-mcpu from CFLAGS, otherwise it will fail
> # to build in the SSE code.
> BUILDLINK_TRANSFORM+=   rm-optarg:-march rm-optarg:-mcpu
> 

as I understand this flags, it means "automatically remove unwanted
CFLAGS", right ? if so, this line was in the Makefile when I use my
personal CFLAGS and flags weren't removed at compile time.

I did another testing ("PKGSRC_CPUFLAGS=-mfpmath=sse -msse -msse2")
which leads to the same result (error in "op_psrlq_mmx" bla bla). Maybe
setting SSE flags implies some kind of "mcpu/march" in gcc that make the
compile fail ?