diff mbox

RFA: PR 68913: Provide weak version of __fread_chk for PR61886 test

Message ID 568E70C6.7010806@redhat.com
State New
Headers show

Commit Message

Nick Clifton Jan. 7, 2016, 2:05 p.m. UTC
Hi Rainer.

>> +/* { dg-lto-options { { -flto -O2 -Werror -Wl,--defsym,__fread_chk=0x1234

> this assumes GNU ld and will break on all targets that use different
> linkers.

OK, how about this version instead ?

Cheers
   Nick

  typedef struct _IO_FILE FILE;

Comments

Rainer Orth Jan. 7, 2016, 2:15 p.m. UTC | #1
Hi Nick,

>>> +/* { dg-lto-options { { -flto -O2 -Werror -Wl,--defsym,__fread_chk=0x1234
>
>> this assumes GNU ld and will break on all targets that use different
>> linkers.
>
> OK, how about this version instead ?
>
> Cheers
>   Nick
>
> Index: gcc/testsuite/gcc.dg/lto/pr61886_0.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/lto/pr61886_0.c        (revision 232123)
> +++ gcc/testsuite/gcc.dg/lto/pr61886_0.c        (working copy)
> @@ -1,5 +1,6 @@
>  /* { dg-lto-do link } */
>  /* { dg-lto-options { { -flto -O2 -Werror } } } */
> +/* { dg-extra-ld-options "-Wl,--defsym,__fread_chk=0x1234" { target { gld
> } } } */
>
>  typedef __SIZE_TYPE__ size_t;
>  typedef struct _IO_FILE FILE;

No, we're back at square one then, i.e. the failure reported in PR
testsuite/68913:

output is:
Undefined                       first referenced
 symbol                             in file
__fread_chk                         c_lto_pr61886_0.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status

	Rainer
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/lto/pr61886_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/pr61886_0.c        (revision 232123)
+++ gcc/testsuite/gcc.dg/lto/pr61886_0.c        (working copy)
@@ -1,5 +1,6 @@ 
  /* { dg-lto-do link } */
  /* { dg-lto-options { { -flto -O2 -Werror } } } */
+/* { dg-extra-ld-options "-Wl,--defsym,__fread_chk=0x1234" { target { 
gld } } } */

  typedef __SIZE_TYPE__ size_t;