http://bugs.winehq.org/show_bug.cgi?id=17753
--- Comment #8 from ryan woodsmall rwoodsmall@mac.com 2009-03-16 00:56:07 --- Looks like winegcc is passing the "--main-module" option to winebuild by default. From the generated tools/winegcc/wine/Makefile:
.spec.spec.o: $(WINEBUILD) $(WINEBUILDFLAGS) --dll -o $@ --main-module $(MODULE) --export $<
The tools/winebuild/main.c now sets spec->main_module when called with -M/--main-module. The case statement for this option is around ~362, and simply does the following:
spec->main_module = xstrdup( optarg );
A check later in the file for spec->main_module looks to always be getting hit, then an attempt to build the 16-bit spec errors out with the 'stdcall' warnings I'm seeing. Around line 586 of tools/winebuild/main.c:
if (spec->type == SPEC_WIN32 && spec->main_module) /* embedded 16-bit module */ { spec->type = SPEC_WIN16; load_resources( argv, spec ); if (parse_input_file( spec )) BuildSpec16File( spec ); break; }
If the above "if(){}" block is commented out and Wine rebuilt, it compiles, installs and runs on my Mac successfully. A couple of test programs (Windows Firefox 2, Gothic DirectX game) work successfully under 1.1.17. Is there a quick check that can be done to determine if win16 compatibility has been requested, and the code above wrapped in it? Or is that a bad idea? I'm unsure of the implications of making that change, so I'll defer to those who know way more about this than I for the time being.