Message ID | 568E70C6.7010806@redhat.com |
---|---|
State | New |
Headers | show |
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
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;