The flag does nothing if -nodefaultlibs or -nostdlib be given, because the driver does not automatically link to libgcc/compiler-rt in that case. Clang will warn about this, which is annoying, which clutters up the output, and which makes it impossible to use -Werror when building with Clang.
Signed-off-by: Chip Davis cdavis@codeweavers.com --- tools/winegcc/winegcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 026bfe35de3..c72d1c84a16 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -508,7 +508,7 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) strarray_add( flags, "-Wl,--large-address-aware" );
/* make sure we don't need a libgcc_s dll on Windows */ - strarray_add( flags, "-static-libgcc" ); + if (!opts->nodefaultlibs && !opts->use_msvcrt) strarray_add( flags, "-static-libgcc" );
strarray_addall( link_args, flags ); return link_args;
Hi Chip,
On 05.04.2020 22:08, Chip Davis wrote:
The flag does nothing if -nodefaultlibs or -nostdlib be given, because the driver does not automatically link to libgcc/compiler-rt in that case. Clang will warn about this, which is annoying, which clutters up the output, and which makes it impossible to use -Werror when building with Clang.
Signed-off-by: Chip Davis cdavis@codeweavers.com
tools/winegcc/winegcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 026bfe35de3..c72d1c84a16 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -508,7 +508,7 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) strarray_add( flags, "-Wl,--large-address-aware" );
/* make sure we don't need a libgcc_s dll on Windows */
strarray_add( flags, "-static-libgcc" );
if (!opts->nodefaultlibs && !opts->use_msvcrt) strarray_add( flags, "-static-libgcc" );
Shouldn't we still use it in find_libgcc?
Thanks,
Jacek