[Bug 48693] -O2 optimization breaks 32 bit wine 3D on 64 bit system

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 16 02:50:15 PDT 2012


--- Comment #4 from Christoph Haag <haagch.christoph at googlemail.com> 2012-04-16 02:50:15 PDT ---
(In reply to comment #3)
> Does it work with -O2 -fno-strict-aliasing? The Mesa tree is known not to be
> strict aliasing clean. If that's not it, maybe you can isolate the specific
> optimization enabled by -O2 but not -O1 which triggers the crash.
> I suspect this bug may be invalid anyway though: you shouldn't set CFLAGS
> directly but use OPT_FLAGS and friends.

Well, I set it to -O2 for testing. Archlinux does set the CFLAGS so if this is
wrong, Archlinux is doing it wrong?

Archlinux's default CFLAGS are by the way:
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
(I personally use -march=native)

So I tried setting my CFLAGS to CFLAGS="$CFLAGS -fno-strict-aliasing".

Compiling lib32 mesa looks like this now:

gcc -m32 -c -I. -I../../../src/gallium/include -I../../../src/gallium/auxiliary
-I../../../src/gallium/drivers  -march=native -fomit-frame-pointer -O2 -pipe
-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
-fno-strict-aliasing -Wall -std=c99 -Werror=implicit-function-declaration
-Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -m32
-march=native -fomit-frame-pointer -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing  -fPIC -m32
-DHAVE_LLVM=0x0300 -fvisibility=hidden -I/usr/include   -D_GNU_SOURCE
util/u_rect.c -o util/u_rect.o

-fno-strict-aliasing does not fix the wine crashes.

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the dri-devel mailing list