From 1ce054fcb3757e952423a09025c2f2a26023f8a5 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Thu, 22 Oct 2015 11:07:35 -0500 Subject: [PATCH] Refs #669. Fixed the build bug with gcc on Mac OS X. --- driver/others/memory.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/driver/others/memory.c b/driver/others/memory.c index f75a47d..fca5161 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -139,8 +139,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define BITMASK(a, b, c) ((((a) >> (b)) & (c))) +#if defined(OS_DARWIN) && defined(C_GCC) +#define CONSTRUCTOR __attribute__ ((constructor)) +#define DESTRUCTOR __attribute__ ((destructor)) +#else #define CONSTRUCTOR __attribute__ ((constructor(101))) #define DESTRUCTOR __attribute__ ((destructor(101))) +#endif #ifdef DYNAMIC_ARCH gotoblas_t *gotoblas = NULL; -- 2.7.4