Index: share/mk/bsd.cpu.mk =================================================================== --- share/mk/bsd.cpu.mk (revision 186036) +++ share/mk/bsd.cpu.mk (working copy) @@ -76,6 +76,8 @@ _CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 . elif ${CPUTYPE} == "k5" _CPUCFLAGS = -march=pentium +. elif ${CPUTYPE} == "i486-softfloat" +_CPUCFLAGS = -march=i486 -msoft-float . else _CPUCFLAGS = -march=${CPUTYPE} . endif # GCC on 'i386' @@ -173,7 +175,7 @@ MACHINE_CPU = mmx i586 i486 i386 . elif ${CPUTYPE} == "pentium" MACHINE_CPU = i586 i486 i386 -. elif ${CPUTYPE} == "i486" +. elif ${CPUTYPE} == "i486" || ${CPUTYPE} == "i486-softfloat" MACHINE_CPU = i486 i386 . elif ${CPUTYPE} == "i386" MACHINE_CPU = i386 Index: lib/msun/Makefile =================================================================== --- lib/msun/Makefile (revision 186036) +++ lib/msun/Makefile (working copy) @@ -13,7 +13,11 @@ # .if ${MACHINE_ARCH} == "i386" +. if ${CPUTYPE} != "i486-softfloat" ARCH_SUBDIR= i387 +. else +ARCH_SUBDIR= i486-softfloat +. endif .else ARCH_SUBDIR= ${MACHINE_ARCH} .endif Index: lib/libc/Makefile =================================================================== --- lib/libc/Makefile (revision 186036) +++ lib/libc/Makefile (working copy) @@ -66,6 +66,11 @@ .if ${MACHINE_ARCH} == "arm" .include "${.CURDIR}/softfloat/Makefile.inc" .endif +.if ${MACHINE_ARCH} == "i386" +. if ${CPUTYPE} == "i486-softfloat" +.include "${.CURDIR}/softfloat/Makefile.inc" +. endif +.endif .if ${MK_NIS} != "no" CFLAGS+= -DYP .include "${.CURDIR}/yp/Makefile.inc" Index: lib/libc/i386/Symbol.map =================================================================== --- lib/libc/i386/Symbol.map (revision 186036) +++ lib/libc/i386/Symbol.map (working copy) @@ -68,4 +68,22 @@ _brk; .curbrk; .minbrk; + + /* softfloat */ + __addsf3; + __adddf3; + __subsf3; + __subdf3; + __mulsf3; + __muldf3; + __divsf3; + __divdf3; + __floatsisf; + __floatsidf; + __fixsfsi; + __fixdfsi; + __fixunssfsi; + __fixunsdfsi; + __extendsfdf2; + __truncdfsf2; }; Index: lib/libc/i386/Makefile.inc =================================================================== --- lib/libc/i386/Makefile.inc (revision 186036) +++ lib/libc/i386/Makefile.inc (working copy) @@ -1,6 +1,21 @@ # $FreeBSD$ +.if ${CPUTYPE} != "i486-softfloat" # Long double is 80 bits GDTOASRCS+=strtorx.c MDSRCS+=machdep_ldisx.c +.else +# Long double is just double precision. +#SOFTFLOAT_BITS=64 +#CFLAGS+=-DSOFTFLOAT +#GDTOASRCS+=strtorx.c +#MDSRCS+=machdep_ldisx.c + +# XXX +SOFTFLOAT_BITS=32 +CFLAGS+=-DSOFTFLOAT +MDSRCS+=machdep_ldisd.c + +.endif + SYM_MAPS+=${.CURDIR}/i386/Symbol.map Index: lib/libc/i386/gen/Makefile.inc =================================================================== --- lib/libc/i386/gen/Makefile.inc (revision 186036) +++ lib/libc/i386/gen/Makefile.inc (working copy) @@ -1,6 +1,8 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # $FreeBSD$ -SRCS+= _ctx_start.S _setjmp.S _set_tp.c fabs.S \ - flt_rounds.c infinity.c ldexp.c makecontext.c modf.S \ +SRCS+= _ctx_start.S _setjmp.S _set_tp.c makecontext.c \ rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S +.if ${CPUTYPE} != "i486-softfloat" +SRCS+= fabs.S modf.S flt_rounds.c infinity.c ldexp.c +.endif