http://bugs.winehq.org/show_bug.cgi?id=22925
--- Comment #3 from Vitaliy Margolen vitaliy@kievinfo.com 2010-05-29 12:15:19 --- AJ is talking about DLL as a whole (no need to compile individual files from each dll with -O0/-O2).
You can compile Wine with -O0, copy all dll.so files into safe place, recompile Wine with -O2. Then more one -O0 dll at a time into compile dir and test if your program still works.