Subject: Re: soft-float builds
To: None <tech-toolchain@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: port-powerpc
Date: 06/02/2001 02:20:06
Below are the changes that I'm proposing to enable soft-float builds.

There's still the ABI change issues and what effect it has on
MACHINE_ARCH.  I'm currently chasing up some ELF folks to see if we
can get identification at the ELF header level of soft-float vs.
normal-float binaries.  This was we can use emulations to dynamically
link the correct libraries, etc.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/

Index: lib/libc/arch/powerpc/Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/arch/powerpc/Makefile.inc,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.inc
--- lib/libc/arch/powerpc/Makefile.inc	1999/04/17 21:16:45	1.2
+++ lib/libc/arch/powerpc/Makefile.inc	2001/06/01 16:15:36
@@ -2,3 +2,8 @@
 
 KMINCLUDES=
 KMSRCS=
+
+.if (${MKSOFTFLOAT} != "no")
+CPPFLAGS+= -DSOFTFLOAT_NEED_FIXUNS
+.include <softfloat/Makefile.inc>
+.endif
Index: share/mk/bsd.README
===================================================================
RCS file: /cvsroot/sharesrc/share/mk/bsd.README,v
retrieving revision 1.77
diff -u -p -r1.77 bsd.README
--- share/mk/bsd.README	2001/05/31 05:04:41	1.77
+++ share/mk/bsd.README	2001/06/01 16:15:36
@@ -291,6 +291,10 @@ OBJECT_FMT	Object file format. [set to "
 		"i386" and some m68k machines, or set to "a.out" on
 		other architectures].
 
+MKSOFTFLOAT	If "yes", build with options to enable the compiler to
+		generate output containing library calls for floating
+		point and possibly soft-float library support.  Defaults
+		to "no".
 
 bsd.own.mk is generally useful when building your own Makefiles so that
 they use the same default owners etc. as the rest of the tree.
Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvsroot/sharesrc/share/mk/bsd.own.mk,v
retrieving revision 1.159
diff -u -p -r1.159 bsd.own.mk
--- share/mk/bsd.own.mk	2001/05/12 22:38:04	1.159
+++ share/mk/bsd.own.mk	2001/06/01 16:15:36
@@ -296,4 +296,6 @@ MKKERBEROS=no
 MKKERBEROS?=yes
 .endif
 
+MKSOFTFLOAT?=no
+
 .endif		# _BSD_OWN_MK_
Index: share/mk/bsd.sys.mk
===================================================================
RCS file: /cvsroot/sharesrc/share/mk/bsd.sys.mk,v
retrieving revision 1.46
diff -u -p -r1.46 bsd.sys.mk
--- share/mk/bsd.sys.mk	2000/12/30 04:11:34	1.46
+++ share/mk/bsd.sys.mk	2001/06/01 16:15:37
@@ -35,6 +35,11 @@ LINTFLAGS+= -d ${DESTDIR}/usr/include
 CPPFLAGS+= -D__AUDIT__
 .endif
 
+.if (${MKSOFTFLOAT} != "no")
+COPTS+=		-msoft-float
+FOPTS+=		-msoft-float
+.endif
+
 # Helpers for cross-compiling
 HOST_CC?=	cc
 HOST_CFLAGS?=	-O