I got all three projects to build on 64bit linux using cmake and wanted to share a two changes I had to make in order for it to build. Not sure if the placement of the include is well chosen, I just wanted to get it to work quickly :)
The main trick that I needed was to add -mcx16 for it to build, as this defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 and the respective __sync_* functions as mentioned in the other thread about linux builds.
From c4b1f64cd4e136ad31287be1eb4918194efee08e Mon Sep 17 00:00:00 2001
From: karsten gebbert <k@_____hehehehe no no>
Date: Wed, 18 Mar 2015 22:34:34 +0100
Subject: [PATCH] fix build on linux
---
plnk/plank/containers/atomic/arch/plank_AtomicInline_Linux_64.h | 2 +-
plnk/plank/core/plank_StandardHeader.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/plnk/plank/containers/atomic/arch/plank_AtomicInline_Linux_64.h b/plnk/plank/containers/atomic/arch/plank_AtomicInline_Linux_64.h
index 6da976a..9590ed4 100755
--- a/plnk/plank/containers/atomic/arch/plank_AtomicInline_Linux_64.h
+++ b/plnk/plank/containers/atomic/arch/plank_AtomicInline_Linux_64.h
@@ -1017,7 +1017,7 @@ static PLANK_INLINE_LOW PlankB pl_AtomicPX_CompareAndSwap (PlankAtomicPXRef p,
PlankAtomicPX oldAll = { oldPtr, oldExtra };
PlankAtomicPX newAll = { newPtr, newExtra };
- return __sync_bool_compare_and_swap ((volatile (__int128_t*)p,
+ return __sync_bool_compare_and_swap ((volatile __int128_t*)p,
*(__int128_t*)&oldAll,
*(__int128_t*)&newAll);
}
diff --git a/plnk/plank/core/plank_StandardHeader.h b/plnk/plank/core/plank_StandardHeader.h
index a2b2007..8bb68e0 100755
--- a/plnk/plank/core/plank_StandardHeader.h
+++ b/plnk/plank/core/plank_StandardHeader.h
@@ -110,6 +110,7 @@
#include <math.h>
#include <time.h>
#include <limits.h>
+#include <errno.h>
#if (defined (_WIN32) || defined (_WIN64) || defined (WIN64))
#include <windows.h>
--
2.3.3