From 69e03094bde755150e973bfc32fc4cebc665908b Mon Sep 17 00:00:00 2001 From: Timothee 'TTimo' Besset Date: Fri, 21 Feb 2025 11:33:46 -0700 Subject: [PATCH] fallback to defining SDL_TriggerBreakpoint as __builtin_trap in older linux arm64 environments that do not have a __has_builtin facility --- include/SDL3/SDL_assert.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/SDL3/SDL_assert.h b/include/SDL3/SDL_assert.h index 09b3b478f0..bc7f112247 100644 --- a/include/SDL3/SDL_assert.h +++ b/include/SDL3/SDL_assert.h @@ -149,6 +149,8 @@ extern "C" { #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" ) #elif defined(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) ) #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" ) +#elif defined(SDL_PLATFORM_LINUX) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) ) + #define SDL_TriggerBreakpoint() __builtin_trap() /* older arm linux environments may miss the SDL_HAS_BUILTIN(__builtin_trap) above */ #elif defined(__386__) && defined(__WATCOMC__) #define SDL_TriggerBreakpoint() { _asm { int 0x03 } } #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)