From: <sv...@ww...> - 2006-12-13 07:55:49
|
Author: mkrose Date: 2006-12-12 23:55:42 -0800 (Tue, 12 Dec 2006) New Revision: 2038 Modified: trunk/csp/SConstruct trunk/csp/csplib/util/Export.h trunk/csp/cspsim/Export.h trunk/csp/tools/build/autoconf.py Log: Defer symbol export under gcc to v4.2, since gcc 4.1 doesn't support attributes at class declarations which are currently used in Object declarations. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2038 Modified: trunk/csp/SConstruct =================================================================== --- trunk/csp/SConstruct 2006-12-12 19:26:14 UTC (rev 2037) +++ trunk/csp/SConstruct 2006-12-13 07:55:42 UTC (rev 2038) @@ -140,7 +140,7 @@ env.Replace(CXXFLAGS=Split('-O2 -g -W -Wall -pedantic -Wno-long-long')) env.Replace(SWIGCXXFLAGS=Split('-O2 -g')) env.Replace(ARFLAGS=Split('cr')) - if gcc and gcc[0] >= 4: + if gcc and gcc[0] >= (4, 2, 0): env.AppendUnique(CXXFLAGS=Split('-fvisibility=hidden')) def customize_darwin(self, env): Modified: trunk/csp/csplib/util/Export.h =================================================================== --- trunk/csp/csplib/util/Export.h 2006-12-12 19:26:14 UTC (rev 2037) +++ trunk/csp/csplib/util/Export.h 2006-12-13 07:55:42 UTC (rev 2038) @@ -36,7 +36,7 @@ # define CSPLIB_EXPORT __declspec(dllimport) # endif // CSPLIB_EXPORTS #else -# if defined(__GNUC__) && __GNUC__ >= 4 +# if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 2 # define CSPLIB_EXPORT __attribute__ ((visibility("default"))) # else # define CSPLIB_EXPORT Modified: trunk/csp/cspsim/Export.h =================================================================== --- trunk/csp/cspsim/Export.h 2006-12-12 19:26:14 UTC (rev 2037) +++ trunk/csp/cspsim/Export.h 2006-12-13 07:55:42 UTC (rev 2038) @@ -26,17 +26,21 @@ #define __CSPSIM_EXPORT_H__ #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # ifdef SWIG - # undef __declspec - # define __declspec(x) - # endif // SWIG - # ifdef CSPSIM_EXPORTS - # define CSPSIM_EXPORT __declspec(dllexport) - # else - # define CSPSIM_EXPORT __declspec(dllimport) - # endif // CSPSIM_EXPORTS +# ifdef SWIG +# undef __declspec +# define __declspec(x) +# endif // SWIG +# ifdef CSPSIM_EXPORTS +# define CSPSIM_EXPORT __declspec(dllexport) +# else +# define CSPSIM_EXPORT __declspec(dllimport) +# endif // CSPSIM_EXPORTS #else - # define CSPSIM_EXPORT +# if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 2 +# define CSPSIM_EXPORT __attribute__ ((visibility("default"))) +# else +# define CSPSIM_EXPORT +# endif #endif # if defined(_MSC_VER) && (_MSC_VER <= 1400) Modified: trunk/csp/tools/build/autoconf.py =================================================================== --- trunk/csp/tools/build/autoconf.py 2006-12-12 19:26:14 UTC (rev 2037) +++ trunk/csp/tools/build/autoconf.py 2006-12-13 07:55:42 UTC (rev 2038) @@ -52,7 +52,7 @@ def GetGCCVersion(): version = os.popen('gcc -dumpversion').read().strip() try: - return map(int, version.split('.')) + return tuple(map(int, version.split('.'))) except: return None |