%define target arm-none-eabi %define gdb_datarootdir %{_datarootdir}/gdb-%{target}-%{version} # Turn off the brp-python-bytecompile automagic %global _python_bytecompile_extra 0 Name: %{target}-gdb Version: 13.2 Release: %{autorelease} Summary: GDB for (remote) debugging ARM targets Group: Development/Debuggers License: GPL-3.0-or-later URL: https://www.sourceware.org/gdb/ Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.xz BuildRequires: gcc-c++ ncurses-devel texinfo gettext flex bison BuildRequires: expat-devel BuildRequires: xz-devel BuildRequires: rpm-devel BuildRequires: zlib-devel BuildRequires: python3-devel BuildRequires: libstdc++ BuildRequires: texinfo-tex BuildRequires: /usr/bin/pod2man BuildRequires: libbabeltrace-devel BuildRequires: guile22-devel BuildRequires: make %description This is a version of GDB, the GNU Project debugger, for (remote) debugging %{target} binaries. GDB allows you to see and modify what is going on inside another program while it is executing. %package devel Summary: GDB for (remote) debugging ARM targets Group: Development/Debuggers Requires: %{name} = %{version}-%{release} %description devel This is a version of GDB, the GNU Project debugger, for (remote) debugging %{target} binaries. GDB allows you to see and modify what is going on inside another program while it is executing. This package contains development headers for working with gdb. %prep %setup -q -c -n %{name} cd gdb-%{version} find -name "*.info" | xargs rm -f 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-* %build mkdir -p build cd build # Set datarootdir to have target and version in so that we can exist # side-by-side with other gdb installations of different versions CFLAGS="$RPM_OPT_FLAGS" ../gdb-%{version}/configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --datarootdir=%{gdb_datarootdir} \ --disable-rpath \ --enable-build-with-cxx \ --disable-nls \ --disable-werror \ --disable-unit-tests \ --disable-source-highlight \ --disable-sim \ --without-python \ --without-babeltrace \ --without-doc \ --without-guile \ --with-xml \ --with-expat \ --target=%{target} %make_build %{?_smp_mflags} %install rm -rf %{buildroot} cd build %make_install # we don't want these as this is a cross-compiler rm -rf %{buildroot}%{_infodir} rm -f %{buildroot}%{_libdir}/libiberty.a # Get rid of the shared lib rm -f %{buildroot}%{_libdir}/lib%{target}-sim.a # Non-linux targets don't have syscalls rm -rf %{buildroot}%{_prefix}/share/gdb/syscalls %files %doc gdb-%{version}/{COPYING?,COPYING?.LIB} %{_bindir}/%{target}-* %{_mandir}/man1/%{target}-*.1.gz %{_mandir}/man5/%{target}-*.5.gz %dir %{_datarootdir}/gdb-%{target}-%{version} %{_datarootdir}/gdb-%{target}-%{version}/* %files devel %{_includedir}/gdb/jit-reader.h %changelog %autochangelog