%define cross_arch arm %define cross_triplet arm-none-eabi %define cross_sysroot %{_prefix}/%{cross_triplet}/sys-root %global majorversion 10 %global versionyear 2020 %global versionquarter q4 %global versionsuffix major %global gccversion 10.2.0 Name: %{cross_triplet}-gdb-arm Version: %{majorversion}_%{versionyear}%{versionquarter} Release: 1%{?dist} Summary: GDB for (remote) debugging (%{cross_triplet}) Group: Development/Debuggers License: GPLv3+ URL: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm Source0: https://developer.arm.com/-/media/Files/downloads/gnu-rm/%{majorversion}-%{versionyear}%{versionquarter}/gcc-arm-none-eabi-%{majorversion}-%{versionyear}-%{versionquarter}-%{versionsuffix}-src.tar.bz2 #Patch0: armgdb-compile.patch #Patch1: arm-gdb-python.patch BuildRequires: texinfo BuildRequires: ncurses-devel BuildRequires: python-devel BuildRequires: texinfo-tex BuildRequires: expat-devel BuildRequires: flex BuildRequires: bison BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: mpfr-devel %if 0%{?fedora} >= 27 BuildRequires: libipt-devel %endif BuildRequires: python2-devel %if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 BuildRequires: python-unversioned-command %endif %description This is a version of GDB, the GNU Project debugger, for (remote) debugging %{cross_triplet} 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 (%{cross_triplet}) Group: Development/Debuggers Requires: %{name} = %{version}-%{release} %description devel This is a version of GDB, the GNU Project debugger, for (remote) debugging %{cross_triplet} 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 -n gcc-arm-none-eabi-%{majorversion}-%{versionyear}-%{versionquarter}-%{versionsuffix} pushd src tar xjf gdb.tar.bz2 popd #patch0 -p0 -b .xx #pushd src/gdb #patch1 -p0 -b .python #popd %build cd %{_builddir}/gcc-arm-none-eabi-%{majorversion}-%{versionyear}-%{versionquarter}-%{versionsuffix}/src mkdir -p gdb-build cd gdb-build ../gdb/configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --host=%{_target_platform} \ --build=%{_target_platform} \ --target=%{cross_triplet} \ --disable-nls \ --disable-sim \ --disable-gas \ --disable-binutils \ --disable-ld \ --disable-gprof \ --with-libexpat \ --with-lzma=no \ --with-system-gdbinit=%{_prefix}/arm-none-eabi/lib/gdbinit \ --with-python=yes \ --with-gdb-datadir=%{_datarootdir}/gdb-%{cross_triplet}-%{gccversion} \ "--with-pkgversion=GNU Tools for ARM Embedded Processors" make %{?_smp_mflags} %install cd %{_builddir}/gcc-arm-none-eabi-%{majorversion}-%{versionyear}-%{versionquarter}-%{versionsuffix}/src/gdb-build make DESTDIR=%{buildroot} install #make DESTDIR=%{buildroot} install-html install-pdf # we don't want these as this is a cross-compiler rm -rf $RPM_BUILD_ROOT%{_infodir} rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a # Get rid of the shared lib rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{cross_triplet}-sim.a # Non-linux targets don't have syscalls rm -rf $RPM_BUILD_ROOT%{_prefix}/share/gdb/syscalls %files %license src/gdb/{COPYING?,COPYING?.LIB} %{_bindir}/%{cross_triplet}-* %{_mandir}/man1/%{cross_triplet}-*.1.gz %{_mandir}/man5/%{cross_triplet}-*.5.gz %dir %{_datarootdir}/gdb-%{cross_triplet}-%{gccversion} %{_datarootdir}/gdb-%{cross_triplet}-%{gccversion}/* %files devel %defattr(-,root,root,-) %{_includedir}/gdb/jit-reader.h %changelog * Tue Aug 11 2020 Thomas Sailer - 9_2020q2-1 - update * Sat Sep 28 2019 Thomas Sailer - 8_2019q3-1 - update * Wed Feb 13 2019 Thomas Sailer - 8_2018q4-1 - update * Tue Nov 14 2017 Thomas Sailer - 6_2017q2-1 - Update * Sat Jan 28 2017 Thomas Sailer - 5_4_2016q3_20160926-0 - Initial spec file