From a4f4f5b83564a1075bea0ac7c1fd8768be1caff7 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 4 Jan 2023 10:30:59 +0100 Subject: [PATCH] Don't fail for Clang builds, which pretend to be an ancient GCC. Reported by pkubaj. --- src/lj_arch.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lj_arch.h b/src/lj_arch.h index 5fb798d9aa..bddd757d3e 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h @@ -466,11 +466,17 @@ #endif #endif #elif !LJ_TARGET_PS3 +#if __clang__ +#if ((__clang_major__ < 3) || ((__clang_major__ == 3) && __clang_minor__ < 5)) +#error "Need at least Clang 3.5 or newer" +#endif +#else #if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3) #error "Need at least GCC 4.3 or newer" #endif #endif #endif +#endif /* Check target-specific constraints. */ #ifndef _BUILDVM_H