Skip to contentSkip to conversation

Fix compiler/assembler flags for Ebony platform boot files

PATCH David Gibson 4 participants 5 messages May 25, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

The recent addition of assembler flags for 44x.c and ebony.c in the bootwrapper to make them compile on certain toolchains was not correct and could break other platforms. This patch switches to using a compiler flag instead, which implies the appropriate assembler flag, and also stops the compiler itself generating instructions which are invalid for the platform in question.

arch/powerpc/boot/Makefile +2 -2
Index: working-2.6/arch/powerpc/boot/Makefile
===================================================================
@@ -33,8 +33,8 @@ endif
 
 BOOTCFLAGS	+= -I$(obj) -I$(srctree)/$(obj)
 
-$(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke
-$(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke
+$(obj)/44x.o: BOOTCFLAGS += -mcpu=440
+$(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
 
 zlib       := inffast.c inflate.c inftrees.c
 zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#1 lore raw
Quoted 8 lines

The recent addition of assembler flags for 44x.c and ebony.c in the bootwrapper to make them compile on certain toolchains was not correct and could break other platforms. This patch switches to using a compiler flag instead, which implies the appropriate assembler flag, and also stops the compiler itself generating instructions which are invalid for the platform in question.

#2 lore raw
In reply to David Gibson
Quoted 6 lines · David Gibson

The recent addition of assembler flags for 44x.c and ebony.c in the bootwrapper to make them compile on certain toolchains was not correct and could break other platforms. This patch switches to using a compiler flag instead, which implies the appropriate assembler flag, and also stops the compiler itself generating instructions which are invalid for the platform in question.

This looks good to me, but I don't have one of the failing toolchains. Dave, can you test this patch out?

josh

#3 lore raw
Quoted 2 lines

This looks good to me, but I don't have one of the failing toolchains. Dave, can you test this patch out?

You can test by using make CC="gcc -mcpu=e500" ...

Segher

#4 lore raw
In reply to Josh Boyer
Quoted 8 lines · Josh Boyer
Quoted 6 lines · David Gibson

The recent addition of assembler flags for 44x.c and ebony.c in the bootwrapper to make them compile on certain toolchains was not correct and could break other platforms. This patch switches to using a compiler flag instead, which implies the appropriate assembler flag, and also stops the compiler itself generating instructions which are invalid for the platform in question.

Quoted 5 lines

This looks good to me, but I don't have one of the failing toolchains. Dave, can you test this patch out?

josh

Built ok for me after the patch.