From d9daa262a422d9c1234f342403f988ce9d583ef3954313ae2994ce720dfab269 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Tue, 10 Sep 2019 15:34:12 +0000 Subject: [PATCH 1/4] Accepting request 726802 from home:tomdevries:branches:devel:gcc-librpm - Enable librpm for version > librpm.so.3 [bsc#1145692]: * Allow any librpm.so.x * Fix unused variables in HAVE_LIBRPM code in gdb-6.6-buildid-locate-rpm-suse.patch * Add %build test to check for "zypper install " message OBS-URL: https://build.opensuse.org/request/show/726802 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=221 --- gdb-6.6-buildid-locate-rpm-suse.patch | 16 +++++ gdb.changes | 10 +++ gdb.spec | 89 ++++++++++++++++++++++++--- 3 files changed, 106 insertions(+), 9 deletions(-) diff --git a/gdb-6.6-buildid-locate-rpm-suse.patch b/gdb-6.6-buildid-locate-rpm-suse.patch index 0644e5c..b92b444 100644 --- a/gdb-6.6-buildid-locate-rpm-suse.patch +++ b/gdb-6.6-buildid-locate-rpm-suse.patch @@ -110,3 +110,19 @@ Index: gdb-7.12.1/gdb/build-id.c } } +diff --git a/gdb/build-id.c b/gdb/build-id.c +index b9ff15a..75d501a 100644 +--- a/gdb/build-id.c ++++ b/gdb/build-id.c +@@ -864,10 +864,8 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor) + #endif + { + Header h; +- char *debuginfo, **slot, *s, *s2; ++ char *debuginfo, **slot; + errmsg_t err; +- size_t srcrpmlen = sizeof (".src.rpm") - 1; +- size_t debuginfolen = sizeof ("-debuginfo") - 1; + rpmdbMatchIterator mi_debuginfo; + + h = rpmdbNextIterator_p (mi); diff --git a/gdb.changes b/gdb.changes index 0497807..2ce71b8 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Aug 23 16:00:18 UTC 2019 - Tom de Vries + +- Enable librpm for version > librpm.so.3 [bsc#1145692]: + * Allow any librpm.so.x + * Fix unused variables in HAVE_LIBRPM code in + gdb-6.6-buildid-locate-rpm-suse.patch + * Add %build test to check for "zypper install " + message + ------------------------------------------------------------------- Tue Aug 6 21:36:49 UTC 2019 - Tom de Vries diff --git a/gdb.spec b/gdb.spec index 2edf979..a568207 100644 --- a/gdb.spec +++ b/gdb.spec @@ -18,6 +18,7 @@ %if 0%{?qemu_user_space_build} +# In a qemu_user_space_build ptrace is not supported, so we can't test gdb. %global _without_testsuite 1 %endif %bcond_without testsuite @@ -275,6 +276,7 @@ BuildRequires: makeinfo %else BuildRequires: texinfo %endif +BuildRequires: expect BuildRequires: mpfr-devel BuildRequires: ncurses-devel BuildRequires: pkg-config @@ -664,16 +666,17 @@ LDFLAGS="$LDFLAGS -L$PWD/processor-trace-%{libipt_version}-root%{_libdir}" export CXXFLAGS="$CFLAGS" -export LIBRPM=no -if test -f /usr/%{_lib}/librpm.so.1; then - export LIBRPM=librpm.so.1 -fi -if test -f /usr/%{_lib}/librpm.so.2; then - export LIBRPM=librpm.so.2 -fi -if test -f /usr/%{_lib}/librpm.so.3; then - export LIBRPM=librpm.so.3 +export LIBRPM=$(ls -1 /usr/%{_lib}/ \ + | grep '^librpm.so.[0-9][0-9]*$' \ + | sort -V -r \ + | head -n 1) +if [ "$LIBRPM" != "" ]; then + export LIBRPM="/usr/%{_lib}/$LIBRPM" + [ -f "$LIBRPM" ] +else + export LIBRPM=no fi + %ifarch %ix86 ia64 ppc ppc64 ppc64le s390 s390x x86_64 aarch64 riscv64 %define build_multitarget 1 %else @@ -814,6 +817,74 @@ then cd .. fi +# This is a build-time test, but still a test. So, skip if we don't do tests. +# This is relevant for %qemu_user_space_build == 1 builds, which atm is +# the case for riscv64. +%if %{with testsuite} +if [ "$LIBRPM" != "no" ]; then + cd gdb + cat \ + > hello.c \ + < +int +main (void) +{ + printf ("hello\n"); + return 0; +} +EOF + $CC hello.c + libc=$(ldd a.out \ + | grep libc.so \ + | awk '{print $3}') + if readelf -SW $libc \ + | grep -q "\.gnu_debuglink"; then + cat \ + > test.exp \ + < Date: Tue, 10 Sep 2019 15:36:15 +0000 Subject: [PATCH 2/4] - Implements jsc#ECO-368, the 2019 toolchain module update OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=222 --- gdb.changes | 1 + gdb.spec | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb.changes b/gdb.changes index 2ce71b8..56096ec 100644 --- a/gdb.changes +++ b/gdb.changes @@ -7,6 +7,7 @@ Fri Aug 23 16:00:18 UTC 2019 - Tom de Vries gdb-6.6-buildid-locate-rpm-suse.patch * Add %build test to check for "zypper install " message +- Implements jsc#ECO-368, the 2019 toolchain module update ------------------------------------------------------------------- Tue Aug 6 21:36:49 UTC 2019 - Tom de Vries diff --git a/gdb.spec b/gdb.spec index a568207..d716700 100644 --- a/gdb.spec +++ b/gdb.spec @@ -13,7 +13,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # From 8b87f86b6e6803bd34c6837abe7e5899aab30a35b41f016b6be0c2f8dd962f65 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Tue, 10 Sep 2019 15:47:42 +0000 Subject: [PATCH 3/4] - Disable use of valgrind on old s390 (31bit) distros. OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=223 --- gdb.changes | 5 +++++ gdb.spec | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gdb.changes b/gdb.changes index 56096ec..d5c27eb 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 10 15:45:17 UTC 2019 - matz@suse.com + +- Disable use of valgrind on old s390 (31bit) distros. + ------------------------------------------------------------------- Fri Aug 23 16:00:18 UTC 2019 - Tom de Vries diff --git a/gdb.spec b/gdb.spec index d716700..b4f739a 100644 --- a/gdb.spec +++ b/gdb.spec @@ -377,8 +377,11 @@ BuildRequires: fpc %endif %endif %if 0%{?suse_version} >= 1200 +%ifnarch s390 +# s390 (for SLE12) doesn't have valgrind BuildRequires: valgrind %endif +%endif %endif # %%{with testsuite} From 8771b4d7860ab1f5e97e73ec8ecc7d86abb53d49c1e49544a06a26098c0e1ef7 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 19 Sep 2019 13:28:45 +0000 Subject: [PATCH 4/4] Accepting request 731070 from home:michel_mno:branches:devel:gcc - Add _constraints for PowerPC need more than 3.5GB disk space to avoid build failure OBS-URL: https://build.opensuse.org/request/show/731070 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=224 --- _constraints | 14 ++++++++++++++ gdb.changes | 6 ++++++ gdb.spec | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 _constraints diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..5e7b8fb --- /dev/null +++ b/_constraints @@ -0,0 +1,14 @@ + + + + ppc64 + ppc64le + + + + 4 + + + + + diff --git a/gdb.changes b/gdb.changes index d5c27eb..9e17c8c 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Sep 14 05:45:30 UTC 2019 - Michel Normand + +- Add _constraints for PowerPC need more than 3.5GB disk space + to avoid build failure + ------------------------------------------------------------------- Tue Sep 10 15:45:17 UTC 2019 - matz@suse.com diff --git a/gdb.spec b/gdb.spec index b4f739a..2f7e54f 100644 --- a/gdb.spec +++ b/gdb.spec @@ -13,7 +13,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ #