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: "Dominique d'HumiÃres" <dominiq at lps dot ens dot fr>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Jan 2016 14:00:44 +0000
- Subject: Re: RFA: PR 68913: Provide weak version of __fread_chk for PR61886 test
- Authentication-results: sourceware.org; auth=none
- References: <E1A1F047-8B8B-44B0-BA96-64C2C5529FD0 at lps dot ens dot fr>
Hi Dominique,
On 07/01/16 13:42, Dominique d'HumiÃres wrote:
+/* { dg-lto-options { { -flto -O2 -Werror -Wl,--defsym,__fread_chk=0x1234 } } } */
This wonât work on darwin:
ld: unknown option: --defsym
collect2: error: ld returned 1 exit status
Oh bananas.
Does the pr61886 test work on Darwin without any changes ? If it fails
then is there a Darwin linker command line option to define a symbol ?
This revised version of the patch works for me, but I do not have a
Darwin native system on which I can test it. Would you be able to try
it out for me ?
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 { !
{ *-*-darwin* } } } } */
typedef __SIZE_TYPE__ size_t;
typedef struct _IO_FILE FILE;