cross compiling tool chain...

Posted by: kimbotha

cross compiling tool chain... - 19/10/2001 01:30

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

Posted by: borislav

Re: cross compiling tool chain... - 19/10/2001 03:52

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

Posted by: peter

Re: cross compiling tool chain... - 19/10/2001 04:01

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


Posted by: borislav

Re: cross compiling tool chain... - 19/10/2001 04:53

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


Posted by: peter

Re: cross compiling tool chain... - 19/10/2001 05:06

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


Posted by: peter

Re: cross compiling tool chain... - 19/10/2001 07:40

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


Posted by: smu

Re: cross compiling tool chain... - 19/10/2001 08:09

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)