libgcc2.c, libgcc2.h: Restore __eprintf.
authorZack Weinberg <zackw@stanford.edu>
Mon, 14 May 2001 02:46:22 +0000 (02:46 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Mon, 14 May 2001 02:46:22 +0000 (02:46 +0000)
* libgcc2.c, libgcc2.h: Restore __eprintf.  Label as used for
binary backward compat only.
* Makefile.in (LIB2FUNCS_ST): New.  Put _eprintf here, not
in LIB2FUNCS.  Pass it to mklibgcc.
* mklibgcc.in: Handle LIB2FUNCS_ST.

* Makefile.in (installdirs): Don't create $(gcc_tooldir).

From-SVN: r42057

gcc/ChangeLog
gcc/Makefile.in
gcc/libgcc2.c
gcc/libgcc2.h
gcc/mklibgcc.in

index 22f729ffa1ebc3625fbf4ed59bd80dfa1a4b7097..205893e3f148c739d90606391817fd99d13432f1 100644 (file)
@@ -1,3 +1,13 @@
+2001-05-13  Zack Weinberg  <zackw@stanford.edu>
+
+       * libgcc2.c, libgcc2.h: Restore __eprintf.  Label as used for
+       binary backward compat only.
+       * Makefile.in (LIB2FUNCS_ST): New.  Put _eprintf here, not
+       in LIB2FUNCS.  Pass it to mklibgcc.
+       * mklibgcc.in: Handle LIB2FUNCS_ST.
+
+       * Makefile.in (installdirs): Don't create $(gcc_tooldir).
+
 2001-05-13  Alexandre Oliva  <aoliva@redhat.com>
 
        * tm.texi (THREAD_MODEL_SPEC): Document it.
index e7637f867d6ddb403575faf520ae322a6087f60b..3e141398fc31a4cba6b26c2dcfdec6eecb7c9a41 100644 (file)
@@ -792,12 +792,14 @@ LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
     _fixtfdi _fixunstfdi _floatditf \
-    __gcc_bcmp _eprintf \
-    _bb _clear_cache _trampoline __main _exit \
+    __gcc_bcmp _bb _clear_cache _trampoline __main _exit \
     _absvsi2 _absvdi2 _addvsi3 _addvdi3 _subvsi3 _subvdi3 \
     _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 \
     _ctors
 
+# Defined in libgcc2.c, included only in the static library.
+LIB2FUNCS_ST = _eprintf
+
 FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
     _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
     _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
@@ -1046,6 +1048,7 @@ libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext
        LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \
        LIB1FUNCS_EXTRA='$(LIB1FUNCS_EXTRA)' \
        LIB2FUNCS='$(LIB2FUNCS)' \
+       LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \
        LIB2ADD='$(LIB2ADD)' \
        LIB2ADD_ST='$(LIB2ADD_ST)' \
        LIB2ADDEH='$(LIB2ADDEH)' \
@@ -2507,7 +2510,6 @@ installdirs:
        done
        -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
        -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
-       -if [ -d $(gcc_tooldir) ] ; then true ; else mkdir $(gcc_tooldir) ; chmod a+rx $(gcc_tooldir) ; fi
        -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
        -if [ -d $(slibdir) ] ; then true ; else mkdir $(slibdir) ; chmod a+rx $(slibdir) ; fi
 # We don't use mkdir -p to create the parents of man1dir,
index b0daa70d9e1507af35dd6c919fadb417b97129ec..177931df4c9c8cbf3403dc02c92becc377c7ff78 100644 (file)
@@ -1237,6 +1237,28 @@ __gcc_bcmp (const unsigned char *s1, const unsigned char *s2, size_t size)
   return 0;
 }
 
+#endif
+\f
+/* __eprintf used to be used by GCC's private version of <assert.h>.
+   We no longer provide that header, but this routine remains in libgcc.a
+   for binary backward compatibility.  Note that it is not included in
+   the shared version of libgcc.  */
+#ifdef L_eprintf
+#ifndef inhibit_libc
+
+#undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch.  */
+#include <stdio.h>
+
+void
+__eprintf (const char *string, const char *expression,
+          unsigned int line, const char *filename)
+{
+  fprintf (stderr, string, expression, line, filename);
+  fflush (stderr);
+  abort ();
+}
+
+#endif
 #endif
 
 #ifdef L_bb
index ce85398769738cacb2e5078f49482f4c369c242d..693c2f78bb63ced2836cac9162e93e30b9100e81 100644 (file)
@@ -24,6 +24,8 @@ Boston, MA 02111-1307, USA.  */
 
 extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t);
 extern void __clear_cache (char *, char *);
+extern void __eprintf (const char *, const char *, unsigned int, const char *)
+  __attribute__ ((__noreturn__));
 
 struct bb;
 extern void __bb_exit_func (void);
index 6034867136fe874c4e9e2b7a3f70bee6f9a89007..4ec3af6560f7adb1ed73b88b47754283f5d5ce6a 100644 (file)
@@ -14,6 +14,7 @@
 # LIB1ASMFUNCS
 # LIB1FUNCS_EXTRA
 # LIB2FUNCS
+# LIB2FUNCS_ST
 # LIB2ADD
 # LIB2ADD_ST 
 # LIB2ADDEH
@@ -168,6 +169,7 @@ esac
 #
 
 libgcc2_objs=""
+libgcc2_st_objs=""
 
 for name in $LIB2FUNCS; do
   for ml in $MULTILIBS; do
@@ -182,6 +184,19 @@ for name in $LIB2FUNCS; do
   libgcc2_objs="$libgcc2_objs ${name}${objext}"
 done
 
+for name in $LIB2FUNCS_ST; do
+  for ml in $MULTILIBS; do
+    dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
+    flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
+    out="libgcc/${dir}/${name}${objext}"
+
+    echo $out: $libgcc2_c_dep
+    echo "     $gcc_compile" '$(MAYBE_USE_COLLECT2)' $flags -DL$name \
+      -c '$(srcdir)/libgcc2.c' -o $out
+  done
+  libgcc2_st_objs="$libgcc2_st_objs ${name}${objext}"
+done
+
 if [ "$FPBIT" ]; then
   for name in $FPBIT_FUNCS; do
     for ml in $MULTILIBS; do
@@ -248,8 +263,6 @@ for file in $LIB2ADDEH; do
   libgcc2_objs="$libgcc2_objs ${oname}${objext}"
 done
 
-libgcc2_st_objs=""
-
 for file in $LIB2ADD_ST; do
   name=`echo $file | sed -e 's/[.][cSo]$//' -e 's/[.]asm$//' -e 's/[.]txt$//'`
   oname=`echo $name | sed -e 's,.*/,,'`