Blame SOURCES/openblas-0.2.15-constructor.patch

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