<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.3">
</HEAD>
<BODY>
When you build gcc, you could tell gcc whether you have a c library, when you tell gcc you do not have<BR>
a c library, gcc will define "inhibit_libc", the stdio.h included by libgcc2.c is in the section with "inhibit_libc"<BR>
defined, when you build gcc to *-elf- or *-eabi- , such arm-elf-gcc or arm-eabi-gcc, you do not need any<BR>
c header files for the target.<BR>
<BR>
Regards<BR>
Zhongjie<BR>
-----Original Message-----<BR>
<B>From</B>: Chris Johns <<A HREF="mailto:Chris%20Johns%20%3cchrisj@rtems.org%3e">chrisj@rtems.org</A>><BR>
<B>To</B>: Zhongjie <<A HREF="mailto:Zhongjie%20%3czhurabbit@gmail.com%3e">zhurabbit@gmail.com</A>><BR>
<B>Cc</B>: <A HREF="mailto:rtems-users@rtems.org">rtems-users@rtems.org</A><BR>
<B>Subject</B>: Re: about header files used in score<BR>
<B>Date</B>: Mon, 15 Jun 2009 09:10:59 +1000<BR>
<BR>
<PRE>
Zhongjie wrote:
> thanks for reply.
> I am just beginning studying RTEMS, the newlib depends on a limited 
> number of low level functions.

Welcome.

> In fact, we do not need any C library to build gcc as a cross complier, 
> like arm-elf-gcc, only enable the c
> language. what I concerns is that some part of RTEMS should can be 
> compiled using those compiler.

If you look in libgcc2.c you will see an include for stdio.h. I have always 
needed some libc headers to build gcc.

> Of course, with newlib support, RTEMS works well, it just a little 
> confused logically for a beginner like me.
> as my understanding, it is a c library depends on a os, not a os depends 
> a c library.
> I think we could define those types in rtems, then included by gcc and 
> newlib, but not use those types directly in
> a c library header files. it will make the architecture more clearly.

GCC and newlib have all the types defined for a specific target and RTEMS uses 
them.

Regards
Chris

</PRE>
</BODY>
</HTML>