[ExtractStream] Status on Splitstream compiling with cygwin...
Mark Jeffcoat
jeffcoat at a...
Sat, 2 Feb 2002 05:05:25 -0600
On Fri, Feb 01, 2002 at 09:37:09PM -0800, Roger Merchberger wrote:
> A while ago...
> --- Mark Jeffcoat <jeffcoat@a...> wrote:
> > On Thu, Jan 31, 2002 at 09:12:57PM -0800, Roger Merchberger wrote:
> > Have you thought about using gcc under Cygwin, instead?
> > Then you could just build the cross-compiler as per usual,
> > using the toolchain and gcc that Tivo distributes.
>
> Otay - I stopped by work today & downloaded the whole shebang for
> Cygwin - much easier on a 3Mbit line than a 44K (if I'm lucky...)
> dial-up connection...
>
> Installed without a hitch, and gotten some interesting numbers...
>
> Size of SS from joe666boxer: 57,344 bytes
> [[ I assume this was compiled with some form of MS C compiler... ]]
> Size of SS compiled with djgpp: 98,492 bytes
> [same as above, but stripped of debug info]: 60,416 bytes
> Size of SS compiled with djgpp & -O2 switch: 96,444 bytes
> [same as above, but stripped of debug info]: 58,368 bytes
>
> I was thinking... Hmmm - pretty normal, djgpp prolly inserts a little
> extra stuff in the headers or something... but watch this:
>
> Size of SS compiled with cygwin gcc : 29,335 bytes
> [same as above, but stripped of debug info]: 11,776 bytes
>
> Size of SS compiled with djgpp & -O2 switch: 27,116 bytes
> [same as above, but stripped of debug info]: 9,728 bytes
>
> Whoa! Whaddya think of them apples??? 8-o
I'm assuming you meant that last block to read "cygwin gcc"
instead of "djgpp", else it doesn't make any sense. djgpp
was originally written for DOS, and has to do backflips
to deal with its memory model ("640k ought to be enough for
anyone"); my guess is that lots of the extra space is overhead
from that.
> Splitting the chunk with the cygwin-compiled SS with the -O2
> optimization switch: Seemed to work fine, but there was an extra bit
> of output, which I don't think affected the streams but might worry a
> beginner. Here's what the output looked like:
Maybe. They should be the same, but sometimes turning on
optimization tickles small bugs that a more laid-back
compiler doesn't notice.
> So... Does anyone have a "setting up Cygwin gcc to cross-compile Tivo
> proggies for Dummies" webpage? ;-)
Setting up a cross-compiler under cygwin ought not to be
any different than elsewhere. Here's a little mini-howto.
If anyone wants to set up "for Dummies" webpage, feel
free to copy liberally. (And wouldn't a wiki be nice?
Web pages tend to go out of date as soon as the author gets
distracted. Wouldn't it be great to be able to harness
all the insomnia that might otherwise go to waste?)
1. Download the packages from somewhere:
A. http://tivo.samba.org/download/tivo_releases/
B. there is no B. I figure Tivo must have
an official site somewhere, but I don't know
where it is.
I'll assume you'll get the 2.5.x release. Get
at least the toolchain and maybe the linux
tarballs.
2. Uncompress and extract.
3.
cd toolchain/binutils-2.9.1
./configure --target=powerpc-TiVo-linux \
--prefix=/tmp/toolchain -nfp
make
make install
4. Step three should happen without error. Note the
prefix directory--that's where 'make install' is
going to start putting your new cross-toolchain.
5. Compiling gcc. This is trickier:
cd toolchain/gcc-2.8.1
(***) ./configure --target=powerpc-TiVo-linux \
--prefix=/tmp/toolchain -nfp
That step doesn't work for me. This may just
be a problem with my glibc, but I can't compile
tivoCallGraph.c and tivoDeclIter.c, because
of some confusion in string.h. If you get the
same error, one way to fix it is to point those
two files to the string.h in the kernel you
downloaded. This is a bad idea in general,
but what the hell: It seems to work. Fix these
and re-run configure, if necessary.
Edit the generated Makefile; look for the
'LANGUAGES = c proto gcov c++ objc' line.
Remove objc. There's probably a way to
convince configure to do this automatically.
'make' and 'make install'.
6. You should have a basically functional
cross-compiler at this point. Give it a try,
see what happens. I'm kind of curious...this
stuff is probably pushing hard on cygwin's
compatability.
--
Mark Jeffcoat