RFA: Add Epiphany newlib & libgloss port

Joern Rennecke amylaar@spamcop.net
Sun Nov 6 14:36:00 GMT 2011


3rd attempt to send this, it needs xz compression to fit... bzip2
looked OK at 65 KB, but base64 encoding and the other parts must have pushed
it over the limit.

The binutils port went in two weeks ago, and the GCC port today,
so this is the missing piece to compile standard C programs.

-------------- next part --------------
2011-11-05  Jeremy Bennett  <jeremy.bennett@embecosm.com>
	    Joern Rennecke  <joern.rennecke@embecosm.com>

toplevel:
	* COPYING.NEWLIB: Add Adapteva notice.
	* COPYING.LIBGLOSS: Add Adapteva notice.
libgloss:
	* configure.in: Add Epiphany support.
	* configure: Regenerate.
	* epiphany: New directory.
	* libgloss/README: Add Epiphany entry.
newlib:
	* configure.host: Add Epiphany support.
	* libc/include/machine/ieeefp.h: Likewise.
	* libc/include/machine/setjmp.h: Likewise.
	* libc/machine/configure.in, libc/sys/configure.in: Likewise.
	* libc/machine/configure, libc/sys/configure: Regenerate.
	* libc/machine/epiphany, libc/sys/epiphany: New directories.
	* NEWS: Mention addition of Epiphany.
-------------- next part --------------
Index: libgloss/configure.in
===================================================================
RCS file: /cvs/src/src/libgloss/configure.in,v
retrieving revision 1.32
diff -p -u -r1.32 configure.in
--- libgloss/configure.in	14 Jun 2011 13:40:46 -0000	1.32
+++ libgloss/configure.in	5 Nov 2011 19:39:00 -0000
@@ -34,6 +34,10 @@ dnl indicates whether to run configure w
 config_libnosys=true
 
 case "${target}" in
+  epiphany-*-*)
+	AC_CONFIG_SUBDIRS(epiphany)
+	config_testsuite=true
+	;;
   i[[3456]]86-*-elf* | i[[3456]]86-*-coff*)
 	AC_CONFIG_SUBDIRS([i386])
 	;;
Index: libgloss/README
===================================================================
RCS file: /cvs/src/src/libgloss/README,v
retrieving revision 1.5
diff -p -u -r1.5 README
--- libgloss/README	22 Sep 2010 22:45:07 -0000	1.5
+++ libgloss/README	5 Nov 2011 19:39:00 -0000
@@ -7,3 +7,4 @@ mep	- Toshiba Media Processor.
 pa	- WinBond and Oki boards with a PA.
 mips	- R3000 support. Array Tech LSI33k based RAID disk controller.
 lm32    - Lattice Mico32 simulator.
+epiphany - Adapteva Epiphany multicore processor.
\ No newline at end of file
Index: newlib/configure.host
===================================================================
RCS file: /cvs/src/src/newlib/configure.host,v
retrieving revision 1.121
diff -p -u -r1.121 configure.host
--- newlib/configure.host	14 Jun 2011 13:40:47 -0000	1.121
+++ newlib/configure.host	5 Nov 2011 19:39:00 -0000
@@ -122,6 +122,9 @@ case "${host_cpu}" in
   d30v*)
 	machine_dir=d30v
 	;;
+  epiphany)
+	machine_dir=epiphany
+	;;
   fido)
 	machine_dir=m68k
 	newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
@@ -381,6 +384,11 @@ case "${host}" in
   d30v*)
 	sys_dir=
 	;;
+  epiphany-*-*)
+	sys_dir=epiphany
+	# crt0 is provided by libgloss.
+	have_crt0="no"
+	;;
   frv*)
         sys_dir=
         ;;
@@ -594,6 +602,10 @@ case "${host}" in
 	newlib_cflags="${newlib_cflags} -DABORT_MESSAGE -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
 	syscall_dir=
 	;;
+  epiphany*)
+	syscall_dir=syscalls
+	newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED"
+	;;
   fido-*-elf)
 	newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
 	syscall_dir=
Index: newlib/NEWS
===================================================================
RCS file: /cvs/src/src/newlib/NEWS,v
retrieving revision 1.15
diff -p -u -r1.15 NEWS
--- newlib/NEWS	16 Dec 2010 21:58:39 -0000	1.15
+++ newlib/NEWS	5 Nov 2011 19:39:00 -0000
@@ -1,3 +1,5 @@
+* added Epiphany platform
+
 *** Major changes in newlib version 1.19.0:
 
 * complex math functions
Index: newlib/libc/include/machine/ieeefp.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/machine/ieeefp.h,v
retrieving revision 1.48
diff -p -u -r1.48 ieeefp.h
--- newlib/libc/include/machine/ieeefp.h	2 Dec 2010 19:30:46 -0000	1.48
+++ newlib/libc/include/machine/ieeefp.h	5 Nov 2011 19:39:00 -0000
@@ -69,6 +69,11 @@
 #endif
 #endif
 
