Skip to content

Commit 1ce054f

Browse files
committed
Refs #669. Fixed the build bug with gcc on Mac OS X.
1 parent 3684706 commit 1ce054f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

driver/others/memory.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
139139

140140
#define BITMASK(a, b, c) ((((a) >> (b)) & (c)))
141141

142+
#if defined(OS_DARWIN) && defined(C_GCC)
143+
#define CONSTRUCTOR __attribute__ ((constructor))
144+
#define DESTRUCTOR __attribute__ ((destructor))
145+
#else
142146
#define CONSTRUCTOR __attribute__ ((constructor(101)))
143147
#define DESTRUCTOR __attribute__ ((destructor(101)))
148+
#endif
144149

145150
#ifdef DYNAMIC_ARCH
146151
gotoblas_t *gotoblas = NULL;

0 commit comments

Comments
 (0)