Version: 6.6.50 Release: 12 Name: spu-gdb Summary: SPU stand-alone debugger License: GPL Group: Cell Development Tools Source: gdb-6.6.50-20070623.tar.bz2 Patch1: diff-spu-gdb-regformatfix Patch2: diff-spu-gdb-fix-fortran_registers Patch3: diff-spu-ext-mi Patch4: diff-dejagnu-config Patch5: diff-wrap-spu-addr BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext BuildRequires: flex bison %define _unpackaged_files_terminate_build 1 %description GNU debugger for Cell Broadband Engine SPU (standalone). # Don't strip as the host binutils may be unable to handle SPU objects. %define __os_install_post /usr/lib/rpm/brp-compress # When building the cross-toolchain, reset prefix directory and use sysroot %ifnarch ppc ppc64 %define _prefix /opt/cell/toolchain %define _mandir %{_prefix}/man %define _infodir %{_prefix}/info %define with_sysroot --with-sysroot=/opt/cell/sysroot %endif %package testsuite Summary: DejaGnu testsuite for spu-gdb Group: Cell Development Tools Requires: spu-gdb = %{version}-%{release}, dejagnu %description testsuite DejaGnu testsuite for spu-gdb. %prep %setup -c -q %patch1 -p0 %patch2 -p0 %patch3 -p0 %patch4 -p0 %patch5 -p0 %build %define spu_target_platform spu %define spu_prefix spu- rm -fr obj-%{spu_target_platform} mkdir obj-%{spu_target_platform} cd obj-%{spu_target_platform} export CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ../src/configure \ --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ %{?with_sysroot} \ --disable-shared --disable-nls --disable-werror \ --program-prefix=%{spu_prefix} \ --target=%{spu_target_platform} make %{?_smp_mflags} %install rm -fr $RPM_BUILD_ROOT cd obj-%{spu_target_platform} make DESTDIR=$RPM_BUILD_ROOT install # Install the testsuite and helper scripts mkdir -p $RPM_BUILD_ROOT%{_prefix}/share cp -R $RPM_BUILD_DIR/spu-gdb-%{version}/src/gdb/testsuite $RPM_BUILD_ROOT%{_prefix}/share/spu-gdb-testsuite install -D -m 644 $RPM_BUILD_DIR/spu-gdb-%{version}/src/spu-gdb-native.exp $RPM_BUILD_ROOT/usr/share/dejagnu/baseboards/spu-gdb-native.exp install -D -m 644 $RPM_BUILD_DIR/spu-gdb-%{version}/src/spu-gdb-remote.exp $RPM_BUILD_ROOT/usr/share/dejagnu/baseboards/spu-gdb-remote.exp install -m 755 $RPM_BUILD_DIR/spu-gdb-%{version}/src/test-installed-spu-gdb $RPM_BUILD_ROOT%{_prefix}/share/spu-gdb-testsuite # Create script to run spu-gdb testsuite cat > $RPM_BUILD_ROOT%{_prefix}/bin/spu-gdb-runtests <<"EOF" #!/bin/sh %ifarch ppc ppc64 function usage { echo "Usage: $0 native | remote "; exit 1; } %else function usage { echo "Usage: $0 "; exit 1; } %endif test $# -eq 0 && usage %ifarch ppc ppc64 test $1 = native -o \( $1 = remote -a $# = 2 \) || usage test $1 = remote && export GDB_TARGET_HOSTNAME=$2 if [ $1 = native ] ; then board=spu-gdb-native; else board=spu-gdb-remote; fi %else test $1 = native -o $1 = localhost && usage export GDB_TARGET_HOSTNAME=$1 board=spu-gdb-remote %endif bin=%{_prefix}/bin pushd %{_prefix}/share/spu-gdb-testsuite subdirs=`find -type d -name 'gdb*'` popd for I in $subdirs do mkdir -p $I done %{_prefix}/share/spu-gdb-testsuite/test-installed-spu-gdb --with-testsuite=%{_prefix}/share/spu-gdb-testsuite --with-gcc=%{_prefix}/bin/spu-gcc --with-gdb=%{_prefix}/bin/spu-gdb --target=spu-unknown-elf --target_board $board test $1 != native && unset GDB_TARGET_HOSTNAME EOF chmod 755 $RPM_BUILD_ROOT%{_prefix}/bin/spu-gdb-runtests # Info and man7 files conflict with host toolchain files, # just remove them for now. rm -rf $RPM_BUILD_ROOT%{_infodir} rm -rf $RPM_BUILD_ROOT%{_mandir}/man7 # These come with the binutils package. rm -rf $RPM_BUILD_ROOT/%{_prefix}/lib/lib{bfd*,opcodes*,iberty*,mmalloc*} cd .. %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/bin %dir %{_mandir} %dir %{_mandir}/man1 %{_prefix}/bin/%{spu_prefix}gdb %{_prefix}/bin/%{spu_prefix}gdbtui %{_mandir}/man1/%{spu_prefix}gdb* %ifarch ppc ppc64 %{_prefix}/bin/%{spu_prefix}gdbserver %endif %files testsuite %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/bin %dir %{_prefix}/share %{_prefix}/bin/spu-gdb-runtests %{_prefix}/share/spu-gdb-testsuite %dir /usr/share/dejagnu/baseboards /usr/share/dejagnu/baseboards/spu-gdb-native.exp /usr/share/dejagnu/baseboards/spu-gdb-remote.exp %changelog * Wed Aug 29 2007 Markus Deuling 6.6.50-12 - Change gdb.cp/cp-relocate testcase to fit into SPU Local Store. * Tue Aug 21 2007 Markus Deuling 6.6.50-11 - Disable testsuite running cross native. - Remove diff-fix-gdbsrv-dejagnu. * Fri Aug 17 2007 Markus Deuling 6.6.50-10 - Fix running testsuite remotely. * Thu Aug 09 2007 Markus Deuling 6.6.50-9 - Remove use of ID register. - Merge address conv and address wrap patch together. * Wed Aug 08 2007 Markus Deuling 6.6.50-8 - Add address conversion functions. - Use LSLR Register to detect LS size. - Truncate SPU addresses > LS size (#29632). * Fri Aug 03 2007 Markus Deuling 6.6.50-7 - Fix i686 build. * Thu Aug 02 2007 Markus Deuling 6.6.50-6 - Explicitly select files in /bin. * Wed Aug 01 2007 Markus Deuling 6.6.50-5 - Rename start script for testsuite package. * Tue Jul 24 2007 Ulrich Weigand 6.6.50-4 - Fix register order mismatch in SPU gdbserver protocol. * Tue Jul 03 2007 Markus Deuling 6.6.50-3 - Add Michael Pfaff's fix for i686 build. * Fri Jun 29 2007 Markus Deuling 6.6.50-2 - Add dejagnu board file for cell (diff-dejagnu-config). - Add new package spu-gdb-testsuite. * Mon Jun 25 2007 Ulrich Weigand 6.6.50-1 - Port to 20070623 mainline snapshot. * Tue Jun 12 2007 Ulrich Weigand 6.6-22 - Update SPU enhancement / overlay patches to mainline versions. - Backport mainline SPU changes. * Tue Jun 05 2007 Markus Deuling 6.6-21 - Change register handling in fortran. Call C-language routines. * Mon Jun 04 2007 Markus Deuling 6.6-20 - Add 'diff-spu-gdb-fix-fortran_registers'. Fortran handles SPU side vector register union as array double[2] (real*8). * Fri May 18 2007 Ulrich Weigand 6.6-19 - Change cross-prefix to /opt/cell/toolchain. Do not change sysroot. - Change group tag to "Cell Development Tools". * Thu Apr 26 2007 Markus Deuling 6.6-18 - Add support for multiply-defined global symbol disambiguation problem (TCN3014). * Wed Mar 28 2007 Markus Deuling 6.6-17 - Rework of qXfer:read/write handling. - Add qSupported support for spu:qXfer.ยท * Thu Mar 22 2007 Markus Deuling 6.6-16 - Cleanup diff-gdb-qxfer-spu. * Fri Mar 16 2007 Ulrich Weigand 6.6-15 - Backport mainline bugfixes. * Wed Mar 14 2007 Ulrich Weigand 6.6-14 - Re-order and merge some patches. * Fri Mar 09 2007 Ulrich Weigand 6.6-13 - Fix qXfer:spu:write regression (#32859). - Fix spu-gdbserver qXfer:spu:read regression. * Thu Mar 08 2007 Ulrich Weigand 6.6-12 - Update diff-spu-gdb-callfuncs-fix to mainline backport. * Sat Mar 03 2007 Ulrich Weigand 6.6-11 - Fix breakpoint removal corrupting wrong overlay (TC #34). * Wed Feb 28 2007 Ulrich Weigand 6.6-10 - Switch inferior function calls to ON_STACK method. * Mon Feb 26 2007 Ulrich Weigand 6.6-9 - Fix handling of interrupt enable bit in NPC (#32247). * Mon Feb 26 2007 Ulrich Weigand 6.6-8 - Fix callfuncs.exp and dump.exp testcase problems. * Thu Feb 15 2007 Markus Deuling 6.6-7 - Fix handling for 'q' packets in gdbserver (#31980) * Tue Jan 30 2007 Alan Modra 6.6-6 - Provide iovec stat function. #26697 * Mon Jan 22 2007 Ben Elliston 6.6-5 - Change the cross-prefix to /opt/cell. * Thu Jan 18 2007 Ulrich Weigand 6.6-4 - Rename SOMA patch to avoid name collision (#31122). * Fri Jan 12 2007 Ulrich Weigand 6.6-3 - Add SOMA disassembler support. * Thu Jan 11 2007 Ulrich Weigand 6.6-2 - Re-add lost fix for #29298 (backtrace at entry function). * Tue Jan 9 2007 Ulrich Weigand 6.6-1 - Initial version of standalone spu-gdb package.