Den onsdag den 29. maj 2013 01.16.51 UTC+2 skrev john@gmail.com:
> Lars - I realize this is a very old post but I am wondering if you ever
> figured this out. I am running into the same problem and have found very,
> very little on the web that is useful. Any insight you can add would be most
> appreciated.
>
Hi John,
Here is a patch for gdb 6.6 that fixed the problem for me. There are two
patches, and below is the spec file I used (with Freescale ltib and kernel
2.6.29).
Regards,
Lars
---
%define pfx /opt/freescale/rootfs/%{_target_cpu}
%define cs_version 4.2-82
Summary : Gdb - GNU Source level debugger for C, C++
Name: gdb
Version : 6.6
Release : 2
License : GPL
Vendor : Freescale
Packager: Stuart Hughes/Steve Papacharalambous
Group : Development/Debuggers
Source : %{name}-%{version}.tar.gz
Patch0 : gdb-6.0-tcsetpgrp.patch
Patch1 : %{name}-%{cs_version}-from-fsf-6_6.diff.gz
Patch2 : %{name}-%{version}-UPAGES-undefined.patch
BuildRoot : %{_tmppath}/%{name}
Prefix : %{pfx}
%Description
%{summary}
Notes:
This gdb package is built using gdb-6.6 plus the gdb patch from the
CodeSourcery %{cs_version} release: gdb-%{cs_version}-from-fsf-6_6.diff
The gdb tarball can be obtained from any of the GNU ftp sites or their mirrors.
The CodeSourcery patch can be obtained by downloading the source rpm:
freescale-powerpc-linux-gnu-%{cs_version}.src.rpm from:
http://www.codesourcery.com/gnu_toolchains/power/download.html and then
extracting the gdb patch from this source rpm.
requires: libtermcap and ncurses
%Prep
%setup
%patch0 -p1
%patch1 -p1
%patch2 -p1
# Temporary hack. Stevep
# This is to prevent the following error occuring on some build systems:
# [snip]
# Doing pdf in readline
# make[3]: Entering directory
`/home/stevep/work/ltib/rpm/BUILD/gdb-6.6/readline'
# ( cd doc && make -w pdf )
# make[4]: Entering directory
`/home/stevep/work/ltib/rpm/BUILD/gdb-6.6/readline/doc'
# TEXINPUTS=.:../.././readline/doc:$TEXINPUTS ../.././readline/doc/texi2dvi
../.././readline/doc/rlman.texi
# This is TeX, Version 3.14159 (Web2C 7.3.1)
# (/home/stevep/work/ltib/rpm/BUILD/gdb-6.6/readline/doc/rlman.texi
# (/usr/share/texmf/tex/texinfo/texinfo.tex
# Loading texinfo [version 1999-09-25.10]: Basics, pdf, fonts, page headings,
# tables, conditionals, indexing, sectioning, toc, environments, defuns, macros,
# cross references, (/usr/share/texmf/tex/plain/dvips/epsf.tex) localization,
# and turning on texinfo input format.) (rlman.aux) (version.texi)
# ! Undefined control sequence.
# l.11 @copying
#
# ?
# [/snip]
perl -pi.orig -e 's,^\@copying,\@comment \@copying,;
s,^\@end\s+copying,\@comment \@end copying,;
s,^\@insertcopying,\@comment \@insertcopying,;'
readline/doc/rlman.texi
perl -pi.orig -e 's,^\@copying,\@comment \@copying,;
s,^\@end\s+copying,\@comment \@end copying,;
s,^\@insertcopying,\@comment \@insertcopying,;'
readline/doc/history.texi
perl -pi.orig -e 's,^\@copying,\@comment \@copying,;
s,^\@end\s+copying,\@comment \@end copying,;
s,^\@insertcopying,\@comment \@insertcopying,;'
readline/doc/rluserman.texi
%Build
ORIG_PATH=$PATH
# This is the optimised host type. Needed to prevent infering a native build
OPT_CFGHOST=`echo ${TOOLCHAIN_PREFIX} | perl -n -e 's,-$,,;print'`
# Ensure that build is never the same as hostA.
GDB_BUILD=`echo %{_build} | sed s/-/-build_/`
# Set up the host rpm command. This is done so that the version of expat
# on the host system can be determined. This is needed for cross-gdb with
# xml support enabled.
if [ -x /bin/rpm ]
then
HOST_RPM="/bin/rpm"
elif [ -x /usr/bin/rpm ]
then
HOST_RPM="/usr/bin/rpm"
else
HOST_RPM=""
fi
# Get the version of the host expat package and determine whether it is
# too old to provide cross-gdb xml support.
# Sigh, this is very ugly!
if [ -n ${HOST_RPM} ]
then
HOST_EXPAT_VER=`${HOST_RPM} -q expat | perl -p -e 's,expat-(.*)-\d+$,$1,'`
HOST_EXPAT_VER1=`echo ${HOST_EXPAT_VER} | cut -d. -f1`
HOST_EXPAT_VER2=`echo ${HOST_EXPAT_VER} | cut -d. -f2`
HOST_EXPAT_VER3=`echo ${HOST_EXPAT_VER} | cut -d. -f3`
# Starting with the first compare each of the host expat version numbers
# with the mimimum required. Not pretty!!
if [ ${HOST_EXPAT_VER1} -gt 1 ]
then
HOST_EXPAT_TOO_OLD="no"
elif [ ${HOST_EXPAT_VER1} -eq 1 ]
then
if [ ${HOST_EXPAT_VER2} -gt 95 ]
then
HOST_EXPAT_TOO_OLD="no"
elif [ ${HOST_EXPAT_VER2} -eq 95 ]
then
if [ ${HOST_EXPAT_VER3} -ge 5 ]
then
HOST_EXPAT_TOO_OLD="no"
else
HOST_EXPAT_TOO_OLD="yes"
fi
else
HOST_EXPAT_TOO_OLD="yes"
fi
else
HOST_EXPAT_TOO_OLD="yes"
fi
els