From 587f130e27ca6bfd5e9e034dce6d6c38da872bfa Mon Sep 17 00:00:00 2001 From: visa Date: Sat, 1 Aug 2020 03:51:31 +0000 Subject: [PATCH] Fix Mesa build with clang 10 on mips64. On mips64, the compiler does not allow use of non-zero argument with __builtin_frame_address(). However, the returned frame address is only used when PIPE_ARCH_X86 is defined. The compile error can be avoided by making #ifdef PIPE_ARCH_X86 cover the getting of frame address too. The argument checking of __builtin_frame_address() has been present as a debug assert in clang 8. In clang 10, there is a proper runtime check for the argument. This is why the build has not failed before. OK jsg@ --- lib/mesa/src/gallium/auxiliary/util/u_debug_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mesa/src/gallium/auxiliary/util/u_debug_stack.c b/lib/mesa/src/gallium/auxiliary/util/u_debug_stack.c index 235e11667..86d951441 100644 --- a/lib/mesa/src/gallium/auxiliary/util/u_debug_stack.c +++ b/lib/mesa/src/gallium/auxiliary/util/u_debug_stack.c @@ -265,6 +265,7 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace, } #endif +#ifdef PIPE_ARCH_X86 #if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION > 404) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wframe-address" @@ -279,7 +280,6 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace, frame_pointer = NULL; #endif -#ifdef PIPE_ARCH_X86 while (nr_frames) { const void **next_frame_pointer;