From: Kaushik, P. <Pra...@at...> - 2010-07-23 07:15:33
|
Hi Eric, >-----Original Message----- >From: Weddington, Eric >Sent: Thursday, July 22, 2010 9:53 PM >To: Kaushik, Praveen_Kumar >Cc: 'avr...@li...'; Joerg Wunsch >Subject: RE: [avr32-libc-devel] Building AVR32-Libc with GNU tool chain >> -----Original Message----- >> From: Kaushik, Praveen_Kumar >> Sent: Thursday, July 22, 2010 12:56 AM >> To: Weddington, Eric >> Cc: avr...@li... >> Subject: RE: [avr32-libc-devel] Building AVR32-Libc with GNU >> tool chain >> >> The switch name --with-newlib might not be appropriate but >> this does not say that we are going to use Newlib as C >> library but instead it is for because the libstdc++ depends >> on certain functions provided by Newlib which might not be >> part of standard C library. >You said that libstdc++ depends on certain functions provided by Newlib >which might not be part of the standard C library. Do you know exactly >which functions libstdc++ needs from Newlib that aren't part of the >standard C library? When I was building avr32-libc for first time, I got errors for absence of few functions while building libstdc++. When I looked for those functions few of those were not part of the standard C library but were still provided by Newlib. I gave dummy declarations for those functions and went on building the library. The following header files are also not part of standard C library: unistd.h: required for declaration of lseek() sys/types.h: required for various 'type' definitions sys/stat.h: required for definitions of some macros and declaration of fstat() Apart from these, In stdio.h: function fdopen() is required but is not a part of standards. function vsnprintf() conforms to C99 but not to C89. The above list might not be comprehensive but with the inclusion of these files, I was able to build libstdc++ and AVR32 tool chain using avr32-libc. I came across the discussion on GCC's mailing list about the name of the switch '--with-newlib'. The discussion is very long but I think the following pages can be a quick reference for why the name --with-newlib is used, http://www.mailinglistarchive.com/gc...@gc.../msg18539.html Only the last two paragraphs on this page will be useful:- http://www.mailinglistarchive.com/gc...@gc.../msg18544.html Regards, Praveen Kaushik |