Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#42558 - 19/10/2001 01:30 cross compiling tool chain...
kimbotha
member

Registered: 30/08/2000
Posts: 157
Loc: London, UK
Has anyone managed to get a working kernel built with a gcc 2.9.5 cross-compiler...? It's the only one I can find with a nice set of debs...

Or... does anyone know the location of a nice set of debs for the egcs cross compiler that won't go and stamp over my normal gcc and related files...?

Cheers

Kim


Top
#42559 - 19/10/2001 03:52 Re: cross compiling tool chain... [Re: kimbotha]
borislav
addict

Registered: 30/04/2000
Posts: 420
Loc: Sunnyvale, CA, USA
Has anyone managed to get a working kernel built with a gcc 2.9.5 cross-compiler...? It's the only one I can find with a nice set of debs...

Finding a gcc/binutils combo that would build an empeg kernel is no small feat, even if you're willing to build them from source. The problem is that the empeg kernel is old enough so that new versions of gcc/binutils no longer want to build it, but it still needs some features which older versions of gcc/binutils don't have. I had a lot of trouble finding a combination that works but eventually had success with gcc 2.91.66 and binutils 2.9.5. I think I built both from source, probably from the Redhat 6.2 SRPMs. Building for cross compilation isn't too hard as long as you follow the instructions precisely, and it won't screw up your current setup.

Borislav


Top
#42560 - 19/10/2001 04:01 Re: cross compiling tool chain... [Re: borislav]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
the empeg kernel is old enough so that new versions of gcc/binutils no longer want to build it, but it still needs some features which older versions of gcc/binutils don't have. I had a lot of trouble finding a combination that works but eventually had success with gcc 2.91.66 and binutils 2.9.5.

Um, really? We build it with gcc 2.95.2 (with a patch called const-fold-patch) and binutils 2.9.5.

Incidentally, one heads-up about cross toolchains: if you install arm-empeg-linux-gcc and friends into /usr[/local]/bin, it installs a cpp as /usr[/local]/bin/cpp (not arm-empeg-linux-cpp) which predefines __arm__ instead of whatever your architecture should predefine. Almost nothing will notice the problem, but such a cpp will miscompile X.

Peter



Top
#42561 - 19/10/2001 04:53 Re: cross compiling tool chain... [Re: peter]
borislav
addict

Registered: 30/04/2000
Posts: 420
Loc: Sunnyvale, CA, USA
Um, really? We build it with gcc 2.95.2 (with a patch called const-fold-patch) and binutils 2.9.5.

Hard to argue with a kernel that runs on my empeg right now (it's still virgin, no hacks yet ) but I do remember having trouble with 2.95. I further remember it not being recommended for 2.2 kernels on account of it being to agressive in some cases and doing unexpected things with bad asm code. That might have been x86 assembly, though.

Borislav



Top
#42562 - 19/10/2001 05:06 Re: cross compiling tool chain... [Re: borislav]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
2.95 and 2.95.1 were too aggressive, which is why the aggression in question (-fstrict-aliasing) was turned off by default in 2.95.2.

Judging from the gcc and linux-kernel mailing lists, the problems with x86 assembly were largely due to the fact that nobody knew what the proper syntax was.

Peter



Top
#42563 - 19/10/2001 07:40 Re: cross compiling tool chain... [Re: peter]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
gcc 2.95.2 (with a patch called const-fold-patch) and binutils 2.9.5

Oh no, hang on, that was the car v1.x toolchain. Car 2.x (even its kernel) is built with gcc 2.95.3 (with the arm-010218 patch), binutils 2.10.1, glibc 2.1.3.

I'll look into building an i386-linux cross-compiler tarball...

Peter



Top
#42564 - 19/10/2001 08:09 Re: cross compiling tool chain... [Re: peter]
smu
old hand

Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
Hi Peter.

If you still have the sources and makefiles for those, you might want to have a look at checkinstall at http://freshmeat.net/projects/checkinstall/
It is able to automatically supervise a "make install" or equivalent and create RPMs or DEBs from that (and tarballs as well).

cu,
sven

proud MkII owner (12GB blue/green/smoked, was #080000113 is #090001010)
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord

Top