Blame SOURCES/openblas-0.2.15-constructor.patch

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