Lines 1-12
Link Here
|
1 |
Passing a priority level to constructor/destructor only works on GCC >= 4.3.0; |
1 |
--- driver/others/memory.c.orig 2016-03-20 20:52:15.000000000 -0400 |
2 |
improve the upstream check so that the build works with base GCC. |
2 |
+++ driver/others/memory.c 2016-04-05 00:38:55.884304000 -0400 |
3 |
--- driver/others/memory.c.orig 2015-10-27 20:44:50 UTC |
3 |
@@ -144,7 +144,7 @@ |
4 |
+++ driver/others/memory.c |
|
|
5 |
@@ -142,7 +142,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
6 |
#if defined(_MSC_VER) && !defined(__clang__) |
4 |
#if defined(_MSC_VER) && !defined(__clang__) |
7 |
#define CONSTRUCTOR __cdecl |
5 |
#define CONSTRUCTOR __cdecl |
8 |
#define DESTRUCTOR __cdecl |
6 |
#define DESTRUCTOR __cdecl |
9 |
-#elif defined(OS_DARWIN) && defined(C_GCC) |
7 |
-#elif (defined(OS_DARWIN) || defined(OS_SUNOS)) && defined(C_GCC) |
10 |
+#elif defined(OS_DARWIN) || (defined(C_GCC) && ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3))) |
8 |
+#elif defined(OS_DARWIN) || (defined(C_GCC) && ((__GNUC__ == 4) && (__GNUC_MINOR__ < 3))) |
11 |
#define CONSTRUCTOR __attribute__ ((constructor)) |
9 |
#define CONSTRUCTOR __attribute__ ((constructor)) |
12 |
#define DESTRUCTOR __attribute__ ((destructor)) |
10 |
#define DESTRUCTOR __attribute__ ((destructor)) |