Blame SOURCES/openblas-0.2.15-constructor.patch

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