Changes to PPC Linux required for GCC 3.1

Corey Minyard minyard at acm.org
Wed Dec 5 03:13:44 EST 2001


I've been working on getting Linux PPC running on GCC 3.1, and I'm
sending it from my Mac whose operating system was just compiled with a
current GCC 3.1 tree (Hurray!)

I've had to patch the kernel a little, there were a few violations and
some problems with interactions with optimizations.  I had to do the
following:

* In include/asm-ppc/prom.h, the calculations for the relocations were
offseting a large constant with a string.  This results in bogus
optimizations in GCC, and a comment in GCC seems to say that you
shouldn't do this.  I've fixed it by calling a function to do the
calculation.  I've posted something on the GCC newsgroup about this,
too, we'll see what they say.

* In drivers/video/aty/atyfb_base.c, there were some "const __init"
declarations, which are not allowed.

* In include/linux/sunrpc/clnt.h, I removed a bogus function declaration
which was messing up inlining.

The patch is attached, but you will need some GCC patches that are still
not in the tree to actually compile it with 3.1.

-Corey

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcc3-1.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20011204/2d629a12/attachment.asc>


More information about the Linuxppc-dev mailing list