On Wed, Jan 1, 2020 at 2:14 PM Andrew Pinski <pins...@gmail.com> wrote:
>
> Hi,
>   On Windows if DLLL_EXPORT was declared objc_EXPORT was defined to an
> empty string.  This is wrong as that would produce common symbols in
> the headers; except now -fno-common is the default.
> So setting the define to extern is the correct fix and removes the
> dependency on having common symbols being in use.
>
> Committed after the bug reported tested the patch for me.

This time with the patch attached :).

>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * objc/objc-decls.h (objc_EXPORT): Define it to extern for DLL_EXPORT
> define case.
Index: objc/objc-decls.h
===================================================================
--- objc/objc-decls.h   (revision 279821)
+++ objc/objc-decls.h   (working copy)
@@ -29,7 +29,7 @@ see the files COPYING3 and COPYING.RUNTI
 #if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
 
 #  ifdef DLL_EXPORT /* defined by libtool (if required) */
-#    define objc_EXPORT 
+#    define objc_EXPORT extern
 #    define objc_DECLARE
 #  else
 #    define objc_EXPORT  extern __declspec(dllimport)

Reply via email to