Subject: Re: qemu (0.8.0) and MMX/SSE errors
To: None <joel@carnat.net>
From: Tobias Nygren <tnn@netilium.org>
List: tech-pkg
Date: 01/17/2006 05:50:10
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.

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

--
-Tobias