From f4d6e676561408893862c7b5c2f5098b2df0ca8b Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 13 Oct 2025 08:41:34 +0900 Subject: [PATCH] throw.h: exclude arm64 from mingw64 builtin setjmp/longjmp; fix #6637 __builtin_setjmp/longjmp are x86/x86_64 specific gcc intrinsics and not supported on arm64. windows arm64 with msys2 clangarm64 now correctly falls through to standard setjmp/longjmp. Co-authored-by: Claude --- include/mruby/throw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mruby/throw.h b/include/mruby/throw.h index f2984de69..ac8ee6fe3 100644 --- a/include/mruby/throw.h +++ b/include/mruby/throw.h @@ -33,7 +33,7 @@ typedef void *mrb_jmpbuf_impl; #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #define MRB_SETJMP _setjmp #define MRB_LONGJMP _longjmp -#elif defined(__MINGW64__) && defined(__GNUC__) && __GNUC__ >= 4 +#elif defined(__MINGW64__) && !defined(_M_ARM64) && defined(__GNUC__) && __GNUC__ >= 4 #define MRB_SETJMP __builtin_setjmp #define MRB_LONGJMP __builtin_longjmp #else