From: Jacek Caban jacek@codeweavers.com
It's no longer needed, we use -nodefaultlibs anyway. Fixes clang MSVC build that expects foo.lib file name when using -lfoo. --- tools/winegcc/winegcc.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index e40aa9270ec..7b4f0ea6b7b 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -1342,29 +1342,14 @@ static void build(struct options* opts) strarray_add(&link_args, name); break; case 'a': - if (!opts->use_msvcrt && !opts->lib_suffix && strchr(name, '/')) + /* don't link to ntdll or ntoskrnl in non-msvcrt mode + * since they export CRT functions */ + if (!opts->use_msvcrt && !is_pe && strchr(name, '/')) { - /* turn the path back into -Ldir -lfoo options - * this makes sure that we use the specified libs even - * when mingw adds its own import libs to the link */ const char *p = get_basename( name );
- if (is_pe) - { - if (!strncmp( p, "lib", 3 ) && strcmp( p, "libmsvcrt.a" )) - { - strarray_add(&link_args, strmake("-L%s", get_dirname(name) )); - strarray_add(&link_args, strmake("-l%s", get_basename_noext( p + 3 ))); - break; - } - } - else - { - /* don't link to ntdll or ntoskrnl in non-msvcrt mode - * since they export CRT functions */ - if (!strcmp( p, "libntdll.a" )) break; - if (!strcmp( p, "libntoskrnl.a" )) break; - } + if (!strcmp( p, "libntdll.a" )) break; + if (!strcmp( p, "libntoskrnl.a" )) break; } strarray_add(&link_args, name); break;