Blame SOURCES/openblas-0.2.15-constructor.patch

b3c4c8
diff -up OpenBLAS-0.2.15/driver/others/memory.c.priority OpenBLAS-0.2.15/driver/others/memory.c
b3c4c8
--- OpenBLAS-0.2.15/driver/others/memory.c.priority	2015-10-27 21:44:50.000000000 +0100
b3c4c8
+++ OpenBLAS-0.2.15/driver/others/memory.c	2016-01-13 21:12:01.862225898 +0100
b3c4c8
@@ -146,8 +146,15 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF
b3c4c8
 #define CONSTRUCTOR	__attribute__ ((constructor))
b3c4c8
 #define DESTRUCTOR	__attribute__ ((destructor))
b3c4c8
 #else
b3c4c8
+#if __GNUC__ && INIT_PRIORITY && ((GCC_VERSION >= 40300) || (CLANG_VERSION >= 20900))
b3c4c8
 #define CONSTRUCTOR	__attribute__ ((constructor(101)))
b3c4c8
 #define DESTRUCTOR	__attribute__ ((destructor(101)))
b3c4c8
+#elif __GNUC__ && INIT_PRIORITY
b3c4c8
+#define CONSTRUCTOR	__attribute__ ((constructor))
b3c4c8
+#define DESTRUCTOR	__attribute__ ((destructor))
b3c4c8
+#else
b3c4c8
+#define CONSTRUCTOR
b3c4c8
+#define DESTRUCTOR
b3c4c8
 #endif
b3c4c8
 
b3c4c8
 #ifdef DYNAMIC_ARCH