From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 2 17:12:52 2003 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7126C16A4CE for ; Tue, 2 Dec 2003 17:12:52 -0800 (PST) Received: from liberty.onthenet.com.au (liberty.OntheNet.com.au [203.22.124.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3C2243FE1 for ; Tue, 2 Dec 2003 17:12:50 -0800 (PST) (envelope-from grehan@freebsd.org) Received: from freebsd.org (CPE-30-38.dsl.onthenet.net [203.144.30.38]) hB31CnZG025732; Wed, 3 Dec 2003 11:12:49 +1000 (EST) (envelope-from grehan@freebsd.org) Message-ID: <3FCD388F.1030708@freebsd.org> Date: Wed, 03 Dec 2003 11:12:47 +1000 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030524 X-Accept-Language: en-us, en MIME-Version: 1.0 To: matt@niblet.co.uk References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-ppc@freebsd.org Subject: Re: cross compile? X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2003 01:12:52 -0000 > I have a FreeBSD 5.1 machine here anyway. Knocking up a PPC version > on it for my Pegasos would be a sweet deal. You're all set - FreeBSD already cross-compiles: cd /usr/src make -DNO_WERROR TARGET_ARCH=powerpc buildworld make -DNO_WERROR TARGET_ARCH=powerpc buildkernel I've made two changes that might be required: RCS file: /usr/home/ncvs/src/lib/libc/powerpc/_fpmath.h,v diff -u -r1.2 _fpmath.h --- _fpmath.h 5 Apr 2003 22:10:13 -0000 1.2 +++ _fpmath.h 18 Nov 2003 02:41:36 -0000 @@ -29,14 +29,13 @@ union IEEEl2bits { long double e; struct { - unsigned int sign :1; - unsigned int exp :15; - unsigned long manh :48; - unsigned long manl :64; + unsigned int sign :1; + unsigned int exp :15; + unsigned long long manh :48; + unsigned long long manl :64; } bits; }; -/* XXX does powerpc have a normalization bit? */ #define mask_nbit_l(u) ((void)0) #define LDBL_IMPLICIT_NBIT RCS file: /usr/home/ncvs/src/sys/conf/kern.mk,v retrieving revision 1.37 diff -u -r1.37 kern.mk --- kern.mk 4 Nov 2003 23:29:17 -0000 1.37 +++ kern.mk 18 Nov 2003 03:42:58 -0000 @@ -68,6 +68,14 @@ .endif # +# For powerpc disable kernel floating point +# +.if ${MACHINE_ARCH} == "powerpc" +CFLAGS+= -msoft-float +INLINE_LIMIT?= 15000 +.endif + +# # GCC 3.0 and above like to do certain optimizations based on the # assumption that the program is linked against libc. Stop this. #