2011-08-11 13:47:51 +00:00
|
|
|
#
|
2014-02-10 17:10:42 +00:00
|
|
|
# spec file for package gdb
|
|
|
|
#
|
2019-01-18 13:31:48 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-02-10 17:23:45 +00:00
|
|
|
# Copyright (c) 2012 RedHat
|
2014-02-10 17:10:42 +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
|
2011-08-11 13:47:51 +00:00
|
|
|
# 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
|
2014-02-10 17:10:42 +00:00
|
|
|
# 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.
|
|
|
|
|
2019-10-30 13:43:38 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-08-11 13:47:51 +00:00
|
|
|
#
|
2011-03-10 09:18:33 +00:00
|
|
|
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2017-11-15 12:32:21 +00:00
|
|
|
%if 0%{?qemu_user_space_build}
|
2019-09-10 15:34:12 +00:00
|
|
|
# In a qemu_user_space_build ptrace is not supported, so we can't test gdb.
|
2017-11-15 12:32:21 +00:00
|
|
|
%global _without_testsuite 1
|
|
|
|
%endif
|
|
|
|
%bcond_without testsuite
|
2019-11-12 14:23:29 +00:00
|
|
|
%bcond_without fpc
|
2014-08-13 11:27:24 +00:00
|
|
|
|
2014-02-10 17:23:45 +00:00
|
|
|
Summary: A GNU source-level debugger for C, C++, Fortran and other languages
|
2018-08-10 12:19:29 +00:00
|
|
|
License: GPL-3.0-or-later AND GPL-3.0-with-GCC-exception AND LGPL-2.1-or-later AND LGPL-3.0-or-later
|
2014-02-10 17:10:42 +00:00
|
|
|
Group: Development/Tools/Debuggers
|
|
|
|
Name: gdb
|
|
|
|
|
2019-10-01 14:34:39 +00:00
|
|
|
Version: 8.3.1
|
2014-02-10 17:10:42 +00:00
|
|
|
Release: 0
|
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
|
|
|
|
2014-02-10 17:10:42 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-04-16 16:29:50 +00:00
|
|
|
# Do not provide URL for snapshots as the file lasts there only for 2 days.
|
2019-05-24 13:40:33 +00:00
|
|
|
# ftp://sourceware.org/pub/gdb/releases/gdb-%%{version}.tar.gz
|
2016-06-20 16:51:43 +00:00
|
|
|
Source: gdb-%{version}.tar.bz2
|
2014-02-10 17:10:42 +00:00
|
|
|
Url: http://gnu.org/software/gdb/
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2013-01-11 14:55:20 +00:00
|
|
|
%if "%{scl}" == "devtoolset-1.1"
|
2014-02-10 17:10:42 +00:00
|
|
|
Obsoletes: devtoolset-1.0-%{pkg_name}
|
2013-01-11 14:55:20 +00:00
|
|
|
%endif
|
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
# For our convenience
|
2014-02-10 17:10:42 +00:00
|
|
|
%global gdb_src %{name}-%{version}
|
2012-06-16 04:55:29 +00:00
|
|
|
%global gdb_build build-%{_target_platform}
|
|
|
|
%global gdb_docdir %{_docdir}/%{name}-doc
|
|
|
|
|
|
|
|
%global have_inproctrace 0
|
|
|
|
%ifarch %{ix86} x86_64
|
|
|
|
%global have_inproctrace 1
|
2019-06-17 13:22:35 +00:00
|
|
|
%endif # %%{ix86} x86_64
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2017-11-08 14:33:53 +00:00
|
|
|
# Choose python version
|
|
|
|
%if 0%{?suse_version} >= 1320
|
|
|
|
%define python python3
|
|
|
|
%else
|
|
|
|
%define python python
|
|
|
|
%endif
|
|
|
|
|
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
|
|
|
|
2011-03-10 09:18:25 +00:00
|
|
|
#=
|
|
|
|
#push=Should be pushed upstream.
|
|
|
|
#maybepush=Should be pushed upstream unless it got obsoleted there.
|
|
|
|
#fedora=Should stay as a Fedora patch.
|
2014-02-10 17:23:45 +00:00
|
|
|
#ia64=Drop after RHEL-5 rebases and rebuilds are no longer meaningful.
|
2011-03-10 09:18:25 +00:00
|
|
|
#fedoratest=Keep it in Fedora only as a regression test safety.
|
|
|
|
#+ppc=Specific for ppc32/ppc64/ppc*
|
|
|
|
#+work=Requires some nontrivial work.
|
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
# Cleanup any leftover testsuite processes as it may stuck mock(1) builds.
|
2011-03-10 09:18:25 +00:00
|
|
|
#=push
|
2014-02-10 17:10:42 +00:00
|
|
|
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).
|
2011-03-10 09:18:25 +00:00
|
|
|
#=push
|
2014-02-10 17:10:42 +00:00
|
|
|
Source3: gdb-gstack.man
|
2011-03-10 09:18:25 +00:00
|
|
|
|
|
|
|
# /etc/gdbinit (from Debian but with Fedora compliant location).
|
|
|
|
#=fedora
|
2014-02-10 17:10:42 +00:00
|
|
|
Source4: gdbinit
|
2019-07-04 07:16:27 +00:00
|
|
|
Source5: gdbinit.without-python
|
2011-08-11 13:47:36 +00:00
|
|
|
|
2017-10-04 11:22:40 +00:00
|
|
|
# libipt: Intel Processor Trace Decoder Library
|
2019-09-26 14:08:42 +00:00
|
|
|
%global libipt_version 2.0.1
|
2017-10-04 11:22:40 +00:00
|
|
|
Source7: v%{libipt_version}.tar.gz
|
|
|
|
|
2014-05-14 07:52:25 +00:00
|
|
|
# Infrastructure to sync patches from the Fedora rpm
|
|
|
|
Source10: patchlist.pl
|
|
|
|
Source11: patchname_get.sh
|
2014-06-26 14:03:19 +00:00
|
|
|
Source12: baselibs.conf
|
2014-08-13 11:27:24 +00:00
|
|
|
Source13: gdb-rpmlintrc
|
2014-05-14 07:52:25 +00:00
|
|
|
|
2013-07-08 14:47:04 +00:00
|
|
|
#Fedora Packages begin
|
2014-02-10 17:10:42 +00:00
|
|
|
Patch1: gdb-6.3-rh-testversion-20041202.patch
|
2018-03-09 16:46:37 +00:00
|
|
|
Patch2: gdb-vla-intel-fortran-strides.patch
|
|
|
|
Patch3: gdb-vla-intel-fortran-vla-strings.patch
|
|
|
|
Patch4: gdb-vla-intel-stringbt-fix.patch
|
2019-05-24 13:40:33 +00:00
|
|
|
Patch5: gdb-6.3-gstack-20050411.patch
|
|
|
|
Patch6: gdb-6.3-test-pie-20050107.patch
|
|
|
|
Patch7: gdb-6.3-test-self-20050110.patch
|
|
|
|
Patch8: gdb-6.3-test-dtorfix-20050121.patch
|
|
|
|
Patch9: gdb-6.3-test-movedir-20050125.patch
|
|
|
|
Patch10: gdb-6.3-threaded-watchpoints2-20050225.patch
|
|
|
|
Patch11: gdb-6.3-inferior-notification-20050721.patch
|
|
|
|
Patch12: gdb-6.3-inheritancetest-20050726.patch
|
|
|
|
Patch13: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
|
|
|
Patch14: gdb-6.5-sharedlibrary-path.patch
|
|
|
|
Patch15: gdb-6.5-BEA-testsuite.patch
|
|
|
|
Patch16: gdb-6.5-last-address-space-byte-test.patch
|
|
|
|
Patch17: gdb-6.5-readline-long-line-crash-test.patch
|
|
|
|
Patch18: gdb-6.5-bz216711-clone-is-outermost.patch
|
|
|
|
Patch19: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
|
|
|
Patch20: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
|
|
|
Patch21: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
|
|
|
Patch22: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
|
|
|
Patch23: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
|
|
|
Patch24: gdb-6.6-bz230000-power6-disassembly-test.patch
|
|
|
|
Patch25: gdb-6.6-bz229517-gcore-without-terminal.patch
|
|
|
|
Patch26: gdb-6.6-testsuite-timeouts.patch
|
|
|
|
Patch27: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
|
|
|
Patch28: gdb-6.6-scheduler_locking-step-is-default.patch
|
|
|
|
Patch29: gdb-6.3-attach-see-vdso-test.patch
|
|
|
|
Patch30: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
|
|
|
Patch31: gdb-6.6-buildid-locate.patch
|
|
|
|
Patch32: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
|
|
|
Patch33: gdb-6.6-buildid-locate-rpm.patch
|
|
|
|
Patch34: gdb-6.7-charsign-test.patch
|
|
|
|
Patch35: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
|
|
|
Patch36: gdb-6.7-testsuite-stable-results.patch
|
|
|
|
Patch37: gdb-6.5-ia64-libunwind-leak-test.patch
|
|
|
|
Patch38: gdb-6.5-missed-trap-on-step-test.patch
|
|
|
|
Patch39: gdb-6.5-gcore-buffer-limit-test.patch
|
|
|
|
Patch40: gdb-6.3-mapping-zero-inode-test.patch
|
|
|
|
Patch41: gdb-6.3-focus-cmd-prev-test.patch
|
|
|
|
Patch42: gdb-6.8-bz442765-threaded-exec-test.patch
|
|
|
|
Patch43: gdb-6.5-section-num-fixup-test.patch
|
|
|
|
Patch44: gdb-6.8-bz436037-reg-no-longer-active.patch
|
|
|
|
Patch45: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
|
|
|
Patch46: gdb-simultaneous-step-resume-breakpoint-test.patch
|
|
|
|
Patch47: gdb-core-open-vdso-warning.patch
|
|
|
|
Patch49: gdb-bz533176-fortran-omp-step.patch
|
|
|
|
Patch50: gdb-follow-child-stale-parent.patch
|
|
|
|
Patch51: gdb-ccache-workaround.patch
|
|
|
|
Patch52: gdb-archer-pie-addons.patch
|
|
|
|
Patch53: gdb-archer-pie-addons-keep-disabled.patch
|
|
|
|
Patch54: gdb-lineno-makeup-test.patch
|
|
|
|
Patch55: gdb-ppc-power7-test.patch
|
|
|
|
Patch56: gdb-bz541866-rwatch-before-run.patch
|
|
|
|
Patch57: gdb-moribund-utrace-workaround.patch
|
|
|
|
Patch58: gdb-archer-next-over-throw-cxx-exec.patch
|
|
|
|
Patch59: gdb-bz601887-dwarf4-rh-test.patch
|
|
|
|
Patch60: gdb-6.6-buildid-locate-core-as-arg.patch
|
|
|
|
Patch61: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
|
|
|
Patch62: gdb-test-bt-cfi-without-die.patch
|
|
|
|
Patch63: gdb-bz568248-oom-is-error.patch
|
|
|
|
Patch64: gdb-bz634108-solib_address.patch
|
|
|
|
Patch65: gdb-test-pid0-core.patch
|
|
|
|
Patch66: gdb-test-dw2-aranges.patch
|
|
|
|
Patch67: gdb-test-expr-cumulative-archer.patch
|
|
|
|
Patch68: gdb-physname-pr11734-test.patch
|
|
|
|
Patch69: gdb-physname-pr12273-test.patch
|
|
|
|
Patch70: gdb-test-ivy-bridge.patch
|
|
|
|
Patch71: gdb-runtest-pie-override.patch
|
|
|
|
Patch72: gdb-attach-fail-reasons-5of5.patch
|
|
|
|
Patch73: gdb-glibc-strstr-workaround.patch
|
|
|
|
Patch74: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
|
|
|
Patch75: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
|
|
|
Patch76: gdb-rhbz795424-bitpos-20of25.patch
|
|
|
|
Patch77: gdb-rhbz795424-bitpos-21of25.patch
|
|
|
|
Patch78: gdb-rhbz795424-bitpos-22of25.patch
|
|
|
|
Patch79: gdb-rhbz795424-bitpos-23of25.patch
|
|
|
|
Patch80: gdb-rhbz795424-bitpos-25of25.patch
|
|
|
|
Patch81: gdb-rhbz795424-bitpos-25of25-test.patch
|
|
|
|
Patch82: gdb-rhbz795424-bitpos-lazyvalue.patch
|
|
|
|
Patch83: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
|
|
|
Patch84: gdb-gnat-dwarf-crash-3of3.patch
|
|
|
|
Patch85: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
|
|
|
Patch86: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
|
|
|
Patch87: gdb-archer-vla-tests.patch
|
|
|
|
Patch88: gdb-vla-intel-tests.patch
|
|
|
|
Patch89: gdb-btrobust.patch
|
|
|
|
Patch90: gdb-fortran-frame-string.patch
|
|
|
|
Patch91: gdb-rhbz1156192-recursive-dlopen-test.patch
|
|
|
|
Patch92: gdb-jit-reader-multilib.patch
|
|
|
|
Patch93: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
|
|
|
Patch94: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
|
|
|
Patch95: gdb-rhbz1350436-type-printers-error.patch
|
|
|
|
Patch96: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
|
|
|
|
Patch97: gdb-bz1219747-attach-kills.patch
|
|
|
|
Patch98: gdb-fedora-libncursesw.patch
|
|
|
|
Patch99: gdb-opcodes-clflushopt-test.patch
|
|
|
|
Patch100: gdb-dts-rhel6-python-compat.patch
|
|
|
|
Patch101: gdb-6.6-buildid-locate-rpm-scl.patch
|
|
|
|
Patch102: gdb-readline62-ask-more-rh.patch
|
|
|
|
Patch103: gdb-6.8-quit-never-aborts.patch
|
|
|
|
Patch104: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
|
|
|
Patch105: gdb-container-rh-pkg.patch
|
|
|
|
Patch106: gdb-rhbz1325795-framefilters-test.patch
|
|
|
|
Patch107: gdb-linux_perf-bundle.patch
|
|
|
|
Patch108: gdb-libexec-add-index.patch
|
|
|
|
Patch109: gdb-rhbz1398387-tab-crash-test.patch
|
|
|
|
Patch110: gdb-testsuite-readline63-sigint.patch
|
|
|
|
Patch111: gdb-archer.patch
|
|
|
|
Patch112: gdb-vla-intel-fix-print-char-array.patch
|
|
|
|
Patch113: gdb-rhbz1553104-s390x-arch12-test.patch
|
|
|
|
Patch114: gdb-rhbz795424-bitpos-arrayview.patch
|
|
|
|
Patch115: gdb-rhbz1371380-gcore-elf-headers.patch
|
2019-09-26 14:07:43 +00:00
|
|
|
Patch116: gdb-rhbz1708192-parse_macro_definition-crash.patch
|
|
|
|
Patch117: gdb-rhbz1704406-disable-style-log-output-1of3.patch
|
|
|
|
Patch118: gdb-rhbz1704406-disable-style-log-output-2of3.patch
|
|
|
|
Patch119: gdb-rhbz1704406-disable-style-log-output-3of3.patch
|
|
|
|
Patch120: gdb-rhbz1723564-gdb-crash-PYTHONMALLOC-debug.patch
|
|
|
|
Patch121: gdb-rhbz1553086-binutils-warning-loadable-section-outside-elf.patch
|
2013-07-08 14:47:04 +00:00
|
|
|
#Fedora Packages end
|
2010-08-27 12:50:15 +00:00
|
|
|
|
2019-08-08 14:14:27 +00:00
|
|
|
#Fedora patches fixup
|
|
|
|
|
|
|
|
Patch500: gdb-testsuite-avoid-pagination-in-attach-32.exp.patch
|
|
|
|
Patch501: gdb-testsuite-fix-perror-in-gdb.opt-fortran-string.exp.patch
|
|
|
|
|
2019-06-17 13:22:35 +00:00
|
|
|
# openSUSE specific
|
|
|
|
|
|
|
|
Patch1000: gdb-gcore-bash.patch
|
2014-02-10 17:10:42 +00:00
|
|
|
Patch1002: gdb-6.6-buildid-locate-rpm-suse.patch
|
2019-08-08 14:14:27 +00:00
|
|
|
Patch1003: gdb-testsuite-ada-pie.patch
|
2019-06-17 13:22:35 +00:00
|
|
|
|
|
|
|
# Patches to upstream
|
|
|
|
|
2019-06-24 09:24:30 +00:00
|
|
|
# Fixed upstream Sat, Jun 22 2019, 47e3f47487 "[gdb] Fix s390x -m31 build".
|
|
|
|
# We should be able to drop this in 8.4.
|
2018-09-12 12:56:29 +00:00
|
|
|
Patch1007: gdb-fix-s390-build.diff
|
2014-02-10 17:10:42 +00:00
|
|
|
|
2018-11-08 08:59:28 +00:00
|
|
|
# Backports from master
|
2019-05-24 13:40:33 +00:00
|
|
|
|
|
|
|
Patch2001: gdb-fix-riscv-tdep.patch
|
2019-08-08 14:14:27 +00:00
|
|
|
Patch2004: gdb-testsuite-add-missing-initial-prompt-read-in-multidictionary.exp.patch
|
|
|
|
Patch2005: gdb-testsuite-pie-no-pie.patch
|
|
|
|
Patch2007: gdb-testsuite-read1-fixes.patch
|
|
|
|
Patch2008: gdb-testsuite-i386-pkru-exp.patch
|
2019-10-14 17:54:50 +00:00
|
|
|
Patch2009: gdb-s390-handle-arch13.diff
|
2019-10-30 13:43:38 +00:00
|
|
|
Patch2010: gdb-fix-heap-use-after-free-in-typename-concat.patch
|
|
|
|
Patch2011: gdb-dwarf-reader-reject-sections-with-invalid-sizes.patch
|
2019-10-01 14:34:39 +00:00
|
|
|
|
2019-11-07 09:14:39 +00:00
|
|
|
# Proposed patch for PR symtab/24971
|
|
|
|
Patch2500: gdb-symtab-prefer-var-def-over-decl.patch
|
|
|
|
|
|
|
|
# Proposed patch for PR gdb/24956
|
|
|
|
Patch2501: gdb-only-force-interp_console-ui_out-for-breakpoint-commands-in-mi-mode.patch
|
|
|
|
|
2019-10-01 14:34:39 +00:00
|
|
|
# Testsuite patches
|
|
|
|
Patch2600: gdb-testsuite-8.3-kfail-xfail-unsupported.patch
|
2018-11-08 08:59:28 +00:00
|
|
|
|
2018-03-09 16:46:37 +00:00
|
|
|
# libipt support
|
|
|
|
Patch3000: v1.5-libipt-static.patch
|
2017-10-02 15:05:29 +00:00
|
|
|
|
2014-02-10 17:10:42 +00:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
2017-05-01 02:01:32 +00:00
|
|
|
%if 0%{suse_version} > 1110
|
|
|
|
%define gcc gcc
|
|
|
|
%else
|
|
|
|
%define gcc gcc48
|
|
|
|
%endif
|
|
|
|
BuildRequires: %{gcc}
|
|
|
|
BuildRequires: %{gcc}-c++
|
2014-02-10 17:10:42 +00:00
|
|
|
BuildRequires: gettext
|
|
|
|
BuildRequires: glibc-devel
|
2017-09-13 14:11:09 +00:00
|
|
|
%if 0%{suse_version} > 1110 && 0%{suse_version} < 1330
|
2019-07-04 07:16:27 +00:00
|
|
|
# GDB supports guile 2.0, but not guile 2.2 (swo#21104). Disable guile
|
|
|
|
# support for newer distro versions in anticipation of a move to guile 2.2.
|
2015-06-29 12:26:20 +00:00
|
|
|
BuildRequires: guile-devel
|
2016-01-18 14:49:48 +00:00
|
|
|
%endif
|
2014-02-10 17:10:42 +00:00
|
|
|
BuildRequires: libexpat-devel
|
2019-07-26 12:04:33 +00:00
|
|
|
%if 0%{suse_version} >= 1200
|
|
|
|
BuildRequires: makeinfo
|
|
|
|
%else
|
|
|
|
BuildRequires: texinfo
|
2009-05-07 15:40:45 +00:00
|
|
|
%endif
|
2019-09-10 15:34:12 +00:00
|
|
|
BuildRequires: expect
|
2019-06-04 10:18:29 +00:00
|
|
|
BuildRequires: mpfr-devel
|
2019-07-26 12:04:33 +00:00
|
|
|
BuildRequires: ncurses-devel
|
2015-06-29 12:26:20 +00:00
|
|
|
BuildRequires: pkg-config
|
2014-02-10 17:10:42 +00:00
|
|
|
BuildRequires: readline-devel
|
|
|
|
BuildRequires: rpm-devel
|
2019-07-23 14:54:28 +00:00
|
|
|
BuildRequires: xz-devel
|
2019-07-26 12:04:33 +00:00
|
|
|
BuildRequires: zlib-devel
|
2009-07-29 15:48:42 +00:00
|
|
|
%if 0%{!?_without_python:1}
|
2017-11-08 14:33:53 +00:00
|
|
|
Requires: %{python}-base
|
|
|
|
BuildRequires: %{python}-devel
|
2009-07-29 15:48:42 +00:00
|
|
|
%endif # 0%{!?_without_python:1}
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2017-10-04 11:22:40 +00:00
|
|
|
%global have_libipt 0
|
2017-10-04 13:25:02 +00:00
|
|
|
%if 0%{suse_version} > 1110
|
2017-10-04 11:22:40 +00:00
|
|
|
%ifarch %{ix86} x86_64
|
|
|
|
%global have_libipt 1
|
|
|
|
BuildRequires: cmake
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
# BuildArch would break RHEL-5 by overriding arch and not building noarch.
|
|
|
|
%if 0%{?el5:1}
|
2014-02-10 17:10:42 +00:00
|
|
|
ExclusiveArch: noarch i386 x86_64 ppc ppc64 ia64 s390 s390x
|
2012-06-16 04:55:29 +00:00
|
|
|
%endif # 0%{?el5:1}
|
|
|
|
|
2017-11-15 12:32:21 +00:00
|
|
|
%if %{with testsuite}
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2019-07-04 07:16:27 +00:00
|
|
|
# Copied from gcc9/gcc.spec.in
|
|
|
|
# Ada currently fails to build on a few platforms, enable it only
|
|
|
|
# on those that work
|
|
|
|
%if %{suse_version} >= 1310
|
|
|
|
%if %{suse_version} >= 1330
|
|
|
|
%define ada_arch %ix86 x86_64 ppc ppc64 ppc64le s390 s390x ia64 aarch64 riscv64
|
|
|
|
%else
|
|
|
|
%define ada_arch %ix86 x86_64 ppc ppc64 s390 ia64
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%define ada_arch %ix86 x86_64 ppc s390 ia64
|
|
|
|
%endif
|
|
|
|
|
2010-03-12 00:40:02 +00:00
|
|
|
# Ensure the devel libraries are installed for both multilib arches.
|
2012-06-16 04:55:29 +00:00
|
|
|
%global bits_local %{?_isa}
|
|
|
|
%global 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
|
2012-06-16 04:55:29 +00:00
|
|
|
%global bits_other (%{__isa_name}-32)
|
2010-03-12 00:40:02 +00:00
|
|
|
%else #!s390x
|
|
|
|
%ifarch ppc
|
2012-06-16 04:55:29 +00:00
|
|
|
%global bits_other (%{__isa_name}-64)
|
2010-03-12 00:40:02 +00:00
|
|
|
%else #!ppc
|
|
|
|
%ifarch sparc64 ppc64 s390x x86_64
|
2012-06-16 04:55:29 +00:00
|
|
|
%global bits_other (%{__isa_name}-32)
|
2010-03-12 00:40:02 +00:00
|
|
|
%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
|
|
|
|
2014-02-10 17:10:42 +00:00
|
|
|
BuildRequires: dejagnu
|
|
|
|
BuildRequires: sharutils
|
2009-05-04 16:53:01 +00:00
|
|
|
# gcc-objc++ is not covered by the GDB testsuite.
|
2017-05-01 02:01:32 +00:00
|
|
|
BuildRequires: %{gcc}-fortran
|
|
|
|
%if 0%{?gcc_version} < 7 && 0%{suse_version} > 1110
|
|
|
|
BuildRequires: %{gcc}-java
|
2016-12-16 12:54:07 +00:00
|
|
|
%endif
|
2017-05-01 02:01:32 +00:00
|
|
|
BuildRequires: %{gcc}-objc
|
2019-07-04 07:16:27 +00:00
|
|
|
%ifarch %ada_arch
|
2017-05-01 02:01:32 +00:00
|
|
|
BuildRequires: %{gcc}-ada
|
2016-12-05 13:17:45 +00:00
|
|
|
%endif
|
2017-04-03 12:49:51 +00:00
|
|
|
%if 0%{!?disable_32bit:1}
|
2017-01-09 15:38:49 +00:00
|
|
|
# openSUSE for s390x doesn't build 32bit libs
|
2015-02-25 14:03:59 +00:00
|
|
|
%if 0%{suse_version} > 1110
|
2014-08-13 14:41:55 +00:00
|
|
|
%ifarch x86_64 ppc64 s390x
|
2016-01-14 17:15:57 +00:00
|
|
|
%if 0%{suse_version} >= 1330
|
|
|
|
# Older distros miss this pseudo package, the Ada
|
|
|
|
# testsuite won't work completely
|
2017-05-01 02:01:32 +00:00
|
|
|
BuildRequires: %{gcc}-ada-32bit
|
2016-01-14 17:15:57 +00:00
|
|
|
%endif
|
2017-05-01 02:01:32 +00:00
|
|
|
BuildRequires: %{gcc}-c++-32bit
|
2017-04-03 12:59:56 +00:00
|
|
|
%if 0%{suse_version} >= 1210 && 0%{suse_version} != 1315
|
2016-11-22 08:16:32 +00:00
|
|
|
BuildRequires: glibc-devel-static-32bit
|
2009-05-04 16:53:01 +00:00
|
|
|
%endif
|
2013-01-11 14:55:20 +00:00
|
|
|
%endif
|
2016-11-22 08:16:32 +00:00
|
|
|
%endif
|
2017-01-09 15:38:49 +00:00
|
|
|
%endif
|
2016-11-22 08:16:32 +00:00
|
|
|
%if 0%{suse_version} >= 1210
|
|
|
|
BuildRequires: glibc-devel-static
|
|
|
|
%endif
|
2019-07-04 07:16:27 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
# The gccgo command is used by make check for some gdb.go test-cases, so we
|
|
|
|
# need the gcc-go package. However, the gccgo command was missing from the
|
|
|
|
# gcc-go package (bsc#1096677), so we only require it for known fixed
|
|
|
|
# versions.
|
|
|
|
BuildRequires: gcc-go
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} >= 1500 && 0%{?is_opensuse}
|
|
|
|
%ifarch %{ix86} x86_64 aarch64 armv7l
|
2019-11-12 14:23:29 +00:00
|
|
|
%if %{with fpc}
|
2019-07-04 07:16:27 +00:00
|
|
|
BuildRequires: fpc
|
|
|
|
%endif
|
|
|
|
%endif
|
2019-11-12 14:23:29 +00:00
|
|
|
%endif
|
2019-07-04 07:16:27 +00:00
|
|
|
%if 0%{?suse_version} >= 1200
|
2019-09-10 15:47:42 +00:00
|
|
|
%ifnarch s390
|
|
|
|
# s390 (for SLE12) doesn't have valgrind
|
2019-07-04 07:16:27 +00:00
|
|
|
BuildRequires: valgrind
|
|
|
|
%endif
|
2019-09-10 15:47:42 +00:00
|
|
|
%endif
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2019-06-17 13:22:35 +00:00
|
|
|
%endif # %%{with testsuite}
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
%ifarch ia64
|
2014-02-10 17:10:42 +00:00
|
|
|
BuildRequires: libunwind-devel
|
|
|
|
Requires: libunwind
|
2009-05-04 16:53:01 +00:00
|
|
|
%endif
|
2011-08-11 13:47:51 +00:00
|
|
|
|
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
|
|
|
|
2019-05-24 13:40:33 +00:00
|
|
|
%ifnarch riscv64
|
2008-05-09 22:02:58 +00:00
|
|
|
%package -n gdbserver
|
2014-02-10 17:10:42 +00:00
|
|
|
Summary: A standalone server for GDB (the GNU source-level debugger)
|
2018-08-10 12:19:29 +00:00
|
|
|
License: GPL-3.0-or-later AND GPL-3.0-with-GCC-exception AND LGPL-2.1-or-later AND LGPL-3.0-or-later
|
2014-02-10 17:10:42 +00:00
|
|
|
Group: Development/Tools/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
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
%package doc
|
2014-02-10 17:10:42 +00:00
|
|
|
Summary: Documentation for GDB (the GNU source-level debugger)
|
2018-08-10 12:19:29 +00:00
|
|
|
License: GFDL-1.3-only
|
2014-02-10 17:10:42 +00:00
|
|
|
Group: Documentation/Other
|
|
|
|
PreReq: %{install_info_prereq}
|
2012-06-16 04:55:29 +00:00
|
|
|
|
2013-01-11 14:55:20 +00:00
|
|
|
%if "%{scl}" == "devtoolset-1.1"
|
2014-02-10 17:10:42 +00:00
|
|
|
Obsoletes: devtoolset-1.0-%{pkg_name}-doc
|
2013-01-11 14:55:20 +00:00
|
|
|
%endif
|
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
%description doc
|
|
|
|
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.
|
|
|
|
|
|
|
|
This package provides INFO, HTML and PDF user manual for GDB.
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2014-08-13 11:27:24 +00:00
|
|
|
%package testresults
|
|
|
|
Summary: GDB testsuite results
|
|
|
|
License: SUSE-Public-Domain
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
|
|
|
|
%description testresults
|
|
|
|
Results from running the GDB testsuite.
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
%prep
|
2009-05-04 16:53:01 +00:00
|
|
|
%setup -q -n %{gdb_src}
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
%if 0%{?rhel:1} && 0%{?rhel} <= 6
|
2011-08-11 13:47:36 +00:00
|
|
|
# libstdc++ pretty printers.
|
|
|
|
tar xjf %{SOURCE5}
|
2012-06-16 04:55:29 +00:00
|
|
|
%endif # 0%{?rhel:1} && 0%{?rhel} <= 6
|
2011-08-11 13:47:36 +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
|
2013-01-11 14:55:20 +00:00
|
|
|
rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c gdb/go-exp.c
|
|
|
|
|
|
|
|
# *.info* is needlessly split in the distro tar; also it would not get used as
|
2019-06-17 13:22:35 +00:00
|
|
|
# we build in %%{gdb_build}, just to be sure.
|
2013-01-11 14:55:20 +00:00
|
|
|
find -name "*.info*"|xargs rm -f
|
2011-08-11 13:47:36 +00:00
|
|
|
|
2013-07-08 14:47:04 +00:00
|
|
|
#Fedora patching start
|
2009-05-04 16:53:01 +00:00
|
|
|
%patch1 -p1
|
2013-07-08 14:47:04 +00:00
|
|
|
%patch2 -p1
|
2009-05-04 16:53:01 +00:00
|
|
|
%patch3 -p1
|
2013-07-08 14:47:04 +00:00
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
|
|
|
%patch10 -p1
|
|
|
|
%patch11 -p1
|
|
|
|
%patch12 -p1
|
|
|
|
%patch13 -p1
|
|
|
|
%patch14 -p1
|
|
|
|
%patch15 -p1
|
|
|
|
%patch16 -p1
|
|
|
|
%patch17 -p1
|
|
|
|
%patch18 -p1
|
|
|
|
%patch19 -p1
|
|
|
|
%patch20 -p1
|
|
|
|
%patch21 -p1
|
|
|
|
%patch22 -p1
|
|
|
|
%patch23 -p1
|
|
|
|
%patch24 -p1
|
|
|
|
%patch25 -p1
|
|
|
|
%patch26 -p1
|
|
|
|
%patch27 -p1
|
|
|
|
%patch28 -p1
|
|
|
|
%patch29 -p1
|
|
|
|
%patch30 -p1
|
|
|
|
%patch31 -p1
|
|
|
|
%patch32 -p1
|
|
|
|
%patch33 -p1
|
|
|
|
%patch34 -p1
|
|
|
|
%patch35 -p1
|
|
|
|
%patch36 -p1
|
|
|
|
%patch37 -p1
|
|
|
|
%patch38 -p1
|
|
|
|
%patch39 -p1
|
|
|
|
%patch40 -p1
|
|
|
|
%patch41 -p1
|
|
|
|
%patch42 -p1
|
|
|
|
%patch43 -p1
|
|
|
|
%patch44 -p1
|
|
|
|
%patch45 -p1
|
|
|
|
%patch46 -p1
|
|
|
|
%patch47 -p1
|
|
|
|
%patch49 -p1
|
|
|
|
%patch50 -p1
|
|
|
|
%patch51 -p1
|
|
|
|
%patch52 -p1
|
|
|
|
%patch53 -p1
|
|
|
|
%patch54 -p1
|
|
|
|
%patch55 -p1
|
|
|
|
%patch56 -p1
|
|
|
|
%patch57 -p1
|
|
|
|
%patch58 -p1
|
|
|
|
%patch59 -p1
|
|
|
|
%patch60 -p1
|
|
|
|
%patch61 -p1
|
|
|
|
%patch62 -p1
|
|
|
|
%patch63 -p1
|
|
|
|
%patch64 -p1
|
|
|
|
%patch65 -p1
|
|
|
|
%patch66 -p1
|
|
|
|
%patch67 -p1
|
|
|
|
%patch68 -p1
|
|
|
|
%patch69 -p1
|
|
|
|
%patch70 -p1
|
|
|
|
%patch71 -p1
|
|
|
|
%patch72 -p1
|
|
|
|
%patch73 -p1
|
|
|
|
%patch74 -p1
|
|
|
|
%patch75 -p1
|
|
|
|
%patch76 -p1
|
|
|
|
%patch77 -p1
|
|
|
|
%patch78 -p1
|
|
|
|
%patch79 -p1
|
|
|
|
%patch80 -p1
|
|
|
|
%patch81 -p1
|
|
|
|
%patch82 -p1
|
|
|
|
%patch83 -p1
|
|
|
|
%patch84 -p1
|
|
|
|
%patch85 -p1
|
|
|
|
%patch86 -p1
|
|
|
|
%patch87 -p1
|
|
|
|
%patch88 -p1
|
|
|
|
%patch89 -p1
|
|
|
|
%patch90 -p1
|
|
|
|
%patch91 -p1
|
|
|
|
%patch92 -p1
|
|
|
|
%patch93 -p1
|
|
|
|
%patch94 -p1
|
|
|
|
%patch95 -p1
|
|
|
|
%patch96 -p1
|
|
|
|
%patch97 -p1
|
|
|
|
%patch98 -p1
|
|
|
|
%patch99 -p1
|
2014-02-10 17:23:45 +00:00
|
|
|
%patch100 -p1
|
2014-08-11 14:08:48 +00:00
|
|
|
%patch101 -p1
|
|
|
|
%patch102 -p1
|
|
|
|
%patch103 -p1
|
|
|
|
%patch104 -p1
|
|
|
|
%patch105 -p1
|
|
|
|
%patch106 -p1
|
|
|
|
%patch107 -p1
|
|
|
|
%patch108 -p1
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
%patch109 -p1
|
2014-08-11 14:08:48 +00:00
|
|
|
%patch110 -p1
|
|
|
|
%patch111 -p1
|
|
|
|
%patch112 -p1
|
|
|
|
%patch113 -p1
|
|
|
|
%patch114 -p1
|
2016-02-29 19:38:18 +00:00
|
|
|
%patch115 -p1
|
2019-09-26 14:07:43 +00:00
|
|
|
%patch116 -p1
|
|
|
|
%patch117 -p1
|
|
|
|
%patch118 -p1
|
|
|
|
%patch119 -p1
|
|
|
|
%patch120 -p1
|
|
|
|
%patch121 -p1
|
2013-07-08 14:47:04 +00:00
|
|
|
#Fedora patching end
|
|
|
|
|
2019-08-08 14:14:27 +00:00
|
|
|
%patch500 -p1
|
|
|
|
%patch501 -p1
|
|
|
|
|
2019-06-17 13:22:35 +00:00
|
|
|
%patch1000 -p1
|
2009-05-07 15:40:45 +00:00
|
|
|
%patch1002 -p1
|
2019-08-08 14:14:27 +00:00
|
|
|
%patch1003 -p1
|
2019-06-17 13:22:35 +00:00
|
|
|
|
2018-09-12 12:56:29 +00:00
|
|
|
%patch1007 -p1
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2018-12-06 14:50:54 +00:00
|
|
|
%patch2001 -p1
|
2019-08-08 14:14:27 +00:00
|
|
|
%patch2004 -p1
|
|
|
|
%patch2005 -p1
|
|
|
|
%patch2007 -p1
|
|
|
|
%patch2008 -p1
|
2019-10-14 17:54:50 +00:00
|
|
|
%patch2009 -p1
|
2019-10-30 13:43:38 +00:00
|
|
|
%patch2010 -p1
|
|
|
|
%patch2011 -p1
|
2019-10-01 14:34:39 +00:00
|
|
|
|
2019-11-07 09:14:39 +00:00
|
|
|
%patch2500 -p1
|
|
|
|
%patch2501 -p1
|
|
|
|
|
2019-10-01 14:34:39 +00:00
|
|
|
%patch2600 -p1
|
2018-11-08 08:59:28 +00:00
|
|
|
|
2017-10-04 11:22:40 +00:00
|
|
|
#unpack libipt
|
|
|
|
%if 0%{have_libipt}
|
|
|
|
tar xzf %{SOURCE7}
|
|
|
|
(
|
|
|
|
cd processor-trace-%{libipt_version}
|
2018-03-09 16:46:37 +00:00
|
|
|
%patch3000 -p1
|
2017-10-04 11:22:40 +00:00
|
|
|
)
|
|
|
|
%endif
|
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
find -name "*.orig" | xargs rm -f
|
2010-03-12 00:40:02 +00:00
|
|
|
! find -name "*.rej" # Should not happen.
|
|
|
|
|
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.
|
2019-06-17 13:22:35 +00:00
|
|
|
# Initially we're in the %%{gdb_src} directory.
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2010-09-06 11:08:41 +00:00
|
|
|
for fprofile in %{?_with_profile:-fprofile} ""
|
|
|
|
do
|
|
|
|
|
|
|
|
mkdir %{gdb_build}$fprofile
|
|
|
|
cd %{gdb_build}$fprofile
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2017-05-01 02:01:32 +00:00
|
|
|
%if 0%{suse_version} > 1110
|
|
|
|
CC=gcc
|
|
|
|
CXX=g++
|
|
|
|
%else
|
|
|
|
CC=gcc-4.8
|
|
|
|
CXX=g++-4.8
|
|
|
|
%endif
|
|
|
|
export CC
|
|
|
|
export CXX
|
2014-02-10 17:23:45 +00:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
2017-02-17 13:14:36 +00:00
|
|
|
|
2019-06-21 11:06:01 +00:00
|
|
|
# Add your -Wno-x/-Wno-error=y options here:
|
2019-07-23 14:54:28 +00:00
|
|
|
for opt in -Wno-error=odr; do
|
2019-06-21 11:06:01 +00:00
|
|
|
# checking for acceptance of -Wno-foo is a bit wieldy: GCC doesn't
|
|
|
|
# warn about unknown -Wno- flags, _except_ if there are other
|
|
|
|
# diagnostics as well, so let's force an uninitialized use warning
|
|
|
|
# and grep for the diagnostic about the -Wno flag:
|
2018-03-27 14:02:35 +00:00
|
|
|
if ! echo "int foo(void) { int a; return a;} " | \
|
|
|
|
$CC -x c -c - -o /dev/null -W ${opt} 2>&1 | \
|
2019-06-17 13:22:35 +00:00
|
|
|
grep -E "Wno|no option" >/dev/null; then
|
2018-03-27 14:02:35 +00:00
|
|
|
CFLAGS="$CFLAGS ${opt}"
|
|
|
|
fi
|
|
|
|
done
|
2017-10-04 11:22:40 +00:00
|
|
|
%if %{have_libipt}
|
|
|
|
CFLAGS="$CFLAGS -DPERF_ATTR_SIZE_VER5_BUNDLE"
|
|
|
|
(
|
|
|
|
mkdir processor-trace-%{libipt_version}-root
|
|
|
|
mkdir processor-trace-%{libipt_version}-build
|
|
|
|
cd processor-trace-%{libipt_version}-build
|
|
|
|
# -DPTUNIT:BOOL=ON has no effect on ctest.
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2019-09-26 14:08:42 +00:00
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
2017-10-04 11:22:40 +00:00
|
|
|
-DPTUNIT:BOOL=OFF \
|
|
|
|
-DDEVBUILD:BOOL=ON \
|
|
|
|
../../processor-trace-%{libipt_version}
|
|
|
|
make VERBOSE=1 %{?_smp_mflags}
|
|
|
|
ctest -V %{?_smp_mflags}
|
|
|
|
make install DESTDIR=../processor-trace-%{libipt_version}-root
|
|
|
|
)
|
|
|
|
# There is also: --with-libipt-prefix
|
|
|
|
CFLAGS="$CFLAGS -I$PWD/processor-trace-%{libipt_version}-root%{_includedir}"
|
|
|
|
LDFLAGS="$LDFLAGS -L$PWD/processor-trace-%{libipt_version}-root%{_libdir}"
|
|
|
|
%endif
|
|
|
|
|
2017-02-17 13:14:36 +00:00
|
|
|
export CXXFLAGS="$CFLAGS"
|
|
|
|
|
2019-09-26 14:06:39 +00:00
|
|
|
export LIBRPM=$(ldd /bin/rpm \
|
|
|
|
| grep librpm.so \
|
|
|
|
| awk '{print $3}')
|
2019-09-10 15:34:12 +00:00
|
|
|
if [ "$LIBRPM" != "" ]; then
|
|
|
|
[ -f "$LIBRPM" ]
|
|
|
|
else
|
|
|
|
export LIBRPM=no
|
2013-11-15 12:08:46 +00:00
|
|
|
fi
|
2019-09-10 15:34:12 +00:00
|
|
|
|
2019-06-05 12:50:01 +00:00
|
|
|
%ifarch %ix86 ia64 ppc ppc64 ppc64le s390 s390x x86_64 aarch64 riscv64
|
2013-07-08 14:47:04 +00:00
|
|
|
%define build_multitarget 1
|
|
|
|
%else
|
|
|
|
%define build_multitarget 0
|
|
|
|
%endif
|
2019-06-05 12:50:01 +00:00
|
|
|
%define target_list i686 powerpc powerpc64 powerpc64le s390 s390x x86_64 arm aarch64 m68k ia64 riscv64
|
2013-07-08 14:47:04 +00:00
|
|
|
%define DIST %(echo '%distribution' | sed 's, /.*,,')
|
|
|
|
%if %build_multitarget
|
|
|
|
EXTRA_TARGETS="%(printf ,%%s-suse-linux %target_list)"
|
|
|
|
EXTRA_TARGETS="$EXTRA_TARGETS,spu-elf"
|
|
|
|
%else
|
|
|
|
EXTRA_TARGETS=
|
|
|
|
%endif
|
2010-03-12 00:40:02 +00:00
|
|
|
|
|
|
|
../configure \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--sysconfdir=%{_sysconfdir} \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
2011-08-11 13:47:36 +00:00
|
|
|
--htmldir=%{gdb_docdir} \
|
|
|
|
--pdfdir=%{gdb_docdir} \
|
2011-03-10 09:18:25 +00:00
|
|
|
--with-system-gdbinit=%{_sysconfdir}/gdbinit \
|
2010-03-12 00:40:02 +00:00
|
|
|
--with-gdb-datadir=%{_datadir}/gdb \
|
|
|
|
--enable-gdb-build-warnings=,-Wno-unused \
|
2019-06-05 12:50:01 +00:00
|
|
|
%ifnarch %{ix86} alpha ia64 ppc s390 s390x x86_64 ppc64 ppc64le sparc sparcv9 sparc64 riscv64 aarch64
|
2010-03-12 00:40:02 +00:00
|
|
|
--disable-werror \
|
2013-01-11 14:55:20 +00:00
|
|
|
%else
|
2017-02-17 14:47:13 +00:00
|
|
|
%if %{suse_version} <= 1110
|
2013-01-11 14:55:20 +00:00
|
|
|
--disable-werror \
|
2008-08-08 15:28:58 +00:00
|
|
|
%else
|
2010-03-12 00:40:02 +00:00
|
|
|
--enable-werror \
|
2013-01-11 14:55:20 +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 \
|
2016-01-14 17:05:52 +00:00
|
|
|
--with-system-zlib \
|
2012-06-16 04:55:29 +00:00
|
|
|
%if %{suse_version} > 1110
|
|
|
|
--with-system-readline \
|
|
|
|
%else
|
2011-08-11 13:47:36 +00:00
|
|
|
--without-system-readline \
|
2012-06-16 04:55:29 +00:00
|
|
|
%endif
|
2010-03-12 00:40:02 +00:00
|
|
|
--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}
|
2017-11-08 14:33:53 +00:00
|
|
|
--with-python=%{_bindir}/%{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
|
2012-06-16 04:55:29 +00:00
|
|
|
%if %{suse_version} >= 1130
|
|
|
|
--with-rpm=$LIBRPM \
|
|
|
|
%else
|
2010-03-12 00:40:02 +00:00
|
|
|
--without-rpm \
|
2012-06-16 04:55:29 +00:00
|
|
|
%endif
|
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 \
|
2011-08-11 13:47:36 +00:00
|
|
|
%endif
|
|
|
|
%ifarch sparc sparcv9 sparc64
|
|
|
|
--without-mmap \
|
2006-12-18 23:16:31 +00:00
|
|
|
%endif
|
2010-03-12 00:40:02 +00:00
|
|
|
--enable-64-bit-bfd \
|
2012-06-16 04:55:29 +00:00
|
|
|
%if %{have_inproctrace}
|
|
|
|
--enable-inprocess-agent \
|
|
|
|
%else
|
|
|
|
--disable-inprocess-agent \
|
2017-10-04 11:22:40 +00:00
|
|
|
%endif
|
|
|
|
%if %{have_libipt}
|
|
|
|
--with-intel-pt \
|
|
|
|
%else
|
|
|
|
--without-intel-pt \
|
2009-05-04 16:53:01 +00:00
|
|
|
%endif
|
2013-07-08 14:47:04 +00:00
|
|
|
--with-bugurl=http://bugs.opensuse.org/ \
|
|
|
|
--with-pkgversion="GDB; %{DIST}" \
|
|
|
|
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
|
2011-08-11 13:47:36 +00:00
|
|
|
%ifarch sparc sparcv9
|
2013-07-08 14:47:04 +00:00
|
|
|
--build=sparc-%{_vendor}-%{_target_os}%{?_gnu}
|
2012-06-16 04:55:29 +00:00
|
|
|
%else
|
|
|
|
$(: It breaks RHEL-5 by %{_target_platform} being noarch-redhat-linux-gnu ) \
|
|
|
|
%ifarch noarch
|
|
|
|
$(:)
|
2009-05-04 16:53:01 +00:00
|
|
|
%else
|
2013-07-08 14:47:04 +00:00
|
|
|
--build=%{_target_platform}
|
2009-05-04 16:53:01 +00:00
|
|
|
%endif
|
2012-06-16 04:55:29 +00:00
|
|
|
%endif
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2010-09-06 11:08:41 +00:00
|
|
|
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
|
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
# Prepare gdb/config.h first.
|
2018-09-11 13:49:10 +00:00
|
|
|
make %{?_smp_mflags} V=1 CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS" maybe-configure-gdb
|
2012-06-16 04:55:29 +00:00
|
|
|
perl -i.relocatable -pe 's/^(D\[".*_RELOCATABLE"\]=" )1(")$/${1}0$2/' gdb/config.status
|
|
|
|
|
2018-09-11 13:49:10 +00:00
|
|
|
make %{?_smp_mflags} V=1 CFLAGS="$CFLAGS $FPROFILE_CFLAGS" LDFLAGS="$LDFLAGS $FPROFILE_CFLAGS"
|
2010-09-06 11:08:41 +00:00
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
! grep '_RELOCATABLE.*1' gdb/config.h
|
|
|
|
|
2010-09-06 11:08:41 +00:00
|
|
|
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
|
|
|
|
|
2019-09-10 15:34:12 +00:00
|
|
|
# This is a build-time test, but still a test. So, skip if we don't do tests.
|
2019-10-01 14:34:39 +00:00
|
|
|
# This is relevant for %%qemu_user_space_build == 1 builds, which atm is
|
2019-09-10 15:34:12 +00:00
|
|
|
# the case for riscv64.
|
|
|
|
%if %{with testsuite}
|
|
|
|
if [ "$LIBRPM" != "no" ]; then
|
|
|
|
cd gdb
|
|
|
|
cat \
|
|
|
|
> hello.c \
|
|
|
|
<<EOF
|
|
|
|
#include <stdio.h>
|
|
|
|
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 \
|
|
|
|
<<EOF
|
|
|
|
expect {
|
|
|
|
"(gdb) " {
|
|
|
|
puts "\nPASS: first prompt"
|
|
|
|
send "start\n"
|
|
|
|
}
|
|
|
|
default {
|
|
|
|
puts "\nFAIL: first prompt (eof or timeout)"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
expect {
|
|
|
|
-re {Missing separate debuginfos, use: zypper install glibc-debuginfo-.*\(gdb\) } {
|
|
|
|
puts "\nPASS: zypper install message"
|
|
|
|
send "quit\n"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
"(gdb) " {
|
|
|
|
puts "\nFAIL: zypper install message"
|
|
|
|
send "quit\n"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
default {
|
|
|
|
puts "\nFAIL: zypper install message (eof or timeout)"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
gdb="./gdb -q -nw -nx -data-directory $(pwd -P)/data-directory"
|
|
|
|
# Due to bsc#1146899 "gdb's zypper install message disappears with
|
|
|
|
# -batch", we need to use an expect test.
|
|
|
|
expect -c "spawn $gdb ./a.out" -f test.exp
|
|
|
|
rm ./test.exp
|
|
|
|
else
|
|
|
|
# If packages are not build with debuginfo, we cannot expect a zypper
|
|
|
|
# install message.
|
|
|
|
echo "UNSUPPORTED: zypper install message"
|
|
|
|
fi
|
|
|
|
rm ./hello.c ./a.out
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
2010-09-06 11:08:41 +00:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
done # fprofile
|
|
|
|
|
|
|
|
cd %{gdb_build}
|
|
|
|
|
2011-08-11 13:47:36 +00:00
|
|
|
#make %{?_smp_mflags} -C gdb/doc {gdb,annotate}{.info,/index.html,.pdf} MAKEHTMLFLAGS=--no-split
|
2010-03-12 00:40:02 +00:00
|
|
|
|
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
|
2019-06-17 13:22:35 +00:00
|
|
|
# Initially we're in the %%{gdb_src} directory.
|
2009-05-04 16:53:01 +00:00
|
|
|
cd %{gdb_build}
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2017-11-15 12:32:21 +00:00
|
|
|
%if %{without testsuite}
|
2009-05-04 16:53:01 +00:00
|
|
|
echo ====================TESTSUITE DISABLED=========================
|
|
|
|
%else
|
|
|
|
echo ====================TESTING=========================
|
|
|
|
cd gdb
|
2017-05-01 02:01:32 +00:00
|
|
|
%if 0%{suse_version} > 1110
|
|
|
|
CC=gcc
|
|
|
|
CXX=g++
|
|
|
|
%else
|
|
|
|
CC=gcc-4.8
|
|
|
|
CXX=g++-4.8
|
|
|
|
mkdir progs
|
|
|
|
for i in gcc g++ gcj gfortran gnat gnatbind gnatmake; do
|
|
|
|
test -f /usr/bin/${i}-4.8 && ln -sf /usr/bin/${i}-4.8 progs/$i
|
|
|
|
done
|
|
|
|
PATH="`pwd`"/progs:${PATH}
|
|
|
|
%endif
|
|
|
|
export CC
|
|
|
|
export CXX
|
|
|
|
$CC -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 "$BI" -a -n "$CHECK" ];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.
|
2017-05-01 02:01:32 +00:00
|
|
|
if ! $CC $BI -o biarch biarch.c
|
2009-05-04 16:53:01 +00:00
|
|
|
then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
CHECK="$CHECK check//unix/$BI"
|
|
|
|
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.
|
2017-05-01 02:01:32 +00:00
|
|
|
$CC $RPM_OPT_FLAGS -o biarch biarch.c
|
2009-05-04 16:53:01 +00:00
|
|
|
RPM_SIZE="$(file ./biarch|sed -n 's/^.*: ELF \(32\|64\)-bit .*$/\1/p')"
|
|
|
|
if [ "$RPM_SIZE" != "64" ]
|
|
|
|
then
|
|
|
|
CHECK="$(echo " $CHECK "|sed 's# check//unix/-m64 # #')"
|
|
|
|
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 \
|
2016-02-29 19:38:18 +00:00
|
|
|
gdb.threads/attach-many-short-lived-threads.exp \
|
2009-05-04 16:53:01 +00:00
|
|
|
; do
|
2016-02-29 19:38:18 +00:00
|
|
|
mv -f ../../gdb/testsuite/$test ../../gdb/testsuite/$test-DISABLED || :
|
2009-05-04 16:53:01 +00:00
|
|
|
done
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
# Run all the scheduled testsuite runs also in the PIE mode.
|
2012-06-16 04:55:29 +00:00
|
|
|
# See also: gdb-runtest-pie-override.exp
|
2018-11-26 15:24:47 +00:00
|
|
|
if rpm -q gcc-PIE; then
|
|
|
|
CHECK="$(echo $CHECK | sed 's#check//unix/[^ ]*#& &/-fno-PIE/-no-pie#g')"
|
|
|
|
else
|
|
|
|
CHECK="$(echo $CHECK | sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')"
|
|
|
|
fi
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
./orphanripper make %{?_smp_mflags} -k $CHECK || :
|
2009-05-04 16:53:01 +00:00
|
|
|
)
|
|
|
|
for t in sum log
|
|
|
|
do
|
|
|
|
for file in testsuite*/gdb.$t
|
|
|
|
do
|
|
|
|
suffix="${file#testsuite.unix.}"
|
|
|
|
suffix="${suffix%/gdb.$t}"
|
|
|
|
ln $file gdb-%{_target_platform}$suffix.$t || :
|
|
|
|
done
|
|
|
|
done
|
|
|
|
# `tar | bzip2 | uuencode' may have some piping problems in Brew.
|
2019-06-17 13:22:35 +00:00
|
|
|
#tar cjf gdb-%%{_target_platform}.tar.bz2 gdb-%%{_target_platform}*.{sum,log}
|
|
|
|
#uuencode gdb-%%{_target_platform}.tar.bz2 gdb-%%{_target_platform}.tar.bz2
|
2015-02-27 11:10:44 +00:00
|
|
|
# Strip dates and completion times from the log to make build-compare happy
|
|
|
|
sed -i -e '/Test Run By abuild on/d' -e 's/completed in [0-9]* seconds//' *.{sum,log}
|
2009-05-04 16:53:01 +00:00
|
|
|
cd ../..
|
|
|
|
echo ====================TESTING END=====================
|
|
|
|
%endif
|
2006-12-18 23:16:31 +00:00
|
|
|
|
|
|
|
%install
|
2019-06-17 13:22:35 +00:00
|
|
|
# Initially we're in the %%{gdb_src} directory.
|
2009-05-04 16:53:01 +00:00
|
|
|
cd %{gdb_build}
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
# It would break RHEL-5 by leaving excessive files for the doc subpackage.
|
|
|
|
%ifnarch noarch
|
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2011-03-10 09:18:25 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d
|
2012-06-16 04:55:29 +00:00
|
|
|
touch -r %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d
|
2019-07-04 07:16:27 +00:00
|
|
|
|
|
|
|
%if 0%{!?_without_python:1}
|
2011-03-10 09:18:25 +00:00
|
|
|
sed 's#%%{_sysconfdir}#%{_sysconfdir}#g' <%{SOURCE4} >$RPM_BUILD_ROOT%{_sysconfdir}/gdbinit
|
2012-06-16 04:55:29 +00:00
|
|
|
touch -r %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit
|
2019-07-04 07:16:27 +00:00
|
|
|
%else
|
|
|
|
sed 's#%%{_sysconfdir}#%{_sysconfdir}#g' <%{SOURCE5} >$RPM_BUILD_ROOT%{_sysconfdir}/gdbinit
|
|
|
|
touch -r %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit
|
|
|
|
%endif
|
2011-03-10 09:18:25 +00:00
|
|
|
|
|
|
|
for i in `find $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb -name "*.py"`
|
|
|
|
do
|
|
|
|
# Files could be also patched getting the current time.
|
|
|
|
touch -r $RPM_BUILD_DIR/%{gdb_src}/gdb/ChangeLog $i
|
|
|
|
done
|
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
%if 0%{?_enable_debug_packages:1} && 0%{!?_without_python:1}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}
|
|
|
|
cp -p $RPM_BUILD_DIR/%{gdb_src}/gdb/gdb-gdb.py $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}/
|
|
|
|
for pyo in "" "-O";do
|
|
|
|
# RHEL-5: AttributeError: 'module' object has no attribute 'compile_file'
|
2017-11-08 14:33:53 +00:00
|
|
|
%{python} $pyo -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT/usr/lib/debug%{_bindir}"'", 1, "'"/usr/lib/debug%{_bindir}"'"))'
|
2012-06-16 04:55:29 +00:00
|
|
|
done
|
|
|
|
%endif # 0%{?_enable_debug_packages:1} && 0%{!?_without_python:1}
|
|
|
|
|
2013-07-08 14:47:04 +00:00
|
|
|
mkdir $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load
|
2012-06-16 04:55:29 +00:00
|
|
|
%if 0%{?rhel:1} && 0%{?rhel} <= 6
|
2011-03-10 09:18:25 +00:00
|
|
|
%if 0%{!?_without_python:1}
|
|
|
|
# Temporarily now:
|
|
|
|
for LIB in lib lib64;do
|
2012-06-16 04:55:29 +00:00
|
|
|
LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_root_prefix}/$LIB"
|
2011-03-10 09:18:25 +00:00
|
|
|
mkdir -p $LIBPATH
|
|
|
|
# basename is being run only for the native (non-biarch) file.
|
|
|
|
sed -e 's,@pythondir@,%{_datadir}/gdb/python,' \
|
2012-06-16 04:55:29 +00:00
|
|
|
-e 's,@toolexeclibdir@,%{_root_prefix}/'"$LIB," \
|
2011-03-10 09:18:25 +00:00
|
|
|
< $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/hook.in \
|
2012-06-16 04:55:29 +00:00
|
|
|
> $LIBPATH/$(basename %{_root_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py
|
|
|
|
# Test the filename 'libstdc++.so.6.*' has matched.
|
|
|
|
test -f $LIBPATH/libstdc++.so.6.[0-9]*-gdb.py
|
2011-03-10 09:18:25 +00:00
|
|
|
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
|
2012-06-16 04:55:29 +00:00
|
|
|
for i in `find $RPM_BUILD_ROOT%{_datadir}/gdb/python -name "*.py"` \
|
|
|
|
`find $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix} -name "*.py"` \
|
|
|
|
; do
|
|
|
|
# Files come from gdb-archer.patch and can be also further patched.
|
|
|
|
touch -r $RPM_BUILD_DIR/%{gdb_src}/gdb/ChangeLog $i
|
|
|
|
done
|
2011-03-10 09:18:25 +00:00
|
|
|
%endif # 0%{!?_without_python:1}
|
2012-06-16 04:55:29 +00:00
|
|
|
%endif # 0%{?rhel:1} && 0%{?rhel} <= 6
|
2010-03-12 00:40:02 +00:00
|
|
|
|
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}/configure*
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_includedir}
|
2012-06-16 04:55:29 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib{bfd*,opcodes*,iberty*}
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
# 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
|
|
|
|
2011-08-11 13:47:36 +00:00
|
|
|
# Packaged GDB is not a cross-target one.
|
|
|
|
(cd $RPM_BUILD_ROOT%{_datadir}/gdb/syscalls
|
|
|
|
rm -f mips*.xml
|
|
|
|
%ifnarch sparc sparcv9 sparc64
|
|
|
|
rm -f sparc*.xml
|
|
|
|
%endif
|
|
|
|
%ifnarch x86_64
|
|
|
|
rm -f amd64-linux.xml
|
|
|
|
%endif
|
|
|
|
%ifnarch %{ix86} x86_64
|
|
|
|
rm -f i386-linux.xml
|
|
|
|
%endif
|
|
|
|
%ifnarch ppc ppc64
|
|
|
|
rm -f ppc{,64}-linux.xml
|
|
|
|
%endif
|
2013-12-09 15:56:11 +00:00
|
|
|
%ifnarch ppc64le
|
|
|
|
rm -f ppc64le-linux.xml
|
|
|
|
%endif
|
2011-08-11 13:47:36 +00:00
|
|
|
)
|
|
|
|
|
2012-06-16 04:55:29 +00:00
|
|
|
# It would break RHEL-5 by leaving excessive files for the doc subpackage.
|
|
|
|
%if 0%{?el5:1}
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/annotate.info*
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/gdb.info*
|
|
|
|
%endif # 0%{?el5:1}
|
|
|
|
# -j1: There is some race resulting in:
|
|
|
|
# /usr/bin/texi2dvi: texinfo.tex appears to be broken, quitting.
|
|
|
|
make -j1 -C gdb/doc install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
# Documentation only for development; keep 'rm's here after "noarch" above.
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/gdbint*
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/stabs*
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|
|
|
|
2019-06-17 13:22:35 +00:00
|
|
|
%ifarch riscv64
|
|
|
|
# Work around RPM build error:
|
|
|
|
# ...
|
|
|
|
# Installed (but unpackaged) file(s) found:
|
|
|
|
# /usr/share/man/man1/gdbserver.1.gz
|
|
|
|
# ...
|
|
|
|
# Filed at PR24575 - "gdbserver.1 should only be installed if gdbserver was
|
|
|
|
# build" ( https://sourceware.org/bugzilla/show_bug.cgi?id=24575 ).
|
|
|
|
rm %{buildroot}/usr/share/man/man1/gdbserver.1
|
|
|
|
%endif
|
|
|
|
|
2006-12-18 23:16:31 +00:00
|
|
|
%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
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
fi
|
2006-12-18 23:16:31 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2018-09-11 13:50:50 +00:00
|
|
|
%doc README NEWS
|
2018-09-11 15:01:08 +00:00
|
|
|
%if 0%{suse_version} >= 1320
|
2018-09-11 13:50:50 +00:00
|
|
|
%license COPYING3 COPYING COPYING.LIB
|
2018-09-11 15:01:08 +00:00
|
|
|
%else
|
|
|
|
%doc COPYING3 COPYING COPYING.LIB
|
|
|
|
%endif
|
2009-05-04 16:53:01 +00:00
|
|
|
%{_bindir}/gcore
|
2014-02-10 17:23:45 +00:00
|
|
|
%{_mandir}/*/gcore.1*
|
2006-12-18 23:16:31 +00:00
|
|
|
%{_bindir}/gdb
|
2012-06-16 04:55:29 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/gdbinit
|
2011-03-10 09:18:25 +00:00
|
|
|
%{_sysconfdir}/gdbinit.d
|
2009-05-04 16:53:01 +00:00
|
|
|
%{_mandir}/*/gdb.1*
|
2006-12-18 23:16:31 +00:00
|
|
|
%{_bindir}/gstack
|
2009-05-04 16:53:01 +00:00
|
|
|
%{_mandir}/*/gstack.1*
|
2011-03-10 09:18:25 +00:00
|
|
|
%{_bindir}/gdb-add-index
|
2014-02-10 17:23:45 +00:00
|
|
|
%{_mandir}/*/gdb-add-index.1*
|
|
|
|
%{_mandir}/*/gdbinit.5*
|
2009-09-26 22:03:42 +00:00
|
|
|
%{_datadir}/gdb
|
2009-05-04 16:53:01 +00:00
|
|
|
%{_infodir}/annotate.info*
|
|
|
|
%{_infodir}/gdb.info*
|
2010-03-12 00:40:02 +00:00
|
|
|
|
2017-11-15 12:32:21 +00:00
|
|
|
%if %{with testsuite}
|
2014-08-13 11:27:24 +00:00
|
|
|
%files testresults
|
2014-08-15 09:38:59 +00:00
|
|
|
%defattr(-,root,root)
|
2014-08-13 11:27:24 +00:00
|
|
|
%doc %{gdb_build}/gdb/gdb-*.sum
|
|
|
|
%doc %{gdb_build}/gdb/gdb-*.log
|
|
|
|
%endif
|
|
|
|
|
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
|
|
|
|
2019-07-26 12:04:33 +00:00
|
|
|
%ifnarch riscv64 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*
|
2012-06-16 04:55:29 +00:00
|
|
|
%if %{have_inproctrace}
|
2010-09-06 11:08:41 +00:00
|
|
|
%{_libdir}/libinproctrace.so
|
2019-06-17 13:22:35 +00:00
|
|
|
%endif # %%{have_inproctrace}
|
2010-09-06 11:08:41 +00:00
|
|
|
%endif
|
2012-06-16 04:55:29 +00:00
|
|
|
|
|
|
|
%post doc
|
|
|
|
# This step is part of the installation of the RPM. Not to be confused
|
|
|
|
# with the 'make install ' of the build (rpmbuild) process.
|
|
|
|
|
|
|
|
# For --excludedocs:
|
|
|
|
if [ -e %{_infodir}/gdb.info.gz ]
|
|
|
|
then
|
|
|
|
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
|
|
|
|
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
|
|
|
|
fi
|
|
|
|
|
|
|
|
%preun doc
|
|
|
|
if [ $1 = 0 ]
|
|
|
|
then
|
|
|
|
# For --excludedocs:
|
|
|
|
if [ -e %{_infodir}/gdb.info.gz ]
|
|
|
|
then
|
|
|
|
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
|
|
|
|
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2007-03-06 08:04:12 +00:00
|
|
|
%changelog
|