This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Re: powerpc-linux cross-compiler, limits.h
- To: crossgcc@cygnus.com
- Subject: Re: powerpc-linux cross-compiler, limits.h
- From: "Kai Ruottu" <karuottu@freenet.hut.fi>
- Date: Thu, 27 May 1999 11:17:05 +0000
- CC: brendan@dgs.monash.edu.au
- Organization: Freenet Finland
- Reply-To: crossgcc@cygnus.com
Brendan Simon wrote:
> Trying to build a powerpc-linux cross-compiler for and embedded MPC860
> target. Build machine is a RedHat 5.2 box with egcs-1.1.2 installed.
It makes no difference to the devtools if your target is embedded or not.
The generated user programs will run under Linux, not using some specific HW...
When you tailor your kernel to the HW and write device drivers, these things
aren't 'Linux-programs' any more, but you can use the Linux/PPC toolset for
this job too...
> Is it possible to build a powerpc-linux cross-compiler without
> preinstalling things ?
Not recommemded, taking the prebuilt libs for Linux/PPC is higly recommended.
(You can try to rebuild glibc-2.x later...)
Please look at:
www.yellowdoglinux.com
for a Linux/PPC release, and
ftp://rpmfind.net/linux/yellowdog/champion-1.0/ppc/RedHat/RPMS/
for the
glibc-2.1-1a.ppc.rpm (the runtime shared libs, needed too)
and
glibc-devel-2.1-1a.ppc.rpm (the development headers and libs)
pre-built glibc-2.1 distribution files for Linux/PPC.
> ie. MUST I copy /usr/include files to /usr/local/egcs/powerpc-linux/include
> and MUST I copy libraries from another powerpc host ?
No, ftp'ing the stuff (8.5 M + 8.5 M !!!), and using 'rpm2cpio' + 'cpio' to
extract the stuff into a temporary dir and its subdirs :
$ rpm2cpio glibc-2.1-1a.ppc.rpm > glibc-2.1-1a.ppc.cpio
$ rpm2cpio glibc-devel-2.1-1a.ppc.rpm > glibc-devel-2.1-1a.ppc.cpio
$ cpio -iBdmv < glibc-2.1-1a.ppc.cpio
$ cpio -iBdmv < glibc-devel-2.1-1a.ppc.cpio
After copying all the 'lib/...' stuff into 'usr/lib' and fixing the symlinks
in 'usr/lib' (those pointing to '../../lib') to point to the files in the same
directory, all preparing is done, and you can move the stuff from 'usr/lib' and
'usr/include' into the final '/usr/local/egcs/powerpc-linux/...' directories.
Probably you must fix the '-dynamic-linker /usr/lib/ld.so.1' in 'specs' to be:
'-dynamic-linker /usr/local/egcs/powerpc-linux/lib/ld.so.1', to get the linking
to succeed...
Anyway, your case should be at first just a 'normal' Linux/x86-to-Linux/xyz
cross-compiler build... (I remember people doing cross-tools to Linux/Sparc and
Linux/m68k and succeding with them, but none doing to Linux/PPC yet, so perhaps
there are still some unmentioned extra things to do...
A Linux/x86-to-Linux/MIPS, which I tried recently, and even got it built,
seems to need some thinking -- the latest egcs-snapshots have some kind of
preliminary support, but old 2.7.2 patches for this target include much more...
Regards, Kai
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.