Message ID | 87si2uss7r.fsf@redhat.com |
---|---|
State | New |
Headers | show |
On 12/22/2015 03:17 AM, Nick Clifton wrote: > 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. You probably know the capabilities of COFF/PE better than I, so the patch itself is fine. Is there any way that test can be shoved into our dejagnu testing harness? I think we've got support somewhere for tests which require multiple input files. Jeff
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,