This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] add bfin target


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]