Prefer LIB1ASMFUNCS over LIB2FUNCS when generating libgcc.a

Herman ten Brugge Haj.Ten.Brugge@net.HCC.nl
Mon Jun 5 09:00:00 GMT 2000


Hello,

Some time ago a patch to the Makefile.in was aproved to prefer 
LIB1ASMFUNCS over LIB2FUNCS when generating libgcc.a. Now that the code
to generate libgcc.a is moved into mklibgcc.in this patch is lost.
The patch below fixes this.
We need this for the c4x target. The asm functions are faster then
the ones in libgcc2.c.

	Herman.


2000-06-01 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>

	* mklibgcc.in: Prefer LIB1ASMFUNCS over LIB2FUNCS when generating
	libgcc.a.

--- mklibgcc.in.org	Wed May 31 23:07:31 2000
+++ mklibgcc.in	Thu Jun  1 08:02:23 2000
@@ -100,6 +100,12 @@ case X"$LIBGCC1" in
         echo ${out}: ${libgccdir} '$(srcdir)/config/$(LIB1ASMSRC)'
 	echo "	$gcc_compile" $flags -DL$name -xassembler-with-cpp \
 	  -c '$(srcdir)/config/$(LIB1ASMSRC)' -o $out
+
+	# Remove any objects from LIB2FUNCS that are defined as optimized
+	# assembly code in LIB1ASMFUNCS.
+	LIB2FUNCS=`echo $LIB2FUNCS | sed -e 's/^'$name' //' \
+				         -e 's/ '$name' //' \
+					 -e 's/ '$name'$//'`
       done
       libgcc1_objs="$libgcc1_objs ${name}${objext}"
     done




More information about the Gcc-patches mailing list