diff --git a/makefile b/makefile index 3a48e468..50dba1fe 100644 --- a/makefile +++ b/makefile @@ -36,6 +36,8 @@ ON_GNU_WARNING_FLAGS = -Wall \ -Wno-switch \ -Wno-unknown-pragmas \ -Wno-unused-private-field +# Note that -Wno-unused-private-field may throw unrecognized option +# error. This happened at least on GCC 8.3.0 in Rasbian Buster. # -Wno-inconsistent-missing-override \ @@ -62,6 +64,8 @@ LINK = $(CCC) LINKFLAGS = # below necessary LINKFLAGS on Linux for the UUID library #LINKFLAGS = -luuid +# below necessary LINKFLAGS on Linux / Raspberry Pi 4 for UUID and atomic libraries +#LINKFLAGS = -luuid -latomic ############################################################### diff --git a/opennurbs_dimension.h b/opennurbs_dimension.h index 4d71c71b..8058cbb3 100644 --- a/opennurbs_dimension.h +++ b/opennurbs_dimension.h @@ -888,9 +888,9 @@ class ON_CLASS ON_DimRadial : public ON_Dimension // | // | // + kinkpt2 -// \ -// \ kinkoffset2 -// \ +// - +// - kinkoffset2 +// - // + kinkpt1 // | // | kinkoffset1 diff --git a/opennurbs_lock.h b/opennurbs_lock.h index a428c857..a30c6469 100644 --- a/opennurbs_lock.h +++ b/opennurbs_lock.h @@ -112,7 +112,7 @@ class ON_CLASS ON_Lock // needs to have dll-interface to be used by clients of class 'ON_Lock' // m_lock_value is private and all code that manages m_lock_value is explicitly implemented in the DLL. private: -#if defined(ON_COMPILER_CLANG) +#if defined(ON_COMPILER_CLANG) || defined (ON_RUNTIME_LINUX_ARM) std::atomic m_lock_value; #else std::atomic m_lock_value = ON_Lock::UnlockedValue; diff --git a/opennurbs_system_compiler.h b/opennurbs_system_compiler.h index c03e7694..dc1d2a25 100644 --- a/opennurbs_system_compiler.h +++ b/opennurbs_system_compiler.h @@ -357,7 +357,6 @@ // ON_COMPILER_GNU // */ - #define ON_COMPILER_GNU #if !defined(_GNU_SOURCE) #define _GNU_SOURCE @@ -389,6 +388,13 @@ #endif +#if defined(__arm__) +// GCC 8.3.0 on Raspbian (Raspberry Pi 4) needs this too +#if !defined(ON_CLANG_CONSTRUCTOR_BUG) +#define ON_CLANG_CONSTRUCTOR_BUG +#endif +#endif + #elif defined(__BORLANDC__) /* diff --git a/opennurbs_system_runtime.h b/opennurbs_system_runtime.h index 83d1b87b..1a408a01 100644 --- a/opennurbs_system_runtime.h +++ b/opennurbs_system_runtime.h @@ -33,6 +33,7 @@ // At most one the ON_RUNTIME_* should be defined // // ON_RUNTIME_APPLE / ON_RUNTIME_WIN / ON_RUNTIME_ANDROID +// ON_RUNTIME_LINUX // */ #if (defined(__APPLE__) || defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR) || defined(__IOS__)) @@ -60,6 +61,7 @@ #define ON_RUNTIME_LINUX #endif + #endif /* // @@ -157,7 +159,14 @@ #elif defined(ON_RUNTIME_LINUX) -#if defined(__x86_64__) +#if defined(__arm__) +#if !defined(ON_RUNTIME_LINUX_ARM) +#define ON_RUNTIME_LINUX_ARM +#endif +// assume 64bit ARM (like Raspberry Pi 4) +#define ON_64BIT_RUNTIME +#define ON_LITTLE_ENDIAN +#elif defined(__x86_64__) #define ON_64BIT_RUNTIME #else #define ON_32BIT_RUNTIME