Version: 6.6 Release: 15 Name: ppu-gdb Summary: Combined debugger for Linux on Cell BE License: GPL Group: Development/Debuggers Source: ftp://ftp.gnu.org/gnu/gdb/gdb-6.6.tar.bz2 # These are shared between spu-gdb and ppu-gdb Patch1: diff-spu-gdb-regtype Patch2: diff-spu-gdb-vector Patch3: diff-spu-gdb-overlay-gdbarch Patch4: diff-spu-gdb-overlay-tdep Patch5: diff-spu-gdb-overlay-test Patch6: diff-spu-gdb-ext Patch7: diff-gdb-qxfer-spu Patch8: diff-spu-gdb-backtracefix Patch9: diff-spu-gdb-soma Patch10: diff-bfd-iovec-stat Patch11: diff-fix-31980 Patch12: diff-spu-gdb-callfuncs-fix Patch13: diff-spu-gdb-clidump-fix Patch14: diff-spu-gdb-interrupt Patch15: diff-spu-gdb-onstack-fix Patch16: diff-spu-gdb-overlay-bpfix # Combined debugger patches start at 100 Patch100: diff-gdb-ppcfixes Patch101: diff-longdouble-fix Patch102: diff-combined-gdb Patch103: diff-combined-gdb-gdbserver Patch104: diff-combined-gdb-core Patch105: diff-combined-gdb-core-bfd Patch106: diff-combined-bfd-iovec-stat Patch107: diff-fix-31960 Patch108: diff-bfd-corewrite Patch109: diff-gdb-corewrite Patch110: diff-combined-gdb-overlay 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 PPU/SPU. # 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 %define _mandir %{_prefix}/man %define _infodir %{_prefix}/info %define with_sysroot 1 %else %define with_sysroot 0 %endif %prep %setup -c -q %patch1 -p0 %patch2 -p0 %patch3 -p0 %patch4 -p0 %patch5 -p0 %patch6 -p0 %patch7 -p0 %patch8 -p0 %patch9 -p0 %patch10 -p0 %patch11 -p0 %patch12 -p0 %patch13 -p0 %patch14 -p0 %patch15 -p0 %patch16 -p0 %patch100 -p0 %patch101 -p0 %patch102 -p0 %patch103 -p0 %patch104 -p0 %patch105 -p0 %patch106 -p0 %patch107 -p0 %patch108 -p0 %patch109 -p0 %patch110 -p0 %build %define ppu_prefix ppu- %define ppu32_prefix ppu32- rm -fr obj-ppu mkdir obj-ppu cd obj-ppu CC=gcc CFLAGS="$RPM_OPT_FLAGS" %ifarch ppc ppc64 CC='gcc -m64' CFLAGS=`echo $CFLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'` %endif CC="$CC" CFLAGS="$CFLAGS" ../gdb-%{version}/configure \ --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ %if %{with_sysroot} --with-sysroot=%{_prefix}/sysroot \ %endif %ifarch ppc ppc64 --host=powerpc64-linux \ %endif --disable-nls --disable-sim --disable-install-libbfd \ --program-prefix=%{ppu_prefix} \ --target=powerpc64-linux --enable-targets=spu make %{?_smp_mflags} cd .. # Do a second build of gdbserver only, using --target=powerpc-linux. # This is so we get a gdbserver suited for 32-bit programs. %ifarch ppc ppc64 rm -rf obj-ppu32 mkdir obj-ppu32 cd obj-ppu32 CC='gcc -m32' CFLAGS="$CFLAGS" ../gdb-%{version}/configure \ --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ %if %{with_sysroot} --with-sysroot=%{_prefix}/sysroot \ %endif --program-prefix=%{ppu32_prefix} \ --host=powerpc-linux --target=powerpc-linux --enable-targets=spu make configure-gdb make -C gdb/gdbserver %{?_smp_mflags} cd .. %endif %install rm -fr $RPM_BUILD_ROOT cd obj-ppu make DESTDIR=$RPM_BUILD_ROOT install cd .. # Install the extra gdbserver builds (just the binaries) %ifarch ppc ppc64 cd obj-ppu32 make DESTDIR=$RPM_BUILD_ROOT -C gdb/gdbserver install rm -rf $RPM_BUILD_ROOT%{_mandir}/man1/%{ppu32_prefix}* cd .. %endif # 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*} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/bin %dir %{_mandir} %dir %{_mandir}/man1 %{_prefix}/bin/%{ppu_prefix}gdb* %ifarch ppc ppc64 %{_prefix}/bin/%{ppu32_prefix}gdb* %endif %{_mandir}/man1/%{ppu_prefix}gdb* %changelog * Fri Mar 09 2007 Ulrich Weigand 6.6-15 - Fix qXfer:spu:write regression (#32859). - Fix spu-gdbserver qXfer:spu:read regression. * Sat Mar 03 2007 Ulrich Weigand 6.6-14 - Fix breakpoint removal corrupting wrong overlay (TC #34). - Fix overlay event handling in combined debugger. * Thu Mar 01 2007 Alan Modra 6.6-13 - Allow writing of 32-bit core files from 64-bit gdb. #28949 * Wed Feb 28 2007 Ulrich Weigand 6.6-12 - Fix SPE inferior function calls in the combined debugger. - Fix spu stop-on-load mangling the SPE "main" symbol. * Wed Feb 28 2007 Markus Deuling 6.6-11 - Add fix for #32180 to diff-combined-gdb. * Mon Feb 26 2007 Ulrich Weigand 6.6-10 - Fix handling of interrupt enable bit in NPC (#32247). * Mon Feb 26 2007 Ulrich Weigand 6.6-9 - Fix callfuncs.exp and dump.exp testcase problems. * Tue Feb 20 2007 Markus Deuling 6.6-8 - Fix unary * handling of TYPE_CODE_INT (#31960). * 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 ppu-gdb package.