Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345789 - app-emulation/wine should filter flags instead of USE=custom-cflags
Summary: app-emulation/wine should filter flags instead of USE=custom-cflags
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-16 18:41 UTC by Andreas Eriksson
Modified: 2010-11-17 05:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Eriksson 2010-11-16 18:41:02 UTC
Hi.

The wine ebuilds currently has a custom-cflags use flag. I can't find the bug reports in question at the moment that got this added, but this was probably added because of bug reports where wine broke for no apperant reasons with normal-looking cflags, but worked with the default ones.

I believe I have tracked down the specific issue, and in my testing wine works fine with all normal cflags (and some unusual ones) except for this specific issue. So it might be beneficial to remove the custom-cflags use flag and just add a workaround for this issue instead. Or if the custom-cflags use flag is kept at least add a workaround for this issue when that flag is used so the wine doesn't break for people who turn this on.

The issue is that when you're on a x86-64 platform wine needs to be built with a -march flag of a pre-amd64 cpu. If its built with, for example, -march=k8 or -march=native on a amd64 cpu wine will build fine, and some apps will start fine in wine, but other apps will randomly crash and wine will generally exhibit strange behavior. If you instead do -march=i686 or some other x86-only cpu wine will work fine. So downgrading march to -march=i686 for x86-64 platforms should fix any problems caused by custom cflags. Specifying a -mtune for the amd64 cpu to optimize for the cpu you have still works. All other cflags I've tried also produces a stable wine build as long as -march is set to a pre-amd64 cpu.
Comment 1 SpanKY gentoo-dev 2010-11-17 05:32:06 UTC
it dates back to the beginning and is a mix of misbehavior and angry upstream.  and it's in the ChangeLog :P.

*wine-20020310-r1 (29 Mar 2002)

  29 Mar 2002; Dan Armak <danarmak@gentoo.org>: fix bug 1373: disable custom optimizations, or the resulting wine won't work properly and will make the hardworking folks at #winehq really really angry

there have been other random wine failures over time due to optimizations (such as the -fomit-frame-pointer bug that broke all of wine in the late 2004 era).  i'd like to think things are more stable now (and they probably are), but it's really not worth my time to assume everything is great in the default case.