Accepting request 47227 from devel:gcc

Copy from devel:gcc/gdb based on submit request 47227 from user rguenther

OBS-URL: https://build.opensuse.org/request/show/47227
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=80
This commit is contained in:
OBS User autobuild
2010-09-06 11:08:41 +00:00
committed by Git OBS Bridge
parent b4862b49df
commit c968dfad28
121 changed files with 5896 additions and 45743 deletions

309
gdb.spec
View File

@@ -1,5 +1,5 @@
#
# spec file for package gdb (Version 7.1)
# spec file for package gdb (Version 7.2)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -23,8 +23,8 @@ Name: gdb
# Set version to contents of gdb/version.in.
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
# and, since January 2005, X.Y.Z.date for daily snapshots, like 6.3.50.20050112 # (daily snapshot from mailine), or 6.3.0.20040112 (head of the release branch).
Version: 7.1
Release: 8
Version: 7.2
Release: 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.
@@ -34,7 +34,7 @@ Group: Development/Debuggers
# Do not provide URL for snapshots as the file lasts there only for 2 days.
# ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
# ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2
Source: ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.bz2
Source: ftp://sourceware.org/pub/gdb/snapshots/branch/gdb-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://gnu.org/software/gdb/
@@ -64,10 +64,6 @@ Source2: gdb-orphanripper.c
# Man page for gstack(1).
Source3: gdb-gstack.man
# libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental).
%define libstdcxxpython libstdc++-v3-python-r155978
Source4: %{libstdcxxpython}.tar.bz2
# Work around out-of-date dejagnu that does not have KFAIL
Patch1: gdb-6.3-rh-dummykfail-20041202.patch
@@ -173,9 +169,6 @@ Patch190: gdb-6.5-dwarf-stack-overflow.patch
# Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
Patch194: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
# Fix TLS symbols resolving for objects with separate .debug file (-debuginfo).
Patch195: gdb-6.5-tls-of-separate-debuginfo.patch
# Fix TLS symbols resolving for shared libraries with a relative pathname.
# The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
Patch196: gdb-6.5-sharedlibrary-path.patch
@@ -184,9 +177,6 @@ Patch196: gdb-6.5-sharedlibrary-path.patch
# FIXME: It could be autodetected.
Patch199: gdb-6.5-bz190810-gdbserver-arch-advice.patch
# Fix `gcore' command for 32bit inferiors on 64bit hosts.
Patch201: gdb-6.5-gcore-i386-on-amd64.patch
# Testcase for deadlocking on last address space byte; for corrupted backtraces.
Patch211: gdb-6.5-last-address-space-byte-test.patch
@@ -224,9 +214,6 @@ Patch234: gdb-6.6-bz230000-power6-disassembly-test.patch
# Temporary support for shared libraries >2GB on 64bit hosts. (BZ 231832)
Patch235: gdb-6.3-bz231832-obstack-2gb.patch
# Fix prelink(8) testcase for non-root $PATH missing `/usr/sbin' (BZ 225783).
Patch240: gdb-6.6-bz225783-prelink-path.patch
# Fix debugging GDB itself - the compiled in source files paths (BZ 225783).
Patch241: gdb-6.6-bz225783-gdb-debuginfo-paths.patch
@@ -236,9 +223,6 @@ Patch245: gdb-6.6-bz229517-gcore-without-terminal.patch
# Notify user of a child forked process being detached (BZ 235197).
Patch247: gdb-6.6-bz235197-fork-detach-info.patch
# New testcase for gcore of 32bit inferiors on 64bit hosts.
Patch249: gdb-6.6-gcore32-test.patch
# Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
Patch254: gdb-6.6-testsuite-timeouts.patch
@@ -309,9 +293,6 @@ Patch318: gdb-6.8-gcc35998-ada-memory-trash.patch
# Test a crash on libraries missing the .text section.
Patch320: gdb-6.5-section-num-fixup-test.patch
# Refuse creating watchpoints of an address value, suggested by Martin Stransky.
Patch322: gdb-6.8-constant-watchpoints.patch
# Fix compatibility with recent glibc headers.
Patch324: gdb-6.8-glibc-headers-compat.patch
@@ -369,9 +350,6 @@ Patch403: gdb-ccache-workaround.patch
Patch404: gdb-fortran-common-reduce.patch
Patch405: gdb-fortran-common.patch
# Fix Fortran logical-kind=8 (BZ 465310).
Patch406: gdb-fortran-logical8.patch
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
Patch407: gdb-lineno-makeup-test.patch
@@ -384,147 +362,51 @@ Patch412: gdb-unused-revert.patch
# Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866).
Patch417: gdb-bz541866-rwatch-before-run.patch
# Remove false gdb_assert on $sp underflow.
Patch422: gdb-infcall-sp-underflow.patch
# Fix double-free on std::terminate handler (Tom Tromey, BZ 562975).
Patch429: gdb-bz562975-std-terminate-double-free.patch
# PIE: Fix back re-reun.
Patch430: gdb-pie-rerun.patch
# Do not consider memory error on reading _r_debug->r_map as fatal (BZ 576742).
Patch432: gdb-solib-memory-error-nonfatal.patch
# testsuite: Fix unstable results of gdb.base/prelink.exp.
Patch433: gdb-6.7-testsuite-stable-results-prelink.patch
# [patch 1/6] PIE: Attach binary even after re-prelinked underneath
# [patch 2/6] PIE: Attach binary even after ld.so re-prelinked underneath
# [patch 3/6] PIE: Fix occasional error attaching i686 binary
Patch434: gdb-pie-1of6-reprelinked-bin.patch
Patch435: gdb-pie-2of6-reprelinked-ld.patch
Patch436: gdb-pie-3of6-relocate-once.patch
# [expr-cumulative] using-directive: Fix memory leak (Sami Wagiaalla).
Patch437: gdb-using-directive-leak.patch
# Fix dangling displays in separate debuginfo (BZ 574483).
Patch438: gdb-bz574483-display-sepdebug.patch
# Support AVX registers (BZ 578250).
Patch439: gdb-bz578250-avx-01of10.patch
Patch440: gdb-bz578250-avx-02of10.patch
Patch441: gdb-bz578250-avx-03of10.patch
Patch442: gdb-bz578250-avx-04of10.patch
Patch443: gdb-bz578250-avx-05of10.patch
Patch444: gdb-bz578250-avx-06of10.patch
Patch445: gdb-bz578250-avx-07of10.patch
Patch446: gdb-bz578250-avx-08of10.patch
Patch447: gdb-bz578250-avx-09of10.patch
Patch448: gdb-bz578250-avx-10of10.patch
Patch449: gdb-bz578250-avx-10of10-ppc.patch
# Fix crash on C++ types in some debug info files (BZ 575292, Keith Seitz).
# Temporarily workaround the crash of BZ 575292 as there was now BZ 585445.
# Re-enable the BZ 575292 and BZ 585445 C++ fix using an updated patch.
Patch451: gdb-bz575292-delayed-physname.patch
Patch455: gdb-bz575292-void-workaround.patch
# Pretty printers not well documented (BZ 570635, Tom Tromey, Jan Kratochvil).
Patch452: gdb-bz570635-prettyprint-doc1.patch
Patch453: gdb-bz570635-prettyprint-doc2.patch
# Fix crash when using GNU IFUNC call from breakpoint condition.
Patch454: gdb-bz539590-gnu-ifunc-fix-cond.patch
# Fail gracefully if the _Unwind_DebugHook arg. is optimized out (Tom Tromey).
# Make _Unwind_DebugHook independent from step-resume breakpoint (Tom Tromey).
Patch456: gdb-unwind-debughook-safe-fail.patch
Patch457: gdb-unwind-debughook-step-independent.patch
# testsuite: Fix gdb.base/vla-overflow.exp FAILing on s390x (BZ 590635).
Patch458: gdb-archer-vla-test-oom.patch
# Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
Patch459: gdb-moribund-utrace-workaround.patch
# Fix crash on VLA bound referencing an optimized-out variable (BZ 591879).
Patch460: gdb-archer-vla-ref-optimizedout.patch
# Remove core file when starting a process (BZ 594560).
Patch461: gdb-bz594560-core-vs-process.patch
# Import fix of TUI layout internal error (BZ 595475).
Patch462: gdb-bz595475-tui-layout.patch
# Fix and support DW_OP_*piece (Tom Tromey, BZ 589467).
Patch463: gdb-bz589467-pieces01of4.patch
Patch464: gdb-bz589467-pieces02of4.patch
Patch465: gdb-bz589467-pieces03of4.patch
Patch466: gdb-bz589467-pieces1of4.patch
Patch467: gdb-bz589467-pieces2of4.patch
Patch468: gdb-bz589467-pieces3of4.patch
Patch469: gdb-bz589467-pieces4of4.patch
Patch471: gdb-bz589467-pieces-vla-compat.patch
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
Patch470: gdb-archer-next-over-throw-cxx-exec.patch
# Fix ADL anonymous type crash (BZ 600746, Sami Wagiaalla).
Patch472: gdb-bz600746-koenig-crash.patch
# Backport DWARF-4 support (BZ 601887, Tom Tromey).
Patch473: gdb-bz601887-dwarf4-1of2.patch
Patch474: gdb-bz601887-dwarf4-2of2.patch
Patch475: gdb-bz601887-dwarf4-rh-test.patch
# Fix obstack corruptions on C++ (BZ 606185, Chris Moller, Jan Kratochvil).
Patch476: gdb-bz606185-obstack-1of5.patch
Patch477: gdb-bz606185-obstack-2of5.patch
Patch478: gdb-bz606185-obstack-3of5.patch
Patch479: gdb-bz606185-obstack-4of5.patch
Patch480: gdb-bz606185-obstack-5of5.patch
# Improve support for typedefs in classes (BZ 602314).
Patch481: gdb-bz602314-ptype-class-typedef-1of3.patch
Patch482: gdb-bz602314-ptype-class-typedef-2of3.patch
Patch483: gdb-bz602314-ptype-class-typedef-3of3.patch
# Fix `set print object on' for some non-dynamic classes (BZ 606660).
Patch484: gdb-bz606660-print-object-nonvirtual.patch
# Print 2D C++ vectors as matrices (BZ 562763, sourceware10659, Chris Moller).
Patch485: gdb-bz562763-pretty-print-2d-vectors-prereq.patch
Patch486: gdb-bz562763-pretty-print-2d-vectors.patch
Patch487: gdb-bz562763-pretty-print-2d-vectors-libstdcxx.patch
# Fix prelinked executables with sepdebug and copy relocations (BZ 614659).
Patch489: gdb-bz614659-prelink-dynbss.patch
# [delayed-symfile] Fix a backtrace regression on CFIs without DIE (BZ 614604).
Patch490: gdb-bz614604-bt-cfi-without-die.patch
# Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey).
Patch491: gdb-gdb-add-index-script.patch
# Fix crash in gdbpy_is_string (BZ 611569, Tom Tromey).
Patch492: gdb-bz611569-gdbpy_is_string.patch
# Fix gcore from very small terminal windows (BZ 555076).
Patch493: gdb-bz555076-gcore-small-height.patch
# Fix long delay printing an overflown stack backtrace (BZ 620012, Tom Tromey).
Patch494: gdb-bz620012-slow-long-bt.patch
# Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248).
Patch496: gdb-bz568248-oom-is-error.patch
# Fix GDB regression for starting on r/o filesystem (BZ 602644).
Patch495: gdb-bz602644-ro-filesystem.patch
# Workaround false GCC warning(s).
Patch497: gdb-false-gcc-warning.patch
# Fix readline 5.1 warnings
Patch1000: readline-5.1-random.patch
# Upstream patch to fix gcc -Werror
Patch1001: gdb-7.1-werror.patch
Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch
# Fix build on hppa
Patch1003: gdb-hppa.patch
# Fix setting of VSX registers, bnc#626970
Patch1004: gdb-7.1-bnc626970.patch
# Fix gcore with GNU_RELRO sections, bnc#596646
Patch1005: gdb-7.2-bnc596646.patch
BuildRequires: bison flex gettext glibc-devel ncurses-devel texinfo zlib-devel
%if %{suse_version} < 1020
@@ -610,7 +492,8 @@ machine than the one which is running the program being debugged.
%setup -q -n %{gdb_src}
# libstdc++ pretty printers.
tar xjf %{SOURCE4}
# Disabled now for F-14 before rebase.
#tar xjf %{SOURCE4}
# Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
rm -f gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
@@ -659,10 +542,8 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch188 -p1
%patch190 -p1
%patch194 -p1
%patch195 -p1
%patch196 -p1
%patch199 -p1
%patch201 -p1
%patch208 -p1
%patch209 -p1
%patch211 -p1
@@ -675,11 +556,9 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch231 -p1
%patch234 -p1
%patch235 -p1
%patch240 -p1
%patch241 -p1
%patch245 -p1
%patch247 -p1
%patch249 -p1
%patch254 -p1
%patch258 -p1
%patch260 -p1
@@ -706,7 +585,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch317 -p1
%patch318 -p1
%patch320 -p1
%patch322 -p1
%patch324 -p1
%patch326 -p1
%patch329 -p1
@@ -727,81 +605,28 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch405 -p1
%patch389 -p1
%patch394 -p1
%patch406 -p1
%patch407 -p1
%patch408 -p1
%patch412 -p1
%patch417 -p1
%patch422 -p1
%patch429 -p1
%patch430 -p1
%patch432 -p1
%patch433 -p1
%patch434 -p1
%patch435 -p1
%patch436 -p1
%patch437 -p1
%patch438 -p1
%patch439 -p1
%patch440 -p1
%patch441 -p1
%patch442 -p1
%patch443 -p1
%patch444 -p1
%patch445 -p1
%patch446 -p1
%patch447 -p1
%patch448 -p1
%patch449 -p1
%patch451 -p1
%patch452 -p1
%patch453 -p1
%patch454 -p1
%patch455 -p1
%patch456 -p1
%patch457 -p1
%patch458 -p1
%patch459 -p1
%patch460 -p1
%patch461 -p1
%patch462 -p1
%patch463 -p1
%patch464 -p1
%patch465 -p1
%patch466 -p1
%patch467 -p1
%patch468 -p1
%patch469 -p1
%patch471 -p1
%patch470 -p1
%patch472 -p1
%patch473 -p1
%patch474 -p1
%patch475 -p1
%patch476 -p1
%patch477 -p1
%patch478 -p1
%patch479 -p1
%patch480 -p1
%patch481 -p1
%patch482 -p1
%patch483 -p1
%patch484 -p1
%patch485 -p1
%patch486 -p1
%patch487 -p1
# This patch should be applied to gcc-4.5+.src.rpm:
#patch487 -p1
%patch489 -p1
%patch490 -p1
%patch492 -p1
%patch494 -p1
%patch495 -p1
%patch491 -p1
%patch493 -p1
%patch496 -p1
%patch497 -p1
%patch1000
%patch1001 -p0
%patch1002 -p1
%patch1003
%patch1004 -p1
%patch1005 -p1
find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.
@@ -831,9 +656,11 @@ rm -f gdb/doc/*.info-*
# built.
# Initially we're in the %{gdb_src} directory.
rm -fr %{gdb_build}
mkdir %{gdb_build}
cd %{gdb_build}
for fprofile in %{?_with_profile:-fprofile} ""
do
mkdir %{gdb_build}$fprofile
cd %{gdb_build}$fprofile
# g77 executable is no longer present in Fedora gcc-4.x+.
g77="`which gfortran 2>/dev/null || true`"
@@ -894,7 +721,56 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
%{_target_platform}
%endif
make %{?_smp_mflags}
if [ -z "%{!?_with_profile:no}" ]
then
# Run all the configure tests being incompatible with $FPROFILE_CFLAGS.
make %{?_smp_mflags} configure-host configure-target
make %{?_smp_mflags} clean
# Workaround -fprofile-use:
# linux-x86-low.c:2225: Error: symbol `start_i386_goto' is already defined
make %{?_smp_mflags} -C gdb/gdbserver linux-x86-low.o
fi
# Global CFLAGS would fail on:
# conftest.c:1:1: error: coverage mismatch for function 'main' while reading counter 'arcs'
if [ "$fprofile" = "-fprofile" ]
then
FPROFILE_CFLAGS='-fprofile-generate'
elif [ -z "%{!?_with_profile:no}" ]
then
FPROFILE_CFLAGS='-fprofile-use'
# We cannot use -fprofile-dir as the bare filenames clash.
(cd ../%{gdb_build}-fprofile;
# It was 333 on x86_64.
test $(find -name "*.gcda"|wc -l) -gt 300
find -name "*.gcda" | while read -r i
do
ln $i ../%{gdb_build}/$i
done
)
else
FPROFILE_CFLAGS=""
fi
make %{?_smp_mflags} CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$FPROFILE_CFLAGS"
if [ "$fprofile" = "-fprofile" ]
then
cd gdb
cp -p gdb gdb-withindex
PATH="$PWD:$PATH" sh ../../gdb/gdb-add-index $PWD/gdb-withindex
./gdb -nx -ex q ./gdb-withindex
./gdb -nx -readnow -ex q ./gdb-withindex
cd ..
fi
cd ..
done # fprofile
cd %{gdb_build}
make %{?_smp_mflags} info
grep '#define HAVE_ZLIB_H 1' gdb/config.h
@@ -1008,21 +884,22 @@ ln -sf gdb $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
cmp $RPM_BUILD_ROOT%{_mandir}/*/gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
%if 0%{!?_without_python:1}
# Temporarily now:
for LIB in lib lib64;do
LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
mkdir -p $LIBPATH
# basename is being run only for the native (non-biarch) file.
sed -e 's,@pythondir@,%{_datadir}/gdb/python,' \
-e 's,@toolexeclibdir@,%{_prefix}/'"$LIB," \
< $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/hook.in \
> $LIBPATH/$(basename %{_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py
done
test ! -e $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
cp -a $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/libstdcxx \
$RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
%endif # 0%{!?_without_python:1}
# Disabled now for F-14 before rebase.
#%if 0%{!?_without_python:1}
## Temporarily now:
#for LIB in lib lib64;do
# LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
# mkdir -p $LIBPATH
# # basename is being run only for the native (non-biarch) file.
# sed -e 's,@pythondir@,%{_datadir}/gdb/python,' \
# -e 's,@toolexeclibdir@,%{_prefix}/'"$LIB," \
# < $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/hook.in \
# > $LIBPATH/$(basename %{_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py
#done
#test ! -e $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
#cp -a $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/libstdcxx \
# $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
#%endif # 0%{!?_without_python:1}
# Remove the files that are part of a gdb build but that are owned and
# provided by other packages.
@@ -1082,6 +959,7 @@ fi
%{_bindir}/gcore
%{_bindir}/gdb
%{_bindir}/gdbtui
%{_bindir}/gdb-add-index
%{_mandir}/*/gdb.1*
%{_mandir}/*/gdbtui.1*
%if 0%{!?_with_upstream:1}
@@ -1108,6 +986,9 @@ fi
%defattr(-,root,root)
%{_bindir}/gdbserver
%{_mandir}/*/gdbserver.1*
%ifnarch s390 s390x ia64 ppc
%{_libdir}/libinproctrace.so
%endif
%endif
%endif