Patchwork [testsuite] : Fix regressions in gcc-c-torture's builtin-tests using LTO on mingw-targets

login
register
mail settings
Submitter Kai Tietz
Date March 8, 2013, 12:19 p.m.
Message ID <CAEwic4Z+NGeWL-pSA=iFGCZYTRU9eMi=TNsmEi4_NaF7QkVpFA@mail.gmail.com>
Download mbox | patch
Permalink /patch/226098/
State New
Headers show

Comments

Kai Tietz - March 8, 2013, 12:19 p.m.
Hello,

this patch fixes 23 regressions about LTO and double-defined symbols for
memcpy/memset.  Issue is that for mingw-targets the C-runtime functions aren't
weak and not necessarily overridable.

ChangeLog

2013-03-08  Kai Tietz  <ktietz@redhat.com>

	* gcc.c-torture/execute/builtins/builtins.exp: Add for mingw
	targets linker option --allow-multiple-definition.

Ok for apply ?

Regards,
Kai
Rainer Orth - March 8, 2013, 12:23 p.m.
Hi Kai,

> Index: builtins.exp
> ===================================================================
> --- builtins.exp        (Revision 196543)
> +++ builtins.exp        (Arbeitskopie)
> @@ -42,6 +42,7 @@ if [istarget "powerpc-*-darwin*"] {
>     lappend additional_flags "-Wl,-multiply_defined,suppress"
>  }
>  if { [istarget *-*-eabi*]
> +     || [istarget *-*-mingw*]
>       || [istarget *-*-elf] } {

please keep the list sorted.

Thanks.
        Rainer
Kai Tietz - March 8, 2013, 1:11 p.m.
2013/3/8 Rainer Orth <ro@cebitec.uni-bielefeld.de>:
> Hi Kai,
>
>> Index: builtins.exp
>> ===================================================================
>> --- builtins.exp        (Revision 196543)
>> +++ builtins.exp        (Arbeitskopie)
>> @@ -42,6 +42,7 @@ if [istarget "powerpc-*-darwin*"] {
>>     lappend additional_flags "-Wl,-multiply_defined,suppress"
>>  }
>>  if { [istarget *-*-eabi*]
>> +     || [istarget *-*-mingw*]
>>       || [istarget *-*-elf] } {
>
> please keep the list sorted.
>
> Thanks.
>         Rainer

Applied after adjusting.

Thanks,
Kai

Patch

Index: builtins.exp
===================================================================
--- builtins.exp        (Revision 196543)
+++ builtins.exp        (Arbeitskopie)
@@ -42,6 +42,7 @@  if [istarget "powerpc-*-darwin*"] {
    lappend additional_flags "-Wl,-multiply_defined,suppress"
 }
 if { [istarget *-*-eabi*]
+     || [istarget *-*-mingw*]
      || [istarget *-*-elf] } {
    lappend additional_flags "-Wl,--allow-multiple-definition"
 }