diff options
Diffstat (limited to 'src/lj_arch.h')
-rw-r--r-- | src/lj_arch.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lj_arch.h b/src/lj_arch.h index 54725dcf..a0f08a22 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h | |||
@@ -86,6 +86,23 @@ | |||
86 | #error "No target architecture defined" | 86 | #error "No target architecture defined" |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | /* Check for minimum required compiler versions. */ | ||
90 | #if defined(__GNUC__) | ||
91 | #if LJ_TARGET_X64 | ||
92 | #if __GNUC__ < 4 | ||
93 | #error "Need at least GCC 4.0 or newer" | ||
94 | #endif | ||
95 | #elif LJ_TARGET_PPC | ||
96 | #if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3) | ||
97 | #error "Need at least GCC 4.3 or newer" | ||
98 | #endif | ||
99 | #else | ||
100 | #if (__GNUC__ < 3) || ((__GNUC__ == 3) && __GNUC_MINOR__ < 4) | ||
101 | #error "Need at least GCC 3.4 or newer" | ||
102 | #endif | ||
103 | #endif | ||
104 | #endif | ||
105 | |||
89 | /* Check target-specific constraints. */ | 106 | /* Check target-specific constraints. */ |
90 | #ifndef _BUILDVM_H | 107 | #ifndef _BUILDVM_H |
91 | #if LJ_TARGET_PPC | 108 | #if LJ_TARGET_PPC |