2006-12-18 23:16:31 +00:00
#
2010-04-16 16:29:50 +00:00
# spec file for package gdb (Version 7.1)
2006-12-18 23:16:31 +00:00
#
2010-03-12 00:40:02 +00:00
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
2006-12-18 23:16:31 +00:00
#
2008-08-08 15:28:58 +00:00
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2006-12-18 23:16:31 +00:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2008-02-15 00:20:01 +00:00
2009-07-29 15:48:42 +00:00
Summary : A GNU source-level debugger for C, C++, Java and other languages
2006-12-18 23:16:31 +00:00
Name : gdb
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Set version to contents of gdb/version.in.
2010-03-12 00:40:02 +00:00
# NOTE: the FSF gdb versions are numbered N.M for official releases, like 6.3
2009-05-04 16:53:01 +00:00
# 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).
2010-04-16 16:29:50 +00:00
Version : 7.1
2010-08-27 12:50:15 +00:00
Release : 8
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# 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.
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
2009-07-29 15:48:42 +00:00
Group : Development/Debuggers
2010-04-16 16:29:50 +00:00
# Do not provide URL for snapshots as the file lasts there only for 2 days.
2010-03-12 00:40:02 +00:00
# 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
2009-05-04 16:53:01 +00:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2009-07-29 15:48:42 +00:00
Url : http://gnu.org/software/gdb/
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# For our convenience
%define gdb_src gdb-%{version}
%define gdb_build build-%{_target_platform}
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%if 0%{?_with_debug:1}
# Define this if you want to skip the strip step and preserve debug info.
# Useful for testing.
%define __debug_install_post : > %{_builddir}/%{?buildsubdir}/debugfiles.list
%define debug_package %{nil}
%endif
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Make sure we get rid of the old package gdb64, now that we have unified
# support for 32-64 bits in one single 64-bit gdb.
2008-11-03 11:06:20 +00:00
%ifarch ppc64
2009-05-04 16:53:01 +00:00
Obsoletes : gdb64 < 5.3.91
2008-11-03 11:06:20 +00:00
%endif
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# GDB patches have the format `gdb-<version>-bz<red-hat-bz-#>-<desc>.patch'.
# They should be created using patch level 1: diff -up ./gdb (or gdb-6.3/gdb).
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Cleanup any leftover testsuite processes as it may stuck mock(1) builds.
Source2 : gdb-orphanripper.c
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Man page for gstack(1).
Source3 : gdb-gstack.man
2010-03-12 00:40:02 +00:00
2009-09-26 22:03:42 +00:00
# libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental).
2010-04-16 16:29:50 +00:00
%define libstdcxxpython libstdc++-v3-python-r155978
2009-09-26 22:03:42 +00:00
Source4 : %{libstdcxxpython} .tar.bz2
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Work around out-of-date dejagnu that does not have KFAIL
Patch1 : gdb-6.3-rh-dummykfail-20041202.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Match the Fedora's version info.
Patch2 : gdb-6.3-rh-testversion-20041202.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Check that libunwind works - new test then fix
Patch3 : gdb-6.3-rh-testlibunwind-20041202.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Use convert_from_func_ptr_addr on the solib breakpoint address;
# simplifies and makes more consistent the logic.
Patch104 : gdb-6.3-ppcdotsolib-20041022.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Better parse 64-bit PPC system call prologues.
Patch105 : gdb-6.3-ppc64syscall-20040622.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Stop a backtrace when a zero PC is encountered.
Patch106 : gdb-6.3-framepczero-20040927.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Include the pc's section when doing a symbol lookup so that the
# correct symbol is found.
Patch111 : gdb-6.3-ppc64displaysymbol-20041124.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix upstream `set scheduler-locking step' vs. upstream PPC atomic seqs.
Patch112 : gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
# Make upstream `set scheduler-locking step' as default.
Patch260 : gdb-6.6-scheduler_locking-step-is-default.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Add a wrapper script to GDB that implements pstack using the
# --readnever option.
Patch118 : gdb-6.3-gstack-20050411.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# VSYSCALL and PIE
Patch122 : gdb-6.3-test-pie-20050107.patch
2010-03-12 00:40:02 +00:00
Patch389 : gdb-archer-pie-addons.patch
Patch394 : gdb-archer-pie-addons-keep-disabled.patch
2009-05-04 16:53:01 +00:00
# Get selftest working with sep-debug-info
Patch125 : gdb-6.3-test-self-20050110.patch
2010-03-12 00:40:02 +00:00
2009-08-11 16:28:33 +00:00
# Test support of multiple destructors just like multiple constructors
2009-05-04 16:53:01 +00:00
Patch133 : gdb-6.3-test-dtorfix-20050121.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix to support executable moving
Patch136 : gdb-6.3-test-movedir-20050125.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix gcore for threads
Patch140 : gdb-6.3-gcore-thread-20050204.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Stop while intentionally stepping and the thread exit is met.
2009-09-26 22:03:42 +00:00
Patch141 : gdb-6.6-step-thread-exit.patch
2009-05-04 16:53:01 +00:00
Patch259 : gdb-6.3-step-thread-exit-20050211-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Prevent gdb from being pushed into background
Patch142 : gdb-6.3-terminal-fix-20050214.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test sibling threads to set threaded watchpoints for x86 and x86-64
Patch145 : gdb-6.3-threaded-watchpoints2-20050225.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix printing of inherited members
Patch148 : gdb-6.3-inheritance-20050324.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Do not issue warning message about first page of storage for ia64 gcore
Patch153 : gdb-6.3-ia64-gcore-page0-20050421.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Security errata for untrusted .gdbinit
Patch157 : gdb-6.3-security-errata-20050610.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# IA64 sigtramp prev register patch
Patch158 : gdb-6.3-ia64-sigtramp-frame-20050708.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# IA64 gcore speed-up patch
Patch160 : gdb-6.3-ia64-gcore-speedup-20050714.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Notify observers that the inferior has been created
Patch161 : gdb-6.3-inferior-notification-20050721.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix ia64 info frame bug
Patch162 : gdb-6.3-ia64-info-frame-fix-20050725.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Verify printing of inherited members test
Patch163 : gdb-6.3-inheritancetest-20050726.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Add readnever option
Patch164 : gdb-6.3-readnever-20050907.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix ia64 gdb problem with user-specified SIGILL handling
Patch169 : gdb-6.3-ia64-sigill-20051115.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Allow option to continue backtracing past a zero pc value
Patch170 : gdb-6.3-bt-past-zero-20051201.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Use bigger numbers than int.
Patch176 : gdb-6.3-large-core-20051206.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661).
Patch188 : gdb-6.5-bz203661-emit-relocs.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Security patch: avoid stack overflows in dwarf expression computation.
# CVE-2006-4146
Patch190 : gdb-6.5-dwarf-stack-overflow.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
Patch194 : gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix TLS symbols resolving for objects with separate .debug file (-debuginfo).
Patch195 : gdb-6.5-tls-of-separate-debuginfo.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# 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
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Suggest fixing your target architecture for gdbserver(1) (BZ 190810).
# FIXME: It could be autodetected.
Patch199 : gdb-6.5-bz190810-gdbserver-arch-advice.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix `gcore' command for 32bit inferiors on 64bit hosts.
Patch201 : gdb-6.5-gcore-i386-on-amd64.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Testcase for deadlocking on last address space byte; for corrupted backtraces.
Patch211 : gdb-6.5-last-address-space-byte-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Improved testsuite results by the testsuite provided by the courtesy of BEA.
Patch208 : gdb-6.5-BEA-testsuite.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix readline segfault on excessively long hand-typed lines.
Patch209 : gdb-6.5-readline-long-line-crash.patch
Patch213 : gdb-6.5-readline-long-line-crash-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711).
Patch214 : gdb-6.5-bz216711-clone-is-outermost.patch
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
2009-05-04 16:53:01 +00:00
Patch216 : gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
Patch217 : gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Find symbols properly at their original (included) file (BZ 109921).
Patch225 : gdb-6.5-bz109921-DW_AT_decl_file-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Update PPC unwinding patches to their upstream variants (BZ 140532).
Patch229 : gdb-6.3-bz140532-ppc-unwinding-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Testcase for exec() from threaded program (BZ 202689).
Patch231 : gdb-6.3-bz202689-exec-from-pthread-test.patch
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# Backported fixups post the source tarball.
Patch232 : gdb-upstream.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
Patch234 : gdb-6.6-bz230000-power6-disassembly-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Temporary support for shared libraries >2GB on 64bit hosts. (BZ 231832)
Patch235 : gdb-6.3-bz231832-obstack-2gb.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix prelink(8) testcase for non-root $PATH missing `/usr/sbin' (BZ 225783).
Patch240 : gdb-6.6-bz225783-prelink-path.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix debugging GDB itself - the compiled in source files paths (BZ 225783).
Patch241 : gdb-6.6-bz225783-gdb-debuginfo-paths.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
Patch245 : gdb-6.6-bz229517-gcore-without-terminal.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Notify user of a child forked process being detached (BZ 235197).
Patch247 : gdb-6.6-bz235197-fork-detach-info.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# New testcase for gcore of 32bit inferiors on 64bit hosts.
Patch249 : gdb-6.6-gcore32-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
Patch254 : gdb-6.6-testsuite-timeouts.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Support for stepping over PPC atomic instruction sequences (BZ 237572).
Patch258 : gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Link with libreadline provided by the operating system.
Patch261 : gdb-6.6-readline-system.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test kernel VDSO decoding while attaching to an i386 process.
Patch263 : gdb-6.3-attach-see-vdso-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Do not hang on exit of a thread group leader (BZ 247354).
Patch265 : gdb-6.6-bz247354-leader-exit-fix.patch
Patch266 : gdb-6.6-bz247354-leader-exit-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test leftover zombie process (BZ 243845).
Patch271 : gdb-6.5-bz243845-stale-testing-zombie-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# New locating of the matching binaries from the pure core file (build-id).
Patch274 : gdb-6.6-buildid-locate.patch
Patch353 : gdb-6.6-buildid-locate-rpm.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix displaying of numeric char arrays as strings (BZ 224128).
Patch282 : gdb-6.7-charsign-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test PPC hiding of call-volatile parameter register.
Patch284 : gdb-6.7-ppc-clobbered-registers-O2-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Testsuite fixes for more stable/comparable results.
Patch287 : gdb-6.7-testsuite-stable-results.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test ia64 memory leaks of the code using libunwind.
Patch289 : gdb-6.5-ia64-libunwind-leak-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test hiding unexpected breakpoints on intentional step commands.
Patch290 : gdb-6.5-missed-trap-on-step-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ 426600).
Patch293 : gdb-6.7-bz426600-DW_TAG_interface_type-fix.patch
Patch294 : gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test gcore memory and time requirements for large inferiors.
Patch296 : gdb-6.5-gcore-buffer-limit-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test debugging statically linked threaded inferiors (BZ 239652).
# - It requires recent glibc to work in this case properly.
Patch298 : gdb-6.6-threads-static-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix #include <asm/ptrace.h> on kernel-headers-2.6.25-0.40.rc1.git2.fc9.x86_64.
Patch304 : gdb-6.7-kernel-headers-compat.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test GCORE for shmid 0 shared memory mappings.
Patch309 : gdb-6.3-mapping-zero-inode-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test a crash on `focus cmd', `focus prev' commands.
Patch311 : gdb-6.3-focus-cmd-prev-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test various forms of threads tracking across exec() (BZ 442765).
Patch315 : gdb-6.8-bz442765-threaded-exec-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Silence memcpy check which returns false positive (sparc64)
Patch317 : gdb-6.8-sparc64-silence-memcpy-check.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix memory trashing on binaries from GCC Ada (workaround GCC PR 35998).
Patch318 : gdb-6.8-gcc35998-ada-memory-trash.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test a crash on libraries missing the .text section.
Patch320 : gdb-6.5-section-num-fixup-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Refuse creating watchpoints of an address value, suggested by Martin Stransky.
Patch322 : gdb-6.8-constant-watchpoints.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix compatibility with recent glibc headers.
Patch324 : gdb-6.8-glibc-headers-compat.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Create a single binary `gdb' autodetecting --tui by its argv[0].
Patch326 : gdb-6.8-tui-singlebinary.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix PRPSINFO in the core files dumped by gcore (BZ 254229).
Patch329 : gdb-6.8-bz254229-gcore-prpsinfo.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix register assignments with no GDB stack frames (BZ 436037).
Patch330 : gdb-6.8-bz436037-reg-no-longer-active.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Make the GDB quit processing non-abortable to cleanup everything properly.
Patch331 : gdb-6.8-quit-never-aborts.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Support DW_TAG_constant for Fortran in recent Fedora/RH GCCs.
Patch332 : gdb-6.8-fortran-tag-constant.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix attaching to stopped processes and/or pending signals.
Patch337 : gdb-6.8-attach-signalled-detach-stopped.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Test the watchpoints conditionals works.
Patch343 : gdb-6.8-watchpoint-conditionals-test.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
Patch348 : gdb-6.8-bz466901-backtrace-full-prelinked.patch
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# The merged branch `archer' of: http://sourceware.org/gdb/wiki/ProjectArcher
Patch349 : gdb-archer.patch
2010-03-12 00:40:02 +00:00
Patch420 : gdb-archer-ada.patch
2009-05-04 16:53:01 +00:00
# Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187).
# - Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE.
2009-07-29 15:48:42 +00:00
Patch360 : gdb-6.8-bz457187-largefile-test.patch
2010-03-12 00:40:02 +00:00
2009-10-12 14:27:52 +00:00
# New test for step-resume breakpoint placed in multiple threads at once.
Patch381 : gdb-simultaneous-step-resume-breakpoint-test.patch
2010-03-12 00:40:02 +00:00
2009-11-23 12:19:03 +00:00
# Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
Patch382 : gdb-core-open-vdso-warning.patch
2010-03-12 00:40:02 +00:00
# Fix syscall restarts for amd64->i386 biarch.
Patch391 : gdb-x86_64-i386-syscall-restart.patch
# Fix stepping with OMP parallel Fortran sections (BZ 533176).
Patch392 : gdb-bz533176-fortran-omp-step.patch
# Fix regression by python on ia64 due to stale current frame.
Patch397 : gdb-follow-child-stale-parent.patch
2010-04-16 16:29:50 +00:00
# Workaround ccache making lineno non-zero for command-line definitions.
Patch403 : gdb-ccache-workaround.patch
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# Implement `info common' for Fortran.
Patch404 : gdb-fortran-common-reduce.patch
Patch405 : gdb-fortran-common.patch
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# Fix Fortran logical-kind=8 (BZ 465310).
Patch406 : gdb-fortran-logical8.patch
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
Patch407 : gdb-lineno-makeup-test.patch
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# Test power7 ppc disassembly.
Patch408 : gdb-ppc-power7-test.patch
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# Revert: Add -Wunused-function to compile flags.
Patch412 : gdb-unused-revert.patch
2010-03-12 00:40:02 +00:00
# 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
2010-04-16 16:29:50 +00:00
# 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
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# Do not consider memory error on reading _r_debug->r_map as fatal (BZ 576742).
Patch432 : gdb-solib-memory-error-nonfatal.patch
2010-03-12 00:40:02 +00:00
2010-04-16 16:29:50 +00:00
# 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
2010-03-12 00:40:02 +00:00
2010-05-25 12:02:22 +00:00
# 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
2010-07-23 19:40:40 +00:00
# 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
2010-04-25 16:40:42 +00:00
2010-08-09 00:12:37 +00:00
# Fix crash in gdbpy_is_string (BZ 611569, Tom Tromey).
Patch492 : gdb-bz611569-gdbpy_is_string.patch
2010-08-27 12:50:15 +00:00
# Fix long delay printing an overflown stack backtrace (BZ 620012, Tom Tromey).
Patch494 : gdb-bz620012-slow-long-bt.patch
# Fix GDB regression for starting on r/o filesystem (BZ 602644).
Patch495 : gdb-bz602644-ro-filesystem.patch
2009-05-04 16:53:01 +00:00
# Fix readline 5.1 warnings
Patch1000 : readline-5.1-random.patch
2010-07-23 19:40:40 +00:00
# Upstream patch to fix gcc -Werror
Patch1001 : gdb-7.1-werror.patch
2009-05-07 15:40:45 +00:00
Patch1002 : gdb-6.6-buildid-locate-rpm-suse.patch
2010-07-23 19:40:40 +00:00
# Fix build on hppa
Patch1003 : gdb-hppa.patch
2010-08-27 12:50:15 +00:00
# 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
2010-03-12 00:40:02 +00:00
2009-05-07 15:40:45 +00:00
BuildRequires : bison flex gettext glibc-devel ncurses-devel texinfo zlib-devel
%if %{suse_version} < 1020
BuildRequires : expat
%else
BuildRequires : libexpat-devel
%endif
2009-05-04 16:53:01 +00:00
BuildRequires : readline-devel
2010-03-12 00:40:02 +00:00
BuildRequires : zlib-devel
2009-07-29 15:48:42 +00:00
%if 0%{!?_without_python:1}
2009-11-23 12:19:03 +00:00
%if 0%{suse_version} > 1000
Recommends: python-base
%endif
2009-05-04 16:53:01 +00:00
BuildRequires : python-devel
2009-07-29 15:48:42 +00:00
%endif # 0%{!?_without_python:1}
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%if 0%{?_with_testsuite:1}
2010-03-12 00:40:02 +00:00
# Ensure the devel libraries are installed for both multilib arches.
%define bits_local %{?_isa}
%define bits_other %{?_isa}
2010-04-16 16:29:50 +00:00
%if 0%{!?el5:1}
2010-03-12 00:40:02 +00:00
%ifarch s390x
2010-04-16 16:29:50 +00:00
%define bits_other (%{__isa_name}-32)
2010-03-12 00:40:02 +00:00
%else #!s390x
%ifarch ppc
%define bits_other (%{__isa_name}-64)
%else #!ppc
%ifarch sparc64 ppc64 s390x x86_64
%define bits_other (%{__isa_name}-32)
%endif #sparc64 ppc64 s390x x86_64
%endif #!ppc
%endif #!s390x
2010-04-16 16:29:50 +00:00
%endif #!el5
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
BuildRequires : dejagnu sharutils
# gcc-objc++ is not covered by the GDB testsuite.
BuildRequires : gcc gcc-c++ gcc-gfortran gcc-java gcc-objc
2010-03-12 00:40:02 +00:00
# Copied from gcc-4.1.2-32.
2009-05-04 16:53:01 +00:00
%ifarch %{ix86} x86_64 ia64 ppc alpha
BuildRequires : gcc-ada
%endif
2010-03-12 00:40:02 +00:00
BuildRequires : glibc-devel-32bit
%if 0%{suse_version} > 1120
BuildRequires : gcc-c++-32bit
2009-05-04 16:53:01 +00:00
%endif
2010-03-12 00:40:02 +00:00
%endif # 0%{?_with_testsuite:1}
2009-05-04 16:53:01 +00:00
%ifarch ia64
BuildRequires : libunwind-devel
Requires : libunwind
%endif
2010-03-12 00:40:02 +00:00
2009-10-12 14:27:52 +00:00
PreReq : %install_info_prereq
2006-12-18 23:16:31 +00:00
%description
2009-07-29 15:48:42 +00:00
GDB, the GNU debugger, allows you to debug programs written in C, C++,
Java, and other languages, by executing them in a controlled fashion
and printing their data.
2008-05-09 22:02:58 +00:00
2010-08-09 00:12:37 +00:00
%if %{suse_version} > 1010
2008-05-09 22:02:58 +00:00
%package -n gdbserver
2010-04-16 16:29:50 +00:00
License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
2009-07-29 15:48:42 +00:00
Summary : A standalone server for GDB (the GNU source-level debugger)
Group : Development/Debuggers
2008-05-09 22:02:58 +00:00
%description -n gdbserver
2009-07-29 15:48:42 +00:00
GDB, the GNU debugger, allows you to debug programs written in C, C++,
Java, and other languages, by executing them in a controlled fashion
and printing their data.
2008-05-09 22:02:58 +00:00
2010-04-16 16:29:50 +00:00
This package provides a program that allows you to run GDB on a different
machine than the one which is running the program being debugged.
2010-08-09 00:12:37 +00:00
%endif
2006-12-18 23:16:31 +00:00
%prep
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# This allows the tarball name to be different from our
# version-release name.
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%setup -q -n %{gdb_src}
2010-03-12 00:40:02 +00:00
2009-09-26 22:03:42 +00:00
# libstdc++ pretty printers.
2010-03-12 00:40:02 +00:00
tar xjf %{SOURCE4}
2009-05-04 16:53:01 +00:00
# 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
rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Apply patches defined above.
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Match the Fedora's version info.
%patch2 -p1
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%if 0%{!?_with_upstream:1}
2010-03-12 00:40:02 +00:00
%patch232 -p1
2009-05-04 16:53:01 +00:00
%patch349 -p1
2010-03-12 00:40:02 +00:00
%patch420 -p1
2009-05-04 16:53:01 +00:00
%patch1 -p1
%patch3 -p1
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch111 -p1
%patch112 -p1
%patch118 -p1
%patch122 -p1
%patch125 -p1
%patch133 -p1
%patch136 -p1
%patch140 -p1
2009-09-26 22:03:42 +00:00
%patch141 -p1
2009-05-04 16:53:01 +00:00
%patch259 -p1
%patch142 -p1
%patch145 -p1
%patch148 -p1
%patch153 -p1
%patch157 -p1
%patch158 -p1
%patch160 -p1
%patch161 -p1
%patch162 -p1
%patch163 -p1
%patch164 -p1
%patch169 -p1
%patch170 -p1
%patch176 -p1
%patch188 -p1
%patch190 -p1
%patch194 -p1
%patch195 -p1
%patch196 -p1
%patch199 -p1
%patch201 -p1
%patch208 -p1
%patch209 -p1
%patch211 -p1
%patch213 -p1
%patch214 -p1
%patch216 -p1
%patch217 -p1
%patch225 -p1
%patch229 -p1
%patch231 -p1
%patch234 -p1
%patch235 -p1
%patch240 -p1
%patch241 -p1
%patch245 -p1
%patch247 -p1
%patch249 -p1
%patch254 -p1
%patch258 -p1
%patch260 -p1
%patch261 -p1
%patch263 -p1
%patch265 -p1
%patch266 -p1
%patch271 -p1
%patch274 -p1
%patch353 -p1
%patch282 -p1
%patch284 -p1
%patch287 -p1
%patch289 -p1
%patch290 -p1
%patch293 -p1
%patch294 -p1
%patch296 -p1
%patch298 -p1
%patch304 -p1
%patch309 -p1
%patch311 -p1
%patch315 -p1
%patch317 -p1
%patch318 -p1
%patch320 -p1
%patch322 -p1
%patch324 -p1
%patch326 -p1
%patch329 -p1
%patch330 -p1
%patch331 -p1
%patch332 -p1
%patch337 -p1
%patch343 -p1
%patch348 -p1
2009-07-29 15:48:42 +00:00
%patch360 -p1
2009-10-12 14:27:52 +00:00
%patch381 -p1
2009-11-23 12:19:03 +00:00
%patch382 -p1
2010-03-12 00:40:02 +00:00
%patch391 -p1
%patch392 -p1
%patch397 -p1
2010-04-16 16:29:50 +00:00
%patch403 -p1
%patch404 -p1
%patch405 -p1
%patch389 -p1
%patch394 -p1
%patch406 -p1
%patch407 -p1
%patch408 -p1
%patch412 -p1
2010-03-12 00:40:02 +00:00
%patch417 -p1
%patch422 -p1
2010-04-16 16:29:50 +00:00
%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
2010-05-25 12:02:22 +00:00
%patch451 -p1
%patch452 -p1
%patch453 -p1
%patch454 -p1
%patch455 -p1
%patch456 -p1
%patch457 -p1
%patch458 -p1
%patch459 -p1
%patch460 -p1
2010-07-23 19:40:40 +00:00
%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
%patch489 -p1
%patch490 -p1
2010-08-09 00:12:37 +00:00
%patch492 -p1
2010-08-27 12:50:15 +00:00
%patch494 -p1
%patch495 -p1
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%patch1000
2010-05-25 12:02:22 +00:00
%patch1001 -p0
2009-05-07 15:40:45 +00:00
%patch1002 -p1
2010-07-23 19:40:40 +00:00
%patch1003
2010-08-27 12:50:15 +00:00
%patch1004 -p1
%patch1005 -p1
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
find -name " * . o r i g " | xargs rm -f
2010-03-12 00:40:02 +00:00
! find -name " * . r e j " # Should not happen.
%endif # 0%{!?_with_upstream:1}
2009-05-15 21:24:41 +00:00
# Change the version that gets printed at GDB startup, so it is SUSE
2009-05-04 16:53:01 +00:00
# specific.
2010-03-12 00:40:02 +00:00
# Fedora (%{version}-%{release})
# Red Hat Enterprise Linux (%{version}-%{release})
2009-05-04 16:53:01 +00:00
cat > gdb/version.in << _FOO
2009-05-15 21:24:41 +00:00
SUSE (%{version} -%{release} )
2009-05-04 16:53:01 +00:00
_FOO
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Remove the info and other generated files added by the FSF release
# process.
rm -f libdecnumber/gstdint.h
rm -f bfd/doc/*.info
rm -f bfd/doc/*.info-*
rm -f gdb/doc/*.info
rm -f gdb/doc/*.info-*
2006-12-18 23:16:31 +00:00
%build
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Identify the build directory with the version of gdb as well as the
# architecture, to allow for mutliple versions to be installed and
# built.
# Initially we're in the %{gdb_src} directory.
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
rm -fr %{gdb_build}
mkdir %{gdb_build}
cd %{gdb_build}
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# g77 executable is no longer present in Fedora gcc-4.x+.
g77=" ` w h i c h g f o r t r a n 2 > / d e v / n u l l | | t r u e ` "
test -z " $ g 7 7 " || ln -s " $ g 7 7 " ./g77
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
export CFLAGS=" $RPM_OPT_FLAGS "
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%if 0%{?_with_debug:1}
# --enable-werror could conflict with `-Wall -O0' but this is no longer true
# for recent GCCs.
CFLAGS=" $ C F L A G S - O 0 - g g d b 2 "
2008-08-08 15:28:58 +00:00
%endif
2010-03-12 00:40:02 +00:00
../configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--with-gdb-datadir=%{_datadir} /gdb \
--with-pythondir=%{_datadir} /gdb/python \
--enable-gdb-build-warnings=,-Wno-unused \
2009-05-04 16:53:01 +00:00
%ifnarch %{ix86} alpha ia64 ppc s390 s390x x86_64 ppc64 sparcv9 sparc64
2010-03-12 00:40:02 +00:00
--disable-werror \
%else
2009-05-04 16:53:01 +00:00
%if 0%{?_with_upstream:1}
2010-03-12 00:40:02 +00:00
--disable-werror \
2008-08-08 15:28:58 +00:00
%else
2010-03-12 00:40:02 +00:00
--enable-werror \
2009-05-04 16:53:01 +00:00
%endif
2008-08-08 15:28:58 +00:00
%endif
2010-03-12 00:40:02 +00:00
--with-separate-debug-dir=/usr/lib/debug \
--disable-sim \
--disable-rpath \
--with-system-readline \
--with-expat \
$(: ppc64 host build crashes on ppc variant of libexpat.so ) \
--without-libexpat-prefix \
--enable-tui \
2009-07-29 15:48:42 +00:00
%if 0%{!?_without_python:1}
2010-03-12 00:40:02 +00:00
--with-python \
2009-07-29 15:48:42 +00:00
%else
2010-03-12 00:40:02 +00:00
--without-python \
2009-07-29 15:48:42 +00:00
%endif
2010-03-12 00:40:02 +00:00
--without-rpm \
2006-12-18 23:16:31 +00:00
%ifarch ia64
2010-03-12 00:40:02 +00:00
--with-libunwind \
2006-12-18 23:16:31 +00:00
%else
2010-03-12 00:40:02 +00:00
--without-libunwind \
2006-12-18 23:16:31 +00:00
%endif
2010-03-12 00:40:02 +00:00
--enable-64-bit-bfd \
2009-05-04 16:53:01 +00:00
%if 0%{?_with_debug:1}
2010-03-12 00:40:02 +00:00
--enable-static --disable-shared --enable-debug \
2009-05-04 16:53:01 +00:00
%endif
%ifarch sparcv9
sparc-%{_vendor}-%{_target_os}%{?_gnu}
%else
%{_target_platform}
%endif
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
make %{?_smp_mflags}
make %{?_smp_mflags} info
2010-03-12 00:40:02 +00:00
grep '#define HAVE_ZLIB_H 1' gdb/config.h
2009-05-04 16:53:01 +00:00
# Copy the <sourcetree>/gdb/NEWS file to the directory above it.
cp $RPM_BUILD_DIR /%{gdb_src} /gdb/NEWS $RPM_BUILD_DIR /%{gdb_src}
2008-03-06 00:01:27 +00:00
%check
2009-05-04 16:53:01 +00:00
# Initially we're in the %{gdb_src} directory.
cd %{gdb_build}
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%if 0%{!?_with_testsuite:1}
echo ====================TESTSUITE DISABLED=========================
%else
echo ====================TESTING=========================
cd gdb
2010-03-12 00:40:02 +00:00
gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
2009-05-04 16:53:01 +00:00
# Need to use a single --ignore option, second use overrides first.
# No `%{?_smp_mflags}' here as it may race.
# WARNING: can't generate a core file - core tests suppressed - check ulimit
# "readline-overflow.exp" - Testcase is broken, functionality is OK.
(
# ULIMIT required for `gdb.base/auxv.exp'.
ulimit -H -c
ulimit -c unlimited || :
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Setup $CHECK as `check//unix/' or `check//unix/-m64' for explicit bitsize.
# Never use two different bitsizes as it fails on ppc64.
echo 'int main (void) { return 0; }' >biarch.c
CHECK=" "
for BI in -m64 -m32 -m31 " "
do
# Do not use size-less options if any of the sizes works.
# On ia64 there is no -m64 flag while we must not leave a bare `check' here
# as it would switch over some testing scripts to the backward compatibility
# mode: when `make check' was executed from inside the testsuite/ directory.
if [ -z " $ B I " -a -n " $ C H E C K " ];then
continue
fi
# Do not use $RPM_OPT_FLAGS as the other non-size options will not be used
# in the real run of the testsuite.
if ! gcc $BI -o biarch biarch.c
then
continue
fi
CHECK=" $ C H E C K c h e c k / / u n i x / $ B I "
done
# Do not try -m64 inferiors for -m32 GDB as it cannot handle inferiors larger
# than itself.
# s390 -m31 still uses the standard ELF32 binary format.
gcc $RPM_OPT_FLAGS -o biarch biarch.c
RPM_SIZE=" $ ( f i l e . / b i a r c h | s e d - n ' s / ^ . * : E L F \ ( 3 2 \ | 6 4 \ ) - b i t . * $ / \1 / p ' ) "
if [ " $RPM_SIZE " != " 6 4 " ]
then
CHECK=" $ ( e c h o " $CHECK " | s e d ' s # c h e c k / / u n i x / - m 6 4 # # ' ) "
fi
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Disable some problematic testcases.
# RUNTESTFLAGS='--ignore ...' is not used below as it gets separated by the
# `check//...' target spawn and too much escaping there would be dense.
for test in \
gdb.base/readline-overflow.exp \
gdb.base/bigcore.exp \
; do
mv -f ../../gdb/testsuite/$test ../gdb/testsuite/$test-DISABLED || :
done
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%if 0%{!?_with_upstream:1}
# Run all the scheduled testsuite runs also in the PIE mode.
# Upstream GDB would lock up the testsuite run for too long on its failures.
CHECK=" $ ( e c h o $ C H E C K | s e d ' s # c h e c k / / u n i x / [ ^ ] * # & & / - f P I E / - p i e # g ' ) "
2010-03-12 00:40:02 +00:00
%endif # 0%{!?_with_upstream:1}
./orphanripper make %{?_smp_mflags} -k $CHECK \
$(: Serialize the output to keep the order for regression checks. ) \
%if 0%{?el5:1}
RUNTESTFLAGS=" - - t o o l g d b " \
%endif
|| :
2009-05-04 16:53:01 +00:00
)
for t in sum log
do
for file in testsuite*/gdb.$t
do
suffix=" $ { f i l e # t e s t s u i t e . u n i x . } "
suffix=" $ { s u f f i x % / g d b . $ t } "
ln $file gdb-%{_target_platform}$suffix.$t || :
done
done
# `tar | bzip2 | uuencode' may have some piping problems in Brew.
tar cjf gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}*.{sum,log}
uuencode gdb-%{_target_platform}.tar.bz2 gdb-%{_target_platform}.tar.bz2
cd ../..
echo ====================TESTING END=====================
%endif
2006-12-18 23:16:31 +00:00
%install
2009-05-04 16:53:01 +00:00
# Initially we're in the %{gdb_src} directory.
cd %{gdb_build}
rm -rf $RPM_BUILD_ROOT
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# install the gcore script in /usr/bin
cp $RPM_BUILD_DIR /%{gdb_src} /gdb/gdb_gcore.sh $RPM_BUILD_ROOT %{_bindir} /gcore
chmod 755 $RPM_BUILD_ROOT %{_bindir} /gcore
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Remove the gdb/gdbtui binaries duplicity.
test -x $RPM_BUILD_ROOT %{_prefix} /bin/gdbtui
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
2010-03-12 00:40:02 +00:00
2009-09-26 22:03:42 +00:00
%if 0%{!?_without_python:1}
# Temporarily now:
for LIB in lib lib64;do
LIBPATH=" $RPM_BUILD_ROOT %{_datadir} / g d b / a u t o - l o a d %{_prefix} / $ L I B "
mkdir -p $LIBPATH
# basename is being run only for the native (non-biarch) file.
2009-10-12 14:27:52 +00:00
sed -e 's,@pythondir@,%{_datadir}/gdb/python,' \
2009-09-26 22:03:42 +00:00
-e 's,@toolexeclibdir@,%{_prefix}/' " $ L I B , " \
< $RPM_BUILD_DIR /%{gdb_src} /%{libstdcxxpython} /hook.in \
> $LIBPATH/$(basename %{_prefix} /%{_lib}/libstdc++.so.6.*)-gdb.py
done
2009-10-12 14:27:52 +00:00
test ! -e $RPM_BUILD_ROOT %{_datadir} /gdb/python/libstdcxx
2009-09-26 22:03:42 +00:00
cp -a $RPM_BUILD_DIR /%{gdb_src} /%{libstdcxxpython} /libstdcxx \
2009-10-12 14:27:52 +00:00
$RPM_BUILD_ROOT %{_datadir} /gdb/python/libstdcxx
2010-03-12 00:40:02 +00:00
%endif # 0%{!?_without_python:1}
2009-05-04 16:53:01 +00:00
# Remove the files that are part of a gdb build but that are owned and
# provided by other packages.
# These are part of binutils
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
rm -rf $RPM_BUILD_ROOT %{_datadir} /locale/
rm -f $RPM_BUILD_ROOT %{_infodir} /bfd*
rm -f $RPM_BUILD_ROOT %{_infodir} /standard*
rm -f $RPM_BUILD_ROOT %{_infodir} /mmalloc*
rm -f $RPM_BUILD_ROOT %{_infodir} /configure*
rm -rf $RPM_BUILD_ROOT %{_includedir}
rm -rf $RPM_BUILD_ROOT /%{_libdir} /lib{bfd*,opcodes*,iberty*,mmalloc*}
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# Delete this too because the dir file will be updated at rpm install time.
# We don't want a gdb specific one overwriting the system wide one.
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
rm -f $RPM_BUILD_ROOT %{_infodir} /dir
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
%if 0%{!?_with_upstream:1}
# pstack obsoletion
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
cp -p %{SOURCE3} $RPM_BUILD_ROOT %{_mandir} /man1/gstack.1
%endif # 0%{!?_with_upstream:1}
2006-12-18 23:16:31 +00:00
%clean
rm -rf $RPM_BUILD_ROOT
%post
2009-05-04 16:53:01 +00:00
# This step is part of the installation of the RPM. Not to be confused
# with the 'make install ' of the build (rpmbuild) process.
2006-12-18 23:16:31 +00:00
2010-03-12 00:40:02 +00:00
# For --excludedocs:
if [ -e %{_infodir} /gdb.info.gz ]
then
%install_info --info-dir=%{_infodir} %{_infodir} /annotate.info.gz
%install_info --info-dir=%{_infodir} %{_infodir} /gdb.info.gz
%install_info --info-dir=%{_infodir} %{_infodir} /gdbint.info.gz
%install_info --info-dir=%{_infodir} %{_infodir} /stabs.info.gz
fi
%preun
if [ $1 = 0 ]
then
# For --excludedocs:
if [ -e %{_infodir} /gdb.info.gz ]
then
%install_info_delete --delete --info-dir=%{_infodir} %{_infodir} /annotate.info.gz
%install_info_delete --delete --info-dir=%{_infodir} %{_infodir} /gdb.info.gz
%install_info_delete --delete --info-dir=%{_infodir} %{_infodir} /gdbint.info.gz
%install_info_delete --delete --info-dir=%{_infodir} %{_infodir} /stabs.info.gz
fi
fi
2006-12-18 23:16:31 +00:00
%files
%defattr (-,root,root)
2010-04-16 16:29:50 +00:00
%doc COPYING3 COPYING COPYING.LIB README NEWS
2009-05-04 16:53:01 +00:00
%{_bindir} /gcore
2006-12-18 23:16:31 +00:00
%{_bindir} /gdb
2009-05-04 16:53:01 +00:00
%{_bindir} /gdbtui
%{_mandir} /*/gdb.1*
%{_mandir} /*/gdbtui.1*
%if 0%{!?_with_upstream:1}
2006-12-18 23:16:31 +00:00
%{_bindir} /gstack
2009-05-04 16:53:01 +00:00
%{_mandir} /*/gstack.1*
%endif # 0%{!?_with_upstream:1}
2009-09-26 22:03:42 +00:00
%{_datadir} /gdb
2009-05-04 16:53:01 +00:00
%{_infodir} /annotate.info*
%{_infodir} /gdb.info*
%{_infodir} /gdbint.info*
%{_infodir} /stabs.info*
2010-08-09 00:12:37 +00:00
# In SLE10 gdbserver is not in a separate package
%if %{suse_version} <= 1010
%{_bindir} /gdbserver
%{_mandir} /*/gdbserver.1*
%endif
2010-03-12 00:40:02 +00:00
2009-05-04 16:53:01 +00:00
# don't include the files in include, they are part of binutils
2010-03-12 00:40:02 +00:00
2010-08-09 00:12:37 +00:00
%if %{suse_version} > 1010
2010-07-23 19:40:40 +00:00
%ifnarch sparcv9 hppa
2008-05-09 22:02:58 +00:00
%files -n gdbserver
%defattr (-,root,root)
2006-12-18 23:16:31 +00:00
%{_bindir} /gdbserver
2009-05-04 16:53:01 +00:00
%{_mandir} /*/gdbserver.1*
2006-12-18 23:16:31 +00:00
%endif
2010-08-09 00:12:37 +00:00
%endif
2008-01-10 14:35:00 +00:00
2007-03-06 08:04:12 +00:00
%changelog