[PATCH] Add Blackfin support in newlib (try 3) (was Re: [PATCH] Add Blackfin support in newlib (try 2))

Jie Zhang jzhang918@gmail.com
Thu Oct 26 18:34:00 GMT 2006


Hi all,

Here is a third patch for adding Blackfin support in newlib. I should 
send it out sooner. But I was waiting for Bernd's opinion without 
knowing he's on vocation.

This patch has fixed these more issues:

Michael Ambrus wrote:
>> > Jeff Johnston wrote:
>> >>   I forgot another issue.  The bfin processor should be using
>> >> underscored cpu macros from the compiler.  That is, you should be
>> >> looking for __BFIN__ or __bfin__ inside newlib header files: not 
>> "BFIN"
>> >> or "bfin".  The latter two are in the user's namespace.
>> >
>> > Michael Ambrus wrote:
>> >>
>> >> - The usage of the predefined BFIN macro in machine/ieeefp.h will lead
>> >> to the same compiling issues as mentioned in:
>> >> http://sourceware.org/ml/newlib/2006/msg00787.html
>> >> http://sourceware.org/ml/newlib/2006/msg00791.html
>> >
>> > As for these two macros, they were in our CVS(*) long long ago. I admit
>> > they look weird and uncommon. But considering they have been used in
>> > many code in such long time, we have to estimate its impact before 
>> doing
>> > any change.
> 
In private emails, Michael helped me to reproduce it on my machine. So I 
can take a close look at it. The fix is to use builtin_define_std 
instead of  builtin_define for bfin and BFIN. The patch:

<http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01349.html>

It's still waiting for Bernd's OK to go into GCC SVN. (He's on a two 
weeks vocation now.)

>> > Michael Ambrus wrote:
>> >>
>> >> - Both setjmp and longjmp are lacking (or according to the current gcc
>> >> release, it's rather _setjmp and _longjmp). If your application or
>> >> Newlib (or other libraries) don't need them, the build will pass
>> >> however.
>> >>
>> >> - The implementation of ___sigsetjmp is not needed. If I'm not
>> >> mistaken, sigsetjmp and siglongjmp are wrapped around setjmp and
>> >> longjmp macros in machine/setjmp.h.
>> >
Done! _setjmp and _longjmp have been defined. ___sigsetjmp has been removed.


So the the only one comment I have not done is

Jeff Johnston wrote:
 >   For your libc/machine/bfin Makefile.am, please look at the
 > libc/machine/fr30 directory.  You should base your Makefile.am on that
 > (adding any other files to lib_a_SOURCES).  This sets some flags needed
 > to ensure compilation flags are passed properly down from the top-level.

Jeff,

Do you means define AM_CCASFLAGS, lib_a_CCASFLAGS and lib_a_CFLAGS as in 
fr30?

I found I need automake 1.9.5 to generate Makefile.in. Is it in plan to 
update newlib to use automake 1.9.6?


Thanks,
Jie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfin-newlib-3.diff
Type: text/x-patch
Size: 25081 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20061026/a658fb4b/attachment.bin>


More information about the Newlib mailing list