From 7cf3f9952de8e10f78f61ddeab4044896e3ef635 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 8 Jan 2020 20:37:03 +0000 Subject: [PATCH] libunwind: untested attempt to fix sparc64 build sparc64 is the only architecture currently using the DWARF unwinder from GCC 4.2.1. Old GCC and related libraries are being removed soon; absent other changes sparc64 would be left with no unwinder when that happens. Instead, commit these changes which should at least allow the LLVM unwinder to build. Someone with access to the obolete sparc64 hardware supported by FreeBSD will need to test the result. PR: 233405 Submitted by: cem --- contrib/llvm-project/libunwind/include/__libunwind_config.h | 2 +- contrib/llvm-project/libunwind/src/config.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/libunwind/include/__libunwind_config.h b/contrib/llvm-project/libunwind/include/__libunwind_config.h index 7973768c3c8b..cbbbf741c233 100644 --- a/contrib/llvm-project/libunwind/include/__libunwind_config.h +++ b/contrib/llvm-project/libunwind/include/__libunwind_config.h @@ -124,7 +124,7 @@ #define _LIBUNWIND_TARGET_SPARC 1 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC #define _LIBUNWIND_CONTEXT_SIZE 16 - #define _LIBUNWIND_CURSOR_SIZE 23 + #define _LIBUNWIND_CURSOR_SIZE 28 # else # error "Unsupported architecture." # endif diff --git a/contrib/llvm-project/libunwind/src/config.h b/contrib/llvm-project/libunwind/src/config.h index dcd3cef94552..65a2fc208f31 100644 --- a/contrib/llvm-project/libunwind/src/config.h +++ b/contrib/llvm-project/libunwind/src/config.h @@ -104,7 +104,8 @@ (!defined(__APPLE__) && defined(__arm__)) || \ (defined(__arm64__) || defined(__aarch64__)) || \ defined(__mips__) || \ - defined(__riscv) + defined(__riscv) || \ + defined(__sparc__) #if !defined(_LIBUNWIND_BUILD_SJLJ_APIS) #define _LIBUNWIND_BUILD_ZERO_COST_APIS #endif