This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]