Simplifies the code & fixes bugs: + -L shouldn't set has_output_name + winewrap shouldn't SEGV with no arguments)
Uses a.out to retain compatibility with external code (eg maybe wxwindows) even though it's not compatible with mingw
Changelog Handle default linker output name in winewrap instead of winegcc
diff -u -r tools/winegcc.0/winegcc.c tools/winegcc/winegcc.c --- tools/winegcc.0/winegcc.c 2003-09-16 08:08:11.000000000 +0100 +++ tools/winegcc/winegcc.c 2003-09-17 14:11:48.000000000 +0100 @@ -167,10 +167,8 @@ gcc_argv = strarray_alloc(); - i = 0; if (linking) { - int has_output_name = 0; int has_input_files = 0; strarray *copy_argv; @@ -202,7 +200,6 @@ argv[j] = 0; strarray_add(gcc_argv, argv[++j]); } - has_output_name = 1; argv[j] = 0; break; case 'l': @@ -223,12 +220,6 @@ if (has_input_files) { - /* Support the a.out default name, to appease configure */ - if (!has_output_name) - { - strarray_add(gcc_argv, "-o"); - strarray_add(gcc_argv, "a.out"); - } if (use_stdlib && use_msvcrt) strarray_add(gcc_argv, "-lmsvcrt"); if (gui_app) strarray_add(gcc_argv, "-lcomdlg32"); strarray_add(gcc_argv, "-ladvapi32"); diff -u -r tools/winegcc.0/winewrap.c tools/winegcc/winewrap.c --- tools/winegcc.0/winewrap.c 2003-09-17 12:33:07.000000000 +0100 +++ tools/winegcc/winewrap.c 2003-09-17 14:12:20.000000000 +0100 @@ -210,7 +210,7 @@ "}\n" ; -static char *output_name; +static char *output_name = "a.out"; static strarray *arh_files, *dll_files, *lib_files, *llib_paths, *lib_paths, *obj_files; static int keep_generated = 0;