%global upstreamname ROCgdb %global rocm_release 5.7 %global rocm_patch 1 %global rocm_version %{rocm_release}.%{rocm_patch} Name: rocgdb Version: %{rocm_version} Release: %autorelease Summary: ROCm source-level debugger License: GPL-2.0-or-later URL: https://github.com/ROCm-Developer-Tools/%{upstreamname} Source: https://github.com/RadeonOpenCompute/%{upstreamname}/archive/refs/tags/rocm-%{version}.tar.gz#/%{upstreamname}-rocm-%{version}.tar.gz # upstream only supports x86_64 ExclusiveArch: x86_64 BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(gmp) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(babeltrace) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(amd-dbgapi) # less certain about these BuildRequires: texinfo BuildRequires: bison BuildRequires: flex BuildRequires: gettext %description ROCgdb, the ROCm source-level debugger for Linux, based on GDB, the GNU source-level debugger %prep %autosetup -n %{upstreamname}-rocm-%{version} -p1 %build GDB_CONFIGURE_FLAGS="\ --program-prefix=roc \ --enable-64-bit-bfd \ --disable-ld \ --disable-gas \ --disable-gdbserver \ --disable-sim \ --disable-rpath \ --enable-tui \ --disable-gdbtk \ --disable-gprofng \ --disable-shared \ --with-expat \ --with-system-zlib \ --without-guile \ --with-babeltrace \ --with-lzma \ --with-python=python3 \ --with-rocm-dbgapi=/usr \ --with-rocm-override-libdir=%{_lib} \ " %configure \ ${GDB_CONFIGURE_FLAGS} \ %ifarch x86_64 --enable-targets='x86_64-linux-gnu,amdgcn-amd-amdhsa' \ %endif %make_build %install %make_install # since this is a fork of gdb, there is a bunch of stuff that we don't want because it'll conflict with gdb rm -rf %{buildroot}%{_datadir}/gdb rm -rf %{buildroot}%{_datadir}/info rm -rf %{buildroot}%{_datadir}/locale rm %{buildroot}%{_libdir}/* rm -rf %{buildroot}%{_includedir}/* # don't include debuginfo for the "duplicated" parts of this rm -rf %{buildroot}%{_prefix}/lib/x86_64-redhat-linux rm -rf %{buildroot}%{_prefix}/x86_64-redhat-linux #rm -rf %{buildroot}%{_prefix}/lib/debug/usr/x86_64-redhat-linux/ %files %license COPYING COPYING3 COPYING.LIB COPYING3.LIB %doc README README-ROCM.md %{_bindir}/rocaddr2line %{_bindir}/rocar %{_bindir}/rocc++filt %{_bindir}/rocelfedit %{_bindir}/rocgcore %{_bindir}/rocgdb %{_bindir}/rocgdb-add-index %{_bindir}/rocgprof %{_bindir}/rocnm %{_bindir}/rocobjcopy %{_bindir}/rocobjdump %{_bindir}/rocranlib %{_bindir}/rocreadelf %{_bindir}/rocsize %{_bindir}/rocstrings %{_bindir}/rocstrip %{_mandir}/man1/* %{_mandir}/man5/* %changelog %autochangelog