Hi Guys,

  The patch below is a proposed fix for PR 66655.  The issue I believe
  is not that the ming32 definition of bind_local_p is wrong, but rather
  that G++ thinks that it cannot make the decl weak even though
  bind_local_p says that it should.  The answer is to define
  MAKE_DECL_ONE_ONLY using the COFF/PE weak symbol support now available
  in gas and the linker.  Doing this allows the test to pass.

  OK to apply ?

Cheers
  Nick

gcc/ChangeLog
2015-12-22  Nick Clifton  <ni...@redhat.com>

        PR target/66655
        * config/i386/cygming.h (MAKE_DECL_ONE_ONLY): Use weak symbol
        support, if available.

Index: config/i386/cygming.h
===================================================================
--- config/i386/cygming.h       (revision 231898)
+++ config/i386/cygming.h       (working copy)
@@ -432,6 +432,10 @@
       fputc ('\n', (FILE));           \
     }                                 \
   while (0)
+
+/* Make use of the weak support for ONE_ONLY decls.  */
+#undef  MAKE_DECL_ONE_ONLY
+#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
 #endif /* HAVE_GAS_WEAK */
 
 /* FIXME: SUPPORTS_WEAK && TARGET_HAVE_NAMED_SECTIONS is true,

Reply via email to