diff --git a/libunwind-gcc10-build-fno-common.patch b/libunwind-gcc10-build-fno-common.patch new file mode 100644 index 0000000..7432b9d --- /dev/null +++ b/libunwind-gcc10-build-fno-common.patch @@ -0,0 +1,22 @@ +From 77c9844431a81db39747aaf402637949901f9d01 Mon Sep 17 00:00:00 2001 +From: Laurent Stacul +Date: Thu, 6 Feb 2020 14:49:35 +0000 +Subject: [PATCH] Fix compilation with gcc 10 (which defaulted to -fno-common) + +--- + src/mi/dyn-info-list.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/mi/dyn-info-list.c b/src/mi/dyn-info-list.c +index 1c7c55090..4aa174b0c 100644 +--- a/src/mi/dyn-info-list.c ++++ b/src/mi/dyn-info-list.c +@@ -25,7 +25,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + + #include "libunwind_i.h" + +-HIDDEN unw_dyn_info_list_t _U_dyn_info_list; ++extern HIDDEN unw_dyn_info_list_t _U_dyn_info_list; + + unw_word_t + _U_dyn_info_list_addr (void) diff --git a/libunwind.changes b/libunwind.changes index 27503e8..376c84f 100644 --- a/libunwind.changes +++ b/libunwind.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 19 09:24:20 UTC 2020 - Pedro Monreal Gonzalez + +- Fix build with GCC-10: [bsc#1160876] + * In GCC-10, the default option -fcommon will change to -fno-common +- Add libunwind-gcc10-build-fno-common.patch + ------------------------------------------------------------------- Sun Jul 7 21:45:20 UTC 2019 - Jan Engelhardt diff --git a/libunwind.spec b/libunwind.spec index c2fbef7..761b297 100644 --- a/libunwind.spec +++ b/libunwind.spec @@ -1,7 +1,7 @@ # # spec file for package libunwind # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,11 +23,12 @@ Release: 0 Summary: Call chain detection library License: MIT Group: System/Base -Url: http://savannah.nongnu.org/projects/libunwind/ -Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{realver}.tar.gz -Source1: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{realver}.tar.gz.sig +URL: https://savannah.nongnu.org/projects/libunwind/ +Source0: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{realver}.tar.gz +Source1: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{realver}.tar.gz.sig Source2: %{name}.keyring Source3: baselibs.conf +Patch0: libunwind-gcc10-build-fno-common.patch BuildRequires: gcc-c++ BuildRequires: lzma-devel BuildRequires: pkgconfig @@ -47,6 +48,7 @@ A C programming interface (API) to determine the call chain of a program. %prep %setup -q -n %{name}-%{realver} +%patch0 -p1 %build %configure \