From 16b89d7cd4224f6f7ffce5a9593a2b699b2e10d5 Mon Sep 17 00:00:00 2001 From: Pieter van den Abeele Date: Fri, 7 May 2004 04:24:48 +0000 Subject: [PATCH] PPC64 host building PPC32 stuff git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@364 d1e1f19c-881f-0410-ab34-b69fee027534 --- arch/ppc.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/arch/ppc.py b/arch/ppc.py index 649b70cc..8f2b832a 100644 --- a/arch/ppc.py +++ b/arch/ppc.py @@ -1,56 +1,67 @@ # Distributed under the GNU General Public License version 2 -# Copyright 2003-2004 Gentoo Technologies, Inc. +# Copyright 2003-2004 Gentoo Technologies, Inc. && Pieter Van den Abeele -import builder +import os,builder +from catalyst_support import * + +# gcc-3.3.3 required to do G5 optimizations +# install a 32bit kernel personality changer (that works) before building on a ppc64 host +# new gcc optimization feature requires -fno-strict-aliasing needed, otherwise code complains +# use the experimental thing for nptl builds class generic_ppc(builder.generic): "abstract base class for all ppc builders" def __init__(self,myspec): builder.generic.__init__(self,myspec) self.settings["mainarch"]="ppc" - self.settings["CHROOT"]="chroot" self.settings["CHOST"]="powerpc-unknown-linux-gnu" + if self.settings["hostarch"]=="ppc64": + if not os.path.exists("/usr/bin/powerpc32"): + raise CatalystError,"required /usr/bin/setarch executable not found." + self.settings["CHROOT"]="/usr/bin/powerpc32 chroot" + else: + self.settings["CHROOT"]="chroot" class arch_power_ppc(generic_ppc): "builder class for generic powerpc/power" def __init__(self,myspec): generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O3 -mcpu=common -fno-strict-aliasing" + self.settings["CFLAGS"]="-O3 -mcpu=common" class arch_ppc(generic_ppc): "builder class for generic powerpc" def __init__(self,myspec): generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O3 -mcpu=powerpc -fno-strict-aliasing" + self.settings["CFLAGS"]="-O3 -mcpu=powerpc" class arch_power(generic_ppc): "builder class for generic power" def __init__(self,myspec): generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O3 -mcpu=power -fno-strict-aliasing" + self.settings["CFLAGS"]="-O3 -mcpu=power" class arch_g3(generic_ppc): def __init__(self,myspec): generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=G3 -fno-strict-aliasing" + self.settings["CFLAGS"]="-O3 -mcpu=G3 -fno-strict-aliasing -pipe" class arch_g4(generic_ppc): def __init__(self,myspec): generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=G4 -maltivec -mabi=altivec -fno-strict-aliasing" + self.settings["CFLAGS"]="-O3 -mcpu=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" self.settings["HOSTUSE"]=["altivec"] class arch_g5(generic_ppc): def __init__(self,myspec): generic_ppc.__init__(self,myspec) - self.settings["CFLAGS"]="-O2 -mcpu=G5 -maltivec -mabi=altivec -fno-strict-aliasing" + self.settings["CFLAGS"]="-O2 -mcpu=G5 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" self.settings["HOSTUSE"]=["altivec"] class arch_experimental(generic_ppc): def __init__(self,myspec): generic_ppc.__init__(self,myspec) self.settings["CFLAGS"]="-O3 -mcpu=7450 -maltivec -mabi=altivec -fno-strict-aliasing" - self.settings["HOSTUSE"]=["altivec nptl"] + self.settings["HOSTUSE"]=["altivec"] def register(foo): "Inform main catalyst program of the contents of this plugin." -- 2.26.2