Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Dec 2003 11:12:47 +1000
From:      Peter Grehan <grehan@freebsd.org>
To:        matt@niblet.co.uk
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: cross compile?
Message-ID:  <3FCD388F.1030708@freebsd.org>
In-Reply-To: <EKENLNBIDBAHKIELDLPNIELGCAAA.matt@kittycat.co.uk>
References:  <EKENLNBIDBAHKIELDLPNIELGCAAA.matt@kittycat.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.
  #



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FCD388F.1030708>