2 %define gdb_run_tests 1
5 # Enable this when testing on device to:
6 # 1. Enable macro to turn on testsuite building ('gdb_run_tests 1')
7 # 2. Skip configure and make commands and go directly to 'make check'
8 %if 0%{?run_tests_on_device}
9 %define gdb_run_tests 1
10 %define gdb_skip_configure 1
11 %define gdb_skip_make 1
14 # Exit right after 'make ..' step to keep all object files produced by gdb build
15 %if 0%{?exit_on_make_finish}
16 %define gdb_exit_on_make_finish 1
23 Summary: A GNU source-level debugger for C, C++, Java and other languages
24 Url: http://gnu.org/software/gdb/
25 Group: Development/Toolchain
26 Source: ftp://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.gz
27 Source1001: gdb.manifest
28 %define gdb_src gdb-%{version}
29 %define gdb_build build-%{_target_platform}
33 BuildRequires: expat-devel
35 BuildRequires: gettext-tools
36 BuildRequires: python3-devel
37 BuildRequires: gcc-c++
38 BuildRequires: ncurses-devel
39 BuildRequires: makeinfo
40 BuildRequires: gmp-devel
41 %if 0%{?gdb_run_tests}
42 BuildRequires: dejagnu
43 BuildRequires: glibc-devel-static
47 GDB, the GNU debugger, allows you to debug programs written in C, C++,
48 Java, and other languages, by executing them in a controlled fashion
49 and printing their data.
52 Summary: Development files for gdb
55 Development files for gdb.
59 Summary: A standalone server for GDB (the GNU source-level debugger)
62 GDB, the GNU debugger, allows you to debug programs written in C, C++,
63 Java, and other languages, by executing them in a controlled fashion
64 and printing their data.
66 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.
71 Summary: Testsuite results
72 License: Public Domain
73 Group: Development/Building
74 %description testresults
75 Results from running the gdb tests.
82 # Remove the info and other generated files added by the FSF release
84 rm -f libdecnumber/gstdint.h
86 rm -f bfd/doc/*.info-*
88 rm -f gdb/doc/*.info-*
91 export CFLAGS+=" -fPIE"
92 #If you want to add a new LDFLAGS to IPA, add it to `IPA_LDFLAGS` rather than` LDFLAGS`.
93 export LIB_CXXFLAGS=$CXXFLAGS
94 export IPA_LDFLAGS=$LDFLAGS
95 export CXXFLAGS+=" -fPIE"
96 export LDFLAGS+=" -pie"
98 %{!?gdb_skip_configure:
100 --with-gdb-datadir=%{_datadir}/gdb \
101 --enable-gdb-build-warnings=,-Wno-unused \
103 --with-separate-debug-dir=/usr/lib/debug \
104 %{!?gdb_run_tests:--disable-sim} \
107 --enable-64-bit-bfd \
109 %{!?gdb_run_tests: --enable-static --disable-shared}
116 %{?gdb_exit_on_make_finish:
122 # asan needs a whole shadow address space
123 ulimit -v unlimited || true
124 make -k check %{?_smp_mflags} || true
126 for tool in $(find -name '*.sum' -exec basename {} \; | sort -u | sed -e 's/.sum//'); do
127 ./contrib/dg-extract-results.sh -t $tool $(find -name '*.sum') | tee -a ./testresults/test_summary.txt
136 find . \( -name "*.sum" -o -name "*.log" -a \! -name "config.log" \) -exec tar -rf testresults.tar {} \;
137 mkdir -p ./testresults && tar -xf testresults.tar -C ./testresults
138 find ./testresults/ -type f -exec chmod 644 {} \;
143 mv opcodes.lang %{name}.lang
144 cat bfd.lang >> %{name}.lang
151 %defattr(-,root,root)
152 %manifest %{name}.manifest
153 %license COPYING COPYING.LIB
159 %manifest %{name}.manifest
160 %defattr(-,root,root)
162 %{_mandir}/*/gdbserver.1*
163 %ifarch %{ix86} x86_64 aarch64
164 %{_libdir}/libinproctrace.so
169 %manifest %{name}.manifest
171 %{_includedir}/gdb/*.h
175 %defattr(-,root,root)
176 %doc testresults/test_summary.txt