public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: PR 66655: Use COFF/PE weak symbols
@ 2015-12-22 10:17 Nick Clifton
  2016-01-02  5:29 ` Jeff Law
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Clifton @ 2015-12-22 10:17 UTC (permalink / raw)
  To: gcc-patches

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  <nickc@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,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-07 16:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22 10:17 RFA: PR 66655: Use COFF/PE weak symbols Nick Clifton
2016-01-02  5:29 ` Jeff Law
2016-01-05 11:03   ` Nick Clifton
2016-01-05 19:08     ` Jeff Law
2016-01-07 12:15       ` Nick Clifton
2016-01-07 16:44         ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).