Simplify .spec: Remove conditional revert of: gdb-6.6-buildid-locate-rpm-scl.patch

This commit is contained in:
Jan Kratochvil 2016-01-09 14:46:42 +01:00
parent a4961b9190
commit 46cc044291
2 changed files with 60 additions and 43 deletions

View File

@ -1,60 +1,38 @@
warning: Skipping deprecated .gdb_index section warning: Skipping deprecated .gdb_index section
https://bugzilla.redhat.com/show_bug.cgi?id=953585 https://bugzilla.redhat.com/show_bug.cgi?id=953585
Index: gdb-7.6.90.20140127/gdb/dwarf2read.c diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb/build-id.c
=================================================================== --- gdb-7.10.50.20160106-orig/gdb/build-id.c 2016-01-09 14:40:39.420385241 +0100
--- gdb-7.6.90.20140127.orig/gdb/dwarf2read.c 2014-02-06 18:28:23.756232026 +0100 +++ gdb-7.10.50.20160106/gdb/build-id.c 2016-01-09 14:41:05.944549393 +0100
+++ gdb-7.6.90.20140127/gdb/dwarf2read.c 2014-02-06 18:28:48.969259122 +0100 @@ -713,7 +713,11 @@ static int missing_rpm_list_entries;
@@ -3035,6 +3035,14 @@ read_index_from_section (struct objfile
"set use-deprecated-index-sections on". */
if (version < 6 && !deprecated_ok)
{
+ extern int rpm_verify_vendor (const char *filename);
+
+ /* Red Hat Developer Toolset exception. */
+ if (rpm_verify_vendor (filename))
+ {}
+ else
+ {
+
static int warning_printed = 0;
if (!warning_printed)
{
@@ -3046,6 +3054,8 @@ to use the section anyway."),
warning_printed = 1;
}
return 0;
+
+ }
}
/* Version 7 indices generated by gold refer to the CU for a symbol instead
of the TU (for symbols coming from TUs),
Index: gdb-7.6.90.20140127/gdb/build-id.c
===================================================================
--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-02-06 18:28:23.758232029 +0100
+++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 18:28:26.814235312 +0100
@@ -711,7 +711,7 @@ static int missing_rpm_list_entries;
/* Returns the count of newly added rpms. */ /* Returns the count of newly added rpms. */
static int static int
-missing_rpm_enlist (const char *filename) +#ifndef GDB_INDEX_VERIFY_VENDOR
missing_rpm_enlist (const char *filename)
+#else
+missing_rpm_enlist_1 (const char *filename, int verify_vendor) +missing_rpm_enlist_1 (const char *filename, int verify_vendor)
+#endif
{ {
static int rpm_init_done = 0; static int rpm_init_done = 0;
rpmts ts; rpmts ts;
@@ -815,7 +815,7 @@ missing_rpm_enlist (const char *filename @@ -817,7 +821,11 @@ missing_rpm_enlist (const char *filename
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
if (mi != NULL) if (mi != NULL)
{ {
- for (;;) +#ifndef GDB_INDEX_VERIFY_VENDOR
for (;;)
+#else
+ if (!verify_vendor) for (;;) + if (!verify_vendor) for (;;)
+#endif
{ {
Header h; Header h;
char *debuginfo, **slot, *s, *s2; char *debuginfo, **slot, *s, *s2;
@@ -933,6 +933,35 @@ missing_rpm_enlist (const char *filename @@ -935,6 +943,37 @@ missing_rpm_enlist (const char *filename
xfree (debuginfo); xfree (debuginfo);
count++; count++;
} }
+#ifdef GDB_INDEX_VERIFY_VENDOR
+ else /* verify_vendor */ + else /* verify_vendor */
+ { + {
+ int vendor_pass = 0, vendor_fail = 0; + int vendor_pass = 0, vendor_fail = 0;
@ -84,13 +62,15 @@ Index: gdb-7.6.90.20140127/gdb/build-id.c
+ } + }
+ count = vendor_pass != 0 && vendor_fail == 0; + count = vendor_pass != 0 && vendor_fail == 0;
+ } + }
+#endif
rpmdbFreeIterator_p (mi); rpmdbFreeIterator_p (mi);
} }
@@ -943,6 +972,19 @@ missing_rpm_enlist (const char *filename @@ -945,6 +984,21 @@ missing_rpm_enlist (const char *filename
} }
static int static int
+#ifdef GDB_INDEX_VERIFY_VENDOR
+missing_rpm_enlist (const char *filename) +missing_rpm_enlist (const char *filename)
+{ +{
+ return missing_rpm_enlist_1 (filename, 0); + return missing_rpm_enlist_1 (filename, 0);
@ -104,6 +84,38 @@ Index: gdb-7.6.90.20140127/gdb/build-id.c
+} +}
+ +
+static int +static int
+#endif
missing_rpm_list_compar (const char *const *ap, const char *const *bp) missing_rpm_list_compar (const char *const *ap, const char *const *bp)
{ {
return strcoll (*ap, *bp); return strcoll (*ap, *bp);
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/dwarf2read.c gdb-7.10.50.20160106/gdb/dwarf2read.c
--- gdb-7.10.50.20160106-orig/gdb/dwarf2read.c 2016-01-09 14:40:39.416385216 +0100
+++ gdb-7.10.50.20160106/gdb/dwarf2read.c 2016-01-09 14:41:05.942549381 +0100
@@ -3111,6 +3111,16 @@ read_index_from_section (struct objfile
"set use-deprecated-index-sections on". */
if (version < 6 && !deprecated_ok)
{
+#ifdef GDB_INDEX_VERIFY_VENDOR
+ extern int rpm_verify_vendor (const char *filename);
+
+ /* Red Hat Developer Toolset exception. */
+ if (rpm_verify_vendor (filename))
+ {}
+ else
+ {
+
+#endif
static int warning_printed = 0;
if (!warning_printed)
{
@@ -3122,6 +3132,10 @@ to use the section anyway."),
warning_printed = 1;
}
return 0;
+#ifdef GDB_INDEX_VERIFY_VENDOR
+
+ }
+#endif
}
/* Version 7 indices generated by gold refer to the CU for a symbol instead
of the TU (for symbols coming from TUs),

View File

@ -27,7 +27,7 @@ Version: 7.10.50.%{snapsrc}
# The release always contains a leading reserved number, start it at 1. # The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 37%{?dist} Release: 38%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
Group: Development/Debuggers Group: Development/Debuggers
@ -879,11 +879,8 @@ find -name "*.info*"|xargs rm -f
%patch1067 -p1 %patch1067 -p1
%patch1070 -p1 %patch1070 -p1
%patch848 -p1 %patch848 -p1
%patch833 -p1 %patch833 -p1
%if 0%{!?el6:1} || 0%{!?scl:1}
%patch833 -p1 -R
%endif
%patch642 -p1 %patch642 -p1
%if 0%{?rhel:1} && 0%{?rhel} <= 6 %if 0%{?rhel:1} && 0%{?rhel} <= 6
%patch642 -p1 -R %patch642 -p1 -R
@ -955,6 +952,11 @@ export LDFLAGS="%{?__global_ldflags} %{?_with_asan:-fsanitize=address}"
CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL" CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL"
%endif %endif
# Patch833: gdb-6.6-buildid-locate-rpm-scl.patch
%if 0%{?el6:1} && 0%{?scl:1}
CFLAGS="$CFLAGS -DGDB_INDEX_VERIFY_VENDOR"
%endif
# --htmldir and --pdfdir are not used as they are used from %{gdb_build}. # --htmldir and --pdfdir are not used as they are used from %{gdb_build}.
../configure \ ../configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
@ -1397,6 +1399,9 @@ then
fi fi
%changelog %changelog
* Sat Jan 9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-38.fc24
- Simplify .spec: Remove conditional revert of: gdb-6.6-buildid-locate-rpm-scl.patch
* Sat Jan 9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-37.fc24 * Sat Jan 9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-37.fc24
- Simplify .spec: Remove conditional revert of: gdb-dts-rhel6-python-compat.patch - Simplify .spec: Remove conditional revert of: gdb-dts-rhel6-python-compat.patch