[PATCH] add bfin target

Jeff Johnston jjohnstn@redhat.com
Mon Sep 25 23:30:00 GMT 2006


Hi Michael,

   I just noticed that your patches are testing for the BFIN flag. 
Platform macros such as this are normally underscore-prefixed to avoid 
clashing with the user macro namespace.

   Is there an __BFIN__ or __bfin__ alternative that can be used or is 
there some change required to the bfin compiler?

-- Jeff J.

Michael Ambrus wrote:
> On 9/14/06, Jeff Johnston <jjohnstn@redhat.com> wrote:
> 
>> Hi Alain,
>>
>>    A couple of points/comments.
>>
>>    1. You need to define the setjmp buffer in 
>> libc/include/machine/setjmp.h
>>
> 
> I added the define in the enclosed patch and also re-added the
> __IEEE_LITTLE_ENDIAN define.
> 
> Alain, can you please verify that the #define _JBLEN 40 is correct? I
> was making a guess based on your code. It seems you needed to reserve
> 0xA0  bytes, and based on the assumption that a bfin long is 4 bytes I
> came the result of 40.
> 
> The whole tool chain now builds for HIXS and produces code that will
> not offend AC_PROG_CC.
> 
> Configure settings used
> 
> binutils:
> ../../../binutils-2.17/configure  --target=bfin-hixs-elf
> --prefix=/skiff --enable-interwork --enable-multilib --disable-libssp
> 
> gcc:
> ../../../gcc-4.1.1/configure   --target=bfin-hixs-elf --prefix=/skiff
> --enable-interwork --enable-multilib --disable-libssp --with-newlib
> --with-headers=/opt/gnutools/newlib-1.14.0/newlib/libc/include
> --enable-languages=c,c++
> 
> newlib:
> ../../../newlib-1.14.0/configure  --target=bfin-hixs-elf
> --prefix=/skiff --enable-interwork --enable-multilib --disable-libssp
> 
> gdb:
> ../../../gdb-6.5.50.20060911/configure  --target=bfin-hixs-elf
> --prefix=/skiff --enable-interwork --enable-multilib --disable-libssp
> 
> Regards
> /Michael
> 
> 
> ------------------------------------------------------------------------
> 
> diff -urN newlib-1.14.0-orig/newlib/libc/include/machine/ieeefp.h newlib-1.14.0/newlib/libc/include/machine/ieeefp.h
> --- newlib-1.14.0-orig/newlib/libc/include/machine/ieeefp.h	2005-12-13 23:57:31.000000000 +0100
> +++ newlib-1.14.0/newlib/libc/include/machine/ieeefp.h	2006-09-25 18:52:01.000000000 +0200
> @@ -278,6 +278,10 @@
>  #define __IEEE_LITTLE_ENDIAN
>  #endif
>  
> +#ifdef BFIN
> +#define __IEEE_LITTLE_ENDIAN
> +#endif
> +
>  #ifndef __IEEE_BIG_ENDIAN
>  #ifndef __IEEE_LITTLE_ENDIAN
>  #error Endianess not declared!!
> diff -urN newlib-1.14.0-orig/newlib/libc/include/machine/setjmp.h newlib-1.14.0/newlib/libc/include/machine/setjmp.h
> --- newlib-1.14.0-orig/newlib/libc/include/machine/setjmp.h	2005-12-13 23:57:31.000000000 +0100
> +++ newlib-1.14.0/newlib/libc/include/machine/setjmp.h	2006-09-25 19:19:42.000000000 +0200
> @@ -213,6 +213,10 @@
>  #define _JBLEN 18
>  #endif
>  
> +#ifdef BFIN
> +#define _JBLEN 40
> +#endif
> +
>  #ifdef __m32c__
>  #if defined(__r8c_cpu__) || defined(__m16c_cpu__)
>  #define _JBLEN (22/2)



More information about the Newlib mailing list