+#ifdef __epiphany__
+#define __IEEE_LITTLE_ENDIAN
+#define Sudden_Underflow 1
+#endif
+
 #ifdef __hppa__
 #define __IEEE_BIG_ENDIAN
 #endif
Index: newlib/libc/include/machine/setjmp.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/machine/setjmp.h,v
retrieving revision 1.44
diff -p -u -r1.44 setjmp.h
--- newlib/libc/include/machine/setjmp.h	2 Dec 2010 19:30:46 -0000	1.44
+++ newlib/libc/include/machine/setjmp.h	5 Nov 2011 19:39:00 -0000
@@ -25,6 +25,12 @@ _BEGIN_STD_C
 #define _JBLEN  40
 #endif
 
+#ifdef __epiphany__
+/* All callee preserved registers: r4-r10,fp, sp, lr,r15, r32-r39  */
+#define _JBTYPE long long
+#define _JBLEN 10
+#endif
+
 /* necv70 was 9 as well. */
 
 #if defined(__m68k__) || defined(__mc68000__)
Index: newlib/libc/machine/configure.in
===================================================================
RCS file: /cvs/src/src/newlib/libc/machine/configure.in,v
retrieving revision 1.18
diff -p -u -r1.18 configure.in
--- newlib/libc/machine/configure.in	14 Jun 2011 13:40:48 -0000	1.18
+++ newlib/libc/machine/configure.in	5 Nov 2011 19:39:00 -0000
@@ -31,6 +31,7 @@ if test -n "${machine_dir}"; then
 	crx) AC_CONFIG_SUBDIRS(crx) ;;
 	d10v) AC_CONFIG_SUBDIRS(d10v) ;;
 	d30v) AC_CONFIG_SUBDIRS(d30v) ;;
+	epiphany) AC_CONFIG_SUBDIRS(epiphany) ;;
 	fr30) AC_CONFIG_SUBDIRS(fr30) ;;
 	frv) AC_CONFIG_SUBDIRS(frv) ;;
 	h8300) AC_CONFIG_SUBDIRS(h8300) ;;
Index: newlib/libc/sys/configure.in
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/configure.in,v
retrieving revision 1.9
diff -p -u -r1.9 configure.in
--- newlib/libc/sys/configure.in	24 Feb 2010 20:59:55 -0000	1.9
+++ newlib/libc/sys/configure.in	5 Nov 2011 19:39:00 -0000
@@ -27,6 +27,7 @@ if test -n "${sys_dir}"; then
 	arm) AC_CONFIG_SUBDIRS(arm) ;;
 	d10v) AC_CONFIG_SUBDIRS(d10v) ;;
 	decstation) AC_CONFIG_SUBDIRS(decstation) ;;
+	epiphany) AC_CONFIG_SUBDIRS(epiphany) ;;
 	h8300hms) AC_CONFIG_SUBDIRS(h8300hms) ;;
 	h8500hms) AC_CONFIG_SUBDIRS(h8500hms) ;;
 	linux) AC_CONFIG_SUBDIRS(linux) ;;
Index: COPYING.LIBGLOSS
===================================================================
RCS file: /cvs/src/src/COPYING.LIBGLOSS,v
retrieving revision 1.14
diff -p -u -r1.14 COPYING.LIBGLOSS
--- COPYING.LIBGLOSS	17 Dec 2010 22:10:05 -0000	1.14
+++ COPYING.LIBGLOSS	5 Nov 2011 19:39:00 -0000
@@ -285,3 +285,30 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINE
 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+(16) - Adapteva, Inc. (epiphany-* targets)
+
+Copyright (c) 2011, Adapteva, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+   list of conditions and the following disclaimer. 
+ * Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+ * Neither the name of Adapteva nor the names of its contributors may be used
+   to endorse or promote products derived from this software without specific
+   prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: COPYING.NEWLIB
===================================================================
RCS file: /cvs/src/src/COPYING.NEWLIB,v
retrieving revision 1.28
diff -p -u -r1.28 COPYING.NEWLIB
--- COPYING.NEWLIB	2 Dec 2010 20:05:11 -0000	1.28
+++ COPYING.NEWLIB	5 Nov 2011 19:39:00 -0000
@@ -877,3 +877,29 @@ and need not follow the licensing terms 
 the new terms are clearly indicated on the first page of each file where
 they apply. 
 
+(39) - Adapteva, Inc. (epiphany-* targets)
+
+Copyright (c) 2011, Adapteva, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice, this
+   list of conditions and the following disclaimer. 
+ * Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+ * Neither the name of Adapteva nor the names of its contributors may be used
+   to endorse or promote products derived from this software without specific
+   prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epiphany-newlib-port-20111105-1940.tar.xz
Type: application/x-xz
Size: 49892 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20111106/75b42c2c/attachment.xz>


More information about the Newlib mailing list