Subject: Proposed fix for PR#9294
To: None <port-m68k@netbsd.org>
From: None <Havard.Eidnes@runit.sintef.no>
List: tech-toolchain
Date: 02/04/2000 21:38:51
----Next_Part(Fri_Feb__4_21:37:18_2000_950)--
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,

I've been looking at PR#9294.  On hp300 the utils/x_ftp doesn't
link due to missing floating point emulation routines; it's being
compiled -msoft-float (it's not in -current, though).

This prevents the miniroot from building, and is sort of a show-
stopper for 1.4.2.

After fumbling around a bit and getting some hints from other
developers, it appears that the undefined functions are present
in an assembly file in the gcc distribution, but it's not being
compiled.  I think the missing functions should go into libgcc,
and the attached patch compiles all the functions in the
lb1sf68.asm file into libgcc.a on m68k platforms.  With it in
place, distrib/utils/x_ftp compiles and works on the netbsd-1-4
branch.

Does this look sane?

Sorry, I've still not been able to find out how this worked in
1.4.1, or what changed to make this problem crop up.  Hints on
this would be appreciated too.

Regards,

- H=E5vard

----Next_Part(Fri_Feb__4_21:37:18_2000_950)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Index: Makefile
===================================================================
RCS file: /cvsroot/gnusrc/gnu/lib/libgcc/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile	1999/02/24 17:18:26	1.8
+++ Makefile	2000/02/04 20:32:12
@@ -25,6 +25,24 @@
     (${MACHINE_ARCH} == "sparc64")
 LIB2OBJS+=	_fixxfdi.o _fixunsxfdi.o _floatdixf.o _fixunsxfsi.o
 .endif
+
+.if (${MACHINE_ARCH} == "m68k")
+LIBFOBJS= L_floatex.o L_mulsi3.o L_udivsi3.o L_divsi3.o L_umodsi3.o \
+	L_modsi3.o L_double.o L_float.o L_eqdf2.o L_nedf2.o L_gtdf2.o \
+	L_gedf2.o L_ltdf2.o L_ledf2.o L_eqsf2.o L_nesf2.o L_gtsf2.o \
+	L_gesf2.o L_ltsf2.o L_lesf2.o
+LIB2OBJS+=	${LIBFOBJS}
+
+lb1sf68.S: ${.CURDIR}/../../dist/gcc/config/m68k/lb1sf68.asm
+	rm -f lb1sf68.S
+	cp $? lb1sf68.S
+
+CLEANFILES+= lb1sf68.S
+
+${LIBFOBJS}: lb1sf68.S
+	${CC} ${AFLAGS} ${CPPFLAGS} -c -o $@ -D${.TARGET:S/.o//} lb1sf68.S
+.endif
+
 OBJS+=		${LIB2OBJS}
 
 # Extra code to include in libgcc2 for C++ support.

----Next_Part(Fri_Feb__4_21:37:18_2000_950)----