This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
New target macro DECLARE_LIBRARY_RENAMES
- From: Bernd Schmidt <bernds at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jul 2002 23:38:43 +0100 (BST)
- Subject: New target macro DECLARE_LIBRARY_RENAMES
Here's another patch that I need for a new port. It adds a new macro
DECLARE_LIBRARY_RENAMES, which is expanded at the start of libgcc2.c
and fp-bit.c. It's used to provide alternate spellings of all the
library functions if the ABI requires we provide other names.
This patch was written by Michael Meissner. Bootstrapped on i686-linux.
Bernd
* libgcc2.c: Expand macro DECLARE_LIBRARY_RENAMES if it is defined.
* config/fp-bit.c: Likewise.
* doc/tm.texi: Document it.
Index: libgcc2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/libgcc2.c,v
retrieving revision 1.144
diff -c -p -r1.144 libgcc2.c
*** libgcc2.c 22 Jul 2002 00:15:49 -0000 1.144
--- libgcc2.c 30 Jul 2002 22:17:21 -0000
*************** Software Foundation, 59 Temple Place - S
*** 43,48 ****
--- 43,52 ----
#include "libgcc2.h"
+ #ifdef DECLARE_LIBRARY_RENAMES
+ DECLARE_LIBRARY_RENAMES
+ #endif
+
#if defined (L_negdi2)
DWtype
__negdi2 (DWtype u)
Index: config/fp-bit.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/fp-bit.c,v
retrieving revision 1.31
diff -c -p -r1.31 fp-bit.c
*** config/fp-bit.c 19 Jun 2002 00:51:03 -0000 1.31
--- config/fp-bit.c 30 Jul 2002 22:17:21 -0000
*************** Boston, MA 02111-1307, USA. */
*** 74,79 ****
--- 74,83 ----
are referenced from within libc, since libgcc goes before and after the
system library. */
+ #ifdef DECLARE_LIBRARY_RENAMES
+ DECLARE_LIBRARY_RENAMES
+ #endif
+
#ifdef EXTENDED_FLOAT_STUBS
__truncxfsf2 (){ abort(); }
__extendsfxf2 (){ abort(); }
Index: doc/tm.texi
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/doc/tm.texi,v
retrieving revision 1.27
diff -c -p -r1.27 tm.texi
*** tm.texi 2002/05/19 22:52:28 1.27
--- tm.texi 2002/07/30 22:28:24
*************** remainder in division of one unsigned fu
*** 4618,4623 ****
--- 4618,4630 ----
not define this macro, the default name is used, which is
@code{__umoddi3}, a function defined in @file{libgcc.a}.
+ @findex DECLARE_LIBRARY_RENAMES
+ @item DECLARE_LIBRARY_RENAMES
+ This macro, if defined, should expand to a piece of C code that will get
+ expanded when compiling functions for libgcc.a. It can be used to
+ provide alternate names for gcc's internal library functions if there
+ are ABI-mandated names that the compiler should provide.
+
@findex INIT_TARGET_OPTABS
@item INIT_TARGET_OPTABS
Define this macro as a C statement that declares additional library