Since one of the potentially more useful aspects of tomsrbt is the 
ability to add your own programs to the disk, I thought I'd share my 
experiences trying to get stuff to compile for tomsrtbt.

It turns out that the major distributions these days are glibc (libc6) 
based while tomsrtbt, for space reasons, is based on the previous 
release of libc for linux, libc5.

This means that programs you compile on your regular linux box 
will *not* work on tomsrtbt.

I spent a day or so reading various HOWTO's and old news 
postings and my options seemed to come down to this:

1. Create a cross compiler from scratch.  The compiler would run 
on your libc6 system, but produce the libc5 binaries which tomsrtbt 
requires.  In order to do this, you need to get and compile the 
source for *both* libc5 as well as gcc.  As far as I can tell there is 
no FAQ that tells you how to do this.  The best resource I found 
describes the reverse process (i.e., create a glibc cross compiler 
on a libc5 system), but the principles are the same and the 
pointers to the files you need are current.  You can find Frodo 
Looijaard's page at:

http://huizen.dds.nl/~frodol/glibc/index.html

2. Try to get gcc to cross-compile using command line switches.  
WARNING!  I never got this to work personally, before I found a 
better way, but here's my best guess.  Note that for this to work 
you need to have the libc5 header files somewhere on your 
system.  In my case, the distribution I use (Redhat 5.2) did *not* 
supply these files.  The directories listed here are for my system 
and will probably be different on yours.  

/usr/bin/gcc -nostdinc \
/*the directory which contains the libc5 header files.  If you don't 
have these files, read on! */
        -I/usr/i486-linuxlibc5/include \
/*the directory which contains the header files specific to your 
version of gcc*/
        -I/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/include 

3.  The easy way!  Since a number of people have faced this 
problem before, you'd think there be a pre-compiled package you 
could just download.  After scouring newsgroups I came across a 
pointer to a libc5 cross compiler rpm for Redhat.  It turned out that I 
actually needed three separate packages:

1. The gcc cross compiler for libc5.
2. A binary version of the library, libc5, so I could test programs on 
the same machine I compiled them on.
3. The libc5 header files (very important and not supplied on Redhat 
5.2)

These packages, created by Christopher Seawood, can be had at:

http://developer.redhat.com/rhcn/browse/conventional/packageinfo.p
hp3?package=gcc-libc5

http://developer.redhat.com/rhcn/browse/conventional/packageinfo.p
hp3?package=gcc2.7

http://developer.redhat.com/rhcn/browse/conventional/packageinfo.p
hp3?package=libc5

Good luck!

Reply via email to