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

Submitted by Kai Tietz on March 8, 2013, 12:19 p.m.

Details

Message ID CAEwic4Z+NGeWL-pSA=iFGCZYTRU9eMi=TNsmEi4_NaF7QkVpFA@mail.gmail.com
State New
Headers show

Commit Message

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

Comments

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 hide | download patch | download mbox

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"
 }