lkml.org 
[lkml]   [2000]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: compile a kernel...outside Linux
Date
On Tue, 14 Mar 2000, Donald Ian Wilson wrote:

> The question is this: I want to recompile my kernel, optimized for the
> G4 chip. Obviously, GCC isn't going to do this. I'm assumeing there
> must be a way to compile the kernel without being in linux
> itself...how else would the first kernel of each new port be compiled?

With a copy of GCC built for cross-compilation running on a different
architecture (and possibly running something other than Linux, but why?).
Consider Linux for Merced was probably bootstrapped without the help of a
"native" OS as it was originally running on simulators before the chip was
even available.

The kernel can only be built with GCC. Unfortunately, ANSI C is missing a
few things that are critical to making a high-performance kernel, most
importantly inline functions and inline assembly. Linking pragmas are
becoming increasingly important as well. So we're forced to break with
portability between compilers. Not generally a problem, as GCC is very
widely ported.

I'm not much of a PowerPC maven any more, so I don't know what's different
between the "G3" and "G4", but I suspect for kernel code the optimization
possibilities are pretty limited and involve hand-tuning anyway so simply
using another compiler isn't going to buy much.

--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.042 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site