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