patch to build on x86-64/linux

10 views
Skip to first unread message

Karsten Gebbert

unread,
Mar 18, 2015, 5:45:18 PM3/18/15
to pl...@googlegroups.com
Hello,

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.

Hope it helps!

k

(ps: it does look really rather neat btw!)



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

Martin Robinson

unread,
Apr 27, 2015, 3:46:41 PM4/27/15
to pl...@googlegroups.com, Martin Robinson, Karsten Gebbert
Hi

Sorry for the delay. I’ve merged these changes.

Martin

--
You received this message because you are subscribed to the Google Groups "pl-nk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pl-nk+un...@googlegroups.com.
To post to this group, send email to pl...@googlegroups.com.
Visit this group at http://groups.google.com/group/pl-nk.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages