From 2782bd24fcc51e0f7664f2e8729dc0f04619f19f Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 1 Mar 2005 05:00:35 +0000 Subject: [PATCH] Linking updates for MinGW git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20819 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 ++++++++ Headers/Additions/GNUstepBase/GSObjCRuntime.h | 9 +++++++++ Source/Makefile.preamble | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f50a967e..b9d031cc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-03-01 02:50 Nicola Pero + + * Source/Makefile.preamble (ADDITIONAL_LIB_DIRS): When building a + shared library, depend on all TARGET_SYSTEM_LIBS, not just + CONFIG_SYSTEM_LIBS. + * Headers/Additions/GNUstepBase/GSObjCRuntime.h: Do not use + __declspec(dllexport) on mingw. Use extern instead. + 2005-02-28 17:45 Richard Frith-Macdonald * NSCharacterSets/GNUmakefile: Use GNUSTEP_OBJ_DIR_NAME to run diff --git a/Headers/Additions/GNUstepBase/GSObjCRuntime.h b/Headers/Additions/GNUstepBase/GSObjCRuntime.h index e04c8d7d3..dfc4014d3 100644 --- a/Headers/Additions/GNUstepBase/GSObjCRuntime.h +++ b/Headers/Additions/GNUstepBase/GSObjCRuntime.h @@ -41,8 +41,17 @@ extern "C" { #ifdef GNUSTEP_WITH_DLL #if BUILD_libgnustep_base_DLL +# +# if defined(__MINGW32__) + /* On Mingw, the compiler will export all symbols automatically, so + * __declspec(dllexport) is not needed. + */ +# define GS_EXPORT extern +# define GS_DECLARE +# else # define GS_EXPORT __declspec(dllexport) # define GS_DECLARE __declspec(dllexport) +# endif #else # define GS_EXPORT extern __declspec(dllimport) # define GS_DECLARE __declspec(dllimport) diff --git a/Source/Makefile.preamble b/Source/Makefile.preamble index 28b9f26ca..38fcb6f48 100644 --- a/Source/Makefile.preamble +++ b/Source/Makefile.preamble @@ -78,8 +78,8 @@ ifeq ($(GNUSTEP_TARGET_OS),cygwin) libgnustep-base_LIBRARIES_DEPEND_UPON += -lobjc endif ifeq ($(shared),yes) -libgnustep-base_LIBRARIES_DEPEND_UPON += $(CONFIG_SYSTEM_LIBS) -libgnustep-baseadd_LIBRARIES_DEPEND_UPON += $(CONFIG_SYSTEM_LIBS) +libgnustep-base_LIBRARIES_DEPEND_UPON += $(TARGET_SYSTEM_LIBS) +libgnustep-baseadd_LIBRARIES_DEPEND_UPON += $(TARGET_SYSTEM_LIBS) endif #