This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: PR 68913: Provide weak version of __fread_chk for PR61886 test
- From: Nick Clifton <nickc at redhat dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 7 Jan 2016 14:05:58 +0000
- Subject: Re: RFA: PR 68913: Provide weak version of __fread_chk for PR61886 test
- Authentication-results: sourceware.org; auth=none
- References: <87egejk7mj dot fsf at redhat dot com> <56785A36 dot 60507 at redhat dot com> <56791DBB dot 3050800 at redhat dot com> <568C1777 dot 8070801 at redhat dot com> <568E6A14 dot 1030007 at redhat dot com> <ydd7fjlijuh dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE>
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
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;