From 02fa40dddb7cb68763dabc6939534945086f6b0d Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Fri, 2 Jan 2015 17:13:43 +0200 Subject: [PATCH] MinGW symbol visibility fix When using separate sources MinGW would use GCC symbol visibility attributes which cause: "warning: visibility attribute not supported in this configuration; ignored". Avoid using GCC symbol visibility attributes with MinGW. Instead, use either no visibility attributes or Windows specific __declspec(dllexport) and __declspec(dllimport). --- src/duk_features.h.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/duk_features.h.in b/src/duk_features.h.in index 7b702d46..ccb8ad91 100644 --- a/src/duk_features.h.in +++ b/src/duk_features.h.in @@ -1966,8 +1966,11 @@ typedef FILE duk_file; /* XXX: separate macros for function and data may be necessary at some point. */ #if defined(DUK_F_GCC_VERSION) -#if (DUK_F_GCC_VERSION >= 40000) -/* Might work on earlier versions too but limit to GCC 4+. */ +#if (DUK_F_GCC_VERSION >= 40000) && !defined(DUK_F_MINGW) +/* Might work on earlier versions too but limit to GCC 4+. + * MinGW should use Windows specific __declspec or no visibility attributes at all, + * otherwise: "warning: visibility attribute not supported in this configuration; ignored" + */ #define DUK_F_GCC_SYMBOL_VISIBILITY #endif #endif