From dc94a0506f1d267a761961d3ac905d77de3dae2e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 21 Mar 2018 14:59:32 -0700 Subject: [PATCH] gallium: Do not add -Wframe-address option for gcc <= 4.4. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes these build errors with GCC 4.4. Compiling src/gallium/auxiliary/util/u_debug_stack.c ... src/gallium/auxiliary/util/u_debug_stack.c: In function ‘debug_backtrace_capture’: src/gallium/auxiliary/util/u_debug_stack.c:268: error: #pragma GCC diagnostic not allowed inside functions src/gallium/auxiliary/util/u_debug_stack.c:269: error: #pragma GCC diagnostic not allowed inside functions src/gallium/auxiliary/util/u_debug_stack.c:271: error: #pragma GCC diagnostic not allowed inside functions Fixes: 370e356ebab4 ("gallium: silence __builtin_frame_address nonzero argument is unsafe warning") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105529 Signed-off-by: Vinson Lee Reviewed-by: Timothy Arceri Reviewed-by: Jose Fonseca --- src/gallium/auxiliary/util/u_debug_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_debug_stack.c b/src/gallium/auxiliary/util/u_debug_stack.c index 974e639e89d..846f6484311 100644 --- a/src/gallium/auxiliary/util/u_debug_stack.c +++ b/src/gallium/auxiliary/util/u_debug_stack.c @@ -264,7 +264,7 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace, } #endif -#if defined(PIPE_CC_GCC) +#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION > 404) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wframe-address" frame_pointer = ((const void **)__builtin_frame_address(1)); -- 2.30.2