[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compile quirk linux-2.6.24 (with workaround)



On Tue, 5 Feb 2008 09:38:20 -0600
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:

> On Tue, 5 Feb 2008 08:24:38 -0700
> "Grant Likely" <grant.likely@secretlab.ca> wrote:
> 
> > On 2/5/08, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> > > > I mean, if you have not included 4xx support in the kernel, as is the
> > > > case here, it does not make sense to add the 4xx bootwrapper code, no ?
> > >
> > > It does, in a manner.  There are both generic and platform specific
> > > pieces to the bootwrapper.  Having everything always built helps keep
> > > the generic bits from breaking, which is important as they're often
> > > tightly coupled.  That's at least the reason I can think of.
> > >
> > > The powerpc maintainers have been over this quite a bit and I don't see
> > > it changing anytime soon.
> > 
> > That would mean we're dropping support for compilers which can't build
> > 405/440 specific wrapper bits (or other core specific quirks that need
> > to go in the wrapper)  That doesn't sound appropriate to me.
> 
> No it doesn't.  At least not yet.  I said I'd try to come up with a
> patch soon-ish.  We haven't failed!(yet)  Also, this isn't a
> core-specific quirk. It's an architected instruction of Book III-E in
> the PowerPC ISA.  I can't help it if other chips don't implement this
> wonderful control mechanism ;)
> 
> Taking a step back though, there will always be odd cases like this as
> we move forward.  Toolchain XXX will eventually not support instruction
> YYYY which will eventually be used, etc.  I'll try to make this
> specific case work because it's scope is quite limited.  But this
> problem as a whole will still remain.

My apologies for taking so long on this.  Digging through gcc history
isn't exactly fun :)

Ok, so it seems -mcpu=440 was added in gcc 3.4.  The -mcpu=405 option
has been around since 2001.  Seeing as how there really isn't anything
440 specific in the files effected, we should be able to pass -mcpu=405
for everything and have it still work.

Bernhard, can you try the patch below?  I've compile test it, and
booted it on an Ebony board (PowerPC 440GP).  If anyone else cares to
test that would also be welcome.

josh

[POWERPC] Fix bootwrapper builds with older gcc versions

GCC versions before 3.4 did not support the -mcpu=440 option.  Use
-mcpu=405 for the 4xx specific bootwrapper files, as that has been
around for much longer.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 63d07cc..e3993a6 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -35,10 +35,10 @@ endif
 
 BOOTCFLAGS     += -I$(obj) -I$(srctree)/$(obj) -I$(srctree)/$(src)/libfdt
 
-$(obj)/4xx.o: BOOTCFLAGS += -mcpu=440
-$(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
-$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
-$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
+$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
+$(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
+$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
+$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405


Reply to: