From d5fdb6fc509b9ab145a36599f383935f27cc43d3 Mon Sep 17 00:00:00 2001 From: rth Date: Wed, 3 Apr 2002 00:12:59 +0000 Subject: [PATCH] * doc/standards.texi: Document required freestanding libc entry points. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51768 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/doc/standards.texi | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f73f7d..5caab19 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-04-02 Richard Henderson + + * doc/standards.texi: Document required freestanding libc entry points. + 2002-04-02 Alan Modra * config/rs6000/rs6000.md (ctrdi*): Add FPR constraint and diff --git a/gcc/doc/standards.texi b/gcc/doc/standards.texi index 4e9720c..56f6151 100644 --- a/gcc/doc/standards.texi +++ b/gcc/doc/standards.texi @@ -132,10 +132,10 @@ the semantics defined in the standard. To make it act as a conforming freestanding implementation for a freestanding environment, use the option @option{-ffreestanding}; it will then define @code{__STDC_HOSTED__} to @code{0} and not make assumptions about the -meanings of function names from the standard library. To build an OS -kernel, you may well still need to make your own arrangements for -linking and startup. @xref{C Dialect Options,,Options Controlling C -Dialect}. +meanings of function names from the standard library, with exceptions +noted below. To build an OS kernel, you may well still need to make +your own arrangements for linking and startup. +@xref{C Dialect Options,,Options Controlling C Dialect}. GCC does not provide the library facilities required only of hosted implementations, nor yet all the facilities required by C99 of @@ -143,6 +143,16 @@ freestanding implementations; to use the facilities of a hosted environment, you will need to find them elsewhere (for example, in the GNU C library). @xref{Standard Libraries,,Standard Libraries}. +Most of the compiler support routines used by GCC are present in +@file{libgcc}, but there are a few exceptions. GCC requires the +freestanding environment provide @code{memcpy}, @code{memmove}, +@code{memset} and @code{memcmp}. Some older ports of GCC are +configured to use the BSD @code{bcopy}, @code{bzero} and @code{bcmp} +functions instead, but this is deprecated for new ports. +Finally, if @code{__builtin_trap} is used, and the target does +not implement the @code{trap} pattern, then GCC will emit a call +to @code{abort}. + For references to Technical Corrigenda, Rationale documents and information concerning the history of C that is available online, see @uref{http://gcc.gnu.org/readings.html} -- 2.7.4