2009-12-10 Conny Marco Menebrocker <c-m-m@gmx.de>
* configure.in: Add xc16x support.
        * configure: Regenerated.
        * xc16x/Makefile.in: New file for xc16x port.
        * xc16x/aclocal.m4: Ditto.
        * xc16x/close.S: Ditto.
        * xc16x/configure: Ditto.
        * xc16x/configure.in: Ditto.
        * xc16x/create.c: Ditto.
        * xc16x/crt0.S: Ditto.
        * xc16x/fstat.S: Ditto.
        * xc16x/getchar1.c: Ditto.
        * xc16x/isatty.c: Ditto.
        * xc16x/lseek.c: Ditto.
        * xc16x/mem-layout.c: Ditto.
        * xc16x/misc.c: Ditto.
        * xc16x/open.c: Ditto.
        * xc16x/read.c: Ditto.
        * xc16x/sbrk.c: Ditto.
        * xc16x/syscalls.c: Ditto.
        * xc16x/trap_handle.c: Ditto.
        * xc16x/write.c: Ditto.
        * xc16x/sys/syscall.h: Ditto.
			
			
This commit is contained in:
		| @@ -1,3 +1,28 @@ | |||||||
|  | 2009-12-10  Conny Marco Menebrocker <c-m-m@gmx.de> | ||||||
|  |  | ||||||
|  | 	* configure.in: Add xc16x support. | ||||||
|  | 	* configure: Regenerated. | ||||||
|  | 	* xc16x/Makefile.in: New file for xc16x port. | ||||||
|  | 	* xc16x/aclocal.m4: Ditto. | ||||||
|  | 	* xc16x/close.S: Ditto. | ||||||
|  | 	* xc16x/configure: Ditto. | ||||||
|  | 	* xc16x/configure.in: Ditto. | ||||||
|  | 	* xc16x/create.c: Ditto. | ||||||
|  | 	* xc16x/crt0.S: Ditto. | ||||||
|  | 	* xc16x/fstat.S: Ditto. | ||||||
|  | 	* xc16x/getchar1.c: Ditto. | ||||||
|  | 	* xc16x/isatty.c: Ditto. | ||||||
|  | 	* xc16x/lseek.c: Ditto. | ||||||
|  | 	* xc16x/mem-layout.c: Ditto. | ||||||
|  | 	* xc16x/misc.c: Ditto. | ||||||
|  | 	* xc16x/open.c: Ditto. | ||||||
|  | 	* xc16x/read.c: Ditto. | ||||||
|  | 	* xc16x/sbrk.c: Ditto. | ||||||
|  | 	* xc16x/syscalls.c: Ditto. | ||||||
|  | 	* xc16x/trap_handle.c: Ditto. | ||||||
|  | 	* xc16x/write.c: Ditto. | ||||||
|  | 	* xc16x/sys/syscall.h: Ditto. | ||||||
|  |  | ||||||
| 2009-11-25  DJ Delorie  <dj@redhat.com> | 2009-11-25  DJ Delorie  <dj@redhat.com> | ||||||
|  |  | ||||||
| 	* rx/rx.ld: Place .sbss properly. | 	* rx/rx.ld: Place .sbss properly. | ||||||
|   | |||||||
							
								
								
									
										4132
									
								
								libgloss/configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4132
									
								
								libgloss/configure
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -106,6 +106,9 @@ case "${target}" in | |||||||
|   mt-*-*) |   mt-*-*) | ||||||
|         AC_CONFIG_SUBDIRS([mt]) |         AC_CONFIG_SUBDIRS([mt]) | ||||||
| 	;; | 	;; | ||||||
|  |   xc16x-*-*) | ||||||
|  | 	AC_CONFIG_SUBDIRS([xc16x]) | ||||||
|  | 	;; | ||||||
|   xstormy16-*-*) |   xstormy16-*-*) | ||||||
| 	AC_CONFIG_SUBDIRS([xstormy16]) | 	AC_CONFIG_SUBDIRS([xstormy16]) | ||||||
| 	;; | 	;; | ||||||
|   | |||||||
							
								
								
									
										158
									
								
								libgloss/xc16x/Makefile.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										158
									
								
								libgloss/xc16x/Makefile.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,158 @@ | |||||||
|  | # | ||||||
|  | # Copyright (C) 2006 KPIT Cummins | ||||||
|  | # Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  | # All rights reserved. | ||||||
|  | # | ||||||
|  | # Redistribution and use in source and binary forms is permitted | ||||||
|  | # provided that the above copyright notice and following paragraph are | ||||||
|  | # duplicated in all such forms. | ||||||
|  | # | ||||||
|  | # This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  | # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  | # | ||||||
|  |  | ||||||
|  | DESTDIR = | ||||||
|  | VPATH = @srcdir@ | ||||||
|  | srcdir = @srcdir@ | ||||||
|  | objdir = . | ||||||
|  | srcroot = $(srcdir)/../.. | ||||||
|  | objroot = $(objdir)/../.. | ||||||
|  |  | ||||||
|  | prefix = @prefix@ | ||||||
|  | exec_prefix = @exec_prefix@ | ||||||
|  |  | ||||||
|  | host_alias = @host_alias@ | ||||||
|  | target_alias = @target_alias@ | ||||||
|  | program_transform_name = @program_transform_name@ | ||||||
|  |  | ||||||
|  | bindir = @bindir@ | ||||||
|  | libdir = @libdir@ | ||||||
|  | tooldir = $(exec_prefix)/$(target_alias) | ||||||
|  |  | ||||||
|  | # Multilib support variables. | ||||||
|  | # TOP is used instead of MULTI{BUILD,SRC}TOP. | ||||||
|  | MULTIDIRS = | ||||||
|  | MULTISUBDIR = | ||||||
|  | MULTIDO = true | ||||||
|  | MULTICLEAN = true | ||||||
|  |  | ||||||
|  | INSTALL = @INSTALL@ | ||||||
|  | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||||||
|  | INSTALL_DATA = @INSTALL_DATA@ | ||||||
|  |  | ||||||
|  | SHELL =	/bin/sh | ||||||
|  |  | ||||||
|  | CC = @CC@ | ||||||
|  |  | ||||||
|  | #AS = @AS@ | ||||||
|  | AS = `if [ -f ${objroot}/../gas/as.new ] ; \ | ||||||
|  | 	then echo ${objroot}/../gas/as.new ; \ | ||||||
|  | 	else echo as ; fi` | ||||||
|  |  | ||||||
|  | AR = @AR@ | ||||||
|  |  | ||||||
|  | #LD = @LD@ | ||||||
|  | LD = `if [ -f ${objroot}/../ld/ld.new ] ; \ | ||||||
|  | 	then echo ${objroot}/../ld/ld.new ; \ | ||||||
|  | 	else echo ld ; fi` | ||||||
|  |  | ||||||
|  | RANLIB = @RANLIB@ | ||||||
|  |  | ||||||
|  | OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \ | ||||||
|  | 	then echo ${objroot}/../binutils/objdump ; \ | ||||||
|  | 	else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi` | ||||||
|  | OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ | ||||||
|  | 	then echo ${objroot}/../binutils/objcopy ; \ | ||||||
|  | 	else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` | ||||||
|  |  | ||||||
|  | CRT0 = crt0.o crt0_cygmon.o crt0_redboot.o | ||||||
|  |  | ||||||
|  | # Generic object files common to all targets. | ||||||
|  | GENOBJS_NO_TRAP = close.o create.o crt0.o fstat.o getchar1.o \ | ||||||
|  |     isatty.o lseek.o mem-layout.o misc.o open.o putchar.o \ | ||||||
|  |     puts.o read.o sbrk.o syscalls.o write.o | ||||||
|  | GENOBJS = ${GENOBJS_NO_TRAP} trap_handle.o | ||||||
|  |  | ||||||
|  | # Object files specific to particular targets. | ||||||
|  | EVALOBJS = ${GENOBJS} | ||||||
|  | CYGMONOBJS = ${GENOBJS_NO_TRAP} | ||||||
|  |  | ||||||
|  | CFLAGS = -g  | ||||||
|  |  | ||||||
|  | GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \ | ||||||
|  | 	then echo -L${objroot}/../gcc ; fi` | ||||||
|  |  | ||||||
|  | SCRIPTS = @script_list@ | ||||||
|  | BSP = @bsp_list@ | ||||||
|  |  | ||||||
|  | # Host specific makefile fragment comes in here. | ||||||
|  | @host_makefile_frag@ | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # build a test program for each target board. Just trying to get | ||||||
|  | # it to link is a good test, so we ignore all the errors for now. | ||||||
|  | # | ||||||
|  |  | ||||||
|  | all: ${CRT0} test.o ${BSP} | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # here's where we build the board support packages for each target | ||||||
|  | # | ||||||
|  |  | ||||||
|  | libeval.a: $(EVALOBJS) | ||||||
|  | 	${AR} ${ARFLAGS} $@ $(EVALOBJS) | ||||||
|  | 	${RANLIB} $@ | ||||||
|  |  | ||||||
|  | libcygmon.a: $(CYGMONOBJS) | ||||||
|  | 	${AR} ${ARFLAGS} $@ $(CYGMONOBJS) | ||||||
|  | 	${RANLIB} $@ | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # compile a fully linked binary. The -Wl,-T*.ld is for the linker | ||||||
|  | # script. By using -Wl, the linker script is put on the proper place | ||||||
|  | # in the comand line for ld, and all the symbols will get fully | ||||||
|  | # resolved. | ||||||
|  |  | ||||||
|  | test: ${CRT0} test.o | ||||||
|  | 	${CC} $(CFLAGS_FOR_TARGET) -L${srcdir} -L${objdir} \ | ||||||
|  | 	test.o -o $@ $(NEWLIB_LDFLAGS) -Wl,-Teval.ld | ||||||
|  | 	@echo Done... | ||||||
|  |  | ||||||
|  | doc:	 | ||||||
|  |  | ||||||
|  | clean mostlyclean: | ||||||
|  | 	rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x | ||||||
|  |  | ||||||
|  | distclean maintainer-clean realclean: clean | ||||||
|  | 	rm -f Makefile config.status a.out | ||||||
|  |  | ||||||
|  | .PHONY: install info install-info clean-info | ||||||
|  | install: | ||||||
|  | 	@for crt in ${CRT0}; do \ | ||||||
|  | 	$(INSTALL_PROGRAM) $${crt} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${crt}; \ | ||||||
|  | 	done | ||||||
|  | 	@for bsp in ${BSP}; do \ | ||||||
|  | 	 $(INSTALL_PROGRAM) $${bsp} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \ | ||||||
|  | 	done | ||||||
|  | 	@for script in ${SCRIPTS}; do \ | ||||||
|  | 	 $(INSTALL_DATA) ${srcdir}/$${script}.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${script}.ld; \ | ||||||
|  | 	done | ||||||
|  |  | ||||||
|  | info: | ||||||
|  | install-info: | ||||||
|  | clean-info: | ||||||
|  |  | ||||||
|  | test.o:	${srcdir}/test.c | ||||||
|  |  | ||||||
|  | # these are for the BSPs | ||||||
|  | crt0.o: ${srcdir}/crt0.S | ||||||
|  | crt0_cygmon.o: ${srcdir}/crt0_cygmon.S | ||||||
|  |  | ||||||
|  | # target specific makefile fragment comes in here. | ||||||
|  | @target_makefile_frag@ | ||||||
|  |  | ||||||
|  | Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@ | ||||||
|  | 	$(SHELL) config.status | ||||||
|  |  | ||||||
|  | config.status: configure | ||||||
|  | 	$(SHELL) config.status --recheck | ||||||
							
								
								
									
										404
									
								
								libgloss/xc16x/aclocal.m4
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										404
									
								
								libgloss/xc16x/aclocal.m4
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,404 @@ | |||||||
|  | # generated automatically by aclocal 1.11 -*- Autoconf -*- | ||||||
|  |  | ||||||
|  | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | ||||||
|  | # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc. | ||||||
|  | # This file is free software; the Free Software Foundation | ||||||
|  | # gives unlimited permission to copy and/or distribute it, | ||||||
|  | # with or without modifications, as long as this notice is preserved. | ||||||
|  |  | ||||||
|  | # This program is distributed in the hope that it will be useful, | ||||||
|  | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||||||
|  | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||||||
|  | # PARTICULAR PURPOSE. | ||||||
|  |  | ||||||
|  | # AM_CONDITIONAL                                            -*- Autoconf -*- | ||||||
|  |  | ||||||
|  | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 | ||||||
|  | # Free Software Foundation, Inc. | ||||||
|  | # | ||||||
|  | # This file is free software; the Free Software Foundation | ||||||
|  | # gives unlimited permission to copy and/or distribute it, | ||||||
|  | # with or without modifications, as long as this notice is preserved. | ||||||
|  |  | ||||||
|  | # serial 9 | ||||||
|  |  | ||||||
|  | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | ||||||
|  | # ------------------------------------- | ||||||
|  | # Define a conditional. | ||||||
|  | AC_DEFUN([AM_CONDITIONAL], | ||||||
|  | [AC_PREREQ(2.52)dnl | ||||||
|  |  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])], | ||||||
|  | 	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | ||||||
|  | AC_SUBST([$1_TRUE])dnl | ||||||
|  | AC_SUBST([$1_FALSE])dnl | ||||||
|  | _AM_SUBST_NOTMAKE([$1_TRUE])dnl | ||||||
|  | _AM_SUBST_NOTMAKE([$1_FALSE])dnl | ||||||
|  | m4_define([_AM_COND_VALUE_$1], [$2])dnl | ||||||
|  | if $2; then | ||||||
|  |   $1_TRUE= | ||||||
|  |   $1_FALSE='#' | ||||||
|  | else | ||||||
|  |   $1_TRUE='#' | ||||||
|  |   $1_FALSE= | ||||||
|  | fi | ||||||
|  | AC_CONFIG_COMMANDS_PRE( | ||||||
|  | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | ||||||
|  |   AC_MSG_ERROR([[conditional "$1" was never defined. | ||||||
|  | Usually this means the macro was only invoked conditionally.]]) | ||||||
|  | fi])]) | ||||||
|  |  | ||||||
|  | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 | ||||||
|  | # Free Software Foundation, Inc. | ||||||
|  | # | ||||||
|  | # This file is free software; the Free Software Foundation | ||||||
|  | # gives unlimited permission to copy and/or distribute it, | ||||||
|  | # with or without modifications, as long as this notice is preserved. | ||||||
|  |  | ||||||
|  | # serial 10 | ||||||
|  |  | ||||||
|  | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be | ||||||
|  | # written in clear, in which case automake, when reading aclocal.m4, | ||||||
|  | # will think it sees a *use*, and therefore will trigger all it's | ||||||
|  | # C support machinery.  Also note that it means that autoscan, seeing | ||||||
|  | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # _AM_DEPENDENCIES(NAME) | ||||||
|  | # ---------------------- | ||||||
|  | # See how the compiler implements dependency checking. | ||||||
|  | # NAME is "CC", "CXX", "GCJ", or "OBJC". | ||||||
|  | # We try a few techniques and use that to set a single cache variable. | ||||||
|  | # | ||||||
|  | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | ||||||
|  | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | ||||||
|  | # dependency, and given that the user is not expected to run this macro, | ||||||
|  | # just rely on AC_PROG_CC. | ||||||
|  | AC_DEFUN([_AM_DEPENDENCIES], | ||||||
|  | [AC_REQUIRE([AM_SET_DEPDIR])dnl | ||||||
|  | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | ||||||
|  | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | ||||||
|  | AC_REQUIRE([AM_DEP_TRACK])dnl | ||||||
|  |  | ||||||
|  | ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=], | ||||||
|  |        [$1], CXX,  [depcc="$CXX"  am_compiler_list=], | ||||||
|  |        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | ||||||
|  |        [$1], UPC,  [depcc="$UPC"  am_compiler_list=], | ||||||
|  |        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'], | ||||||
|  |                    [depcc="$$1"   am_compiler_list=]) | ||||||
|  |  | ||||||
|  | AC_CACHE_CHECK([dependency style of $depcc], | ||||||
|  |                [am_cv_$1_dependencies_compiler_type], | ||||||
|  | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | ||||||
|  |   # We make a subdir and do the tests there.  Otherwise we can end up | ||||||
|  |   # making bogus files that we don't know about and never remove.  For | ||||||
|  |   # instance it was reported that on HP-UX the gcc test will end up | ||||||
|  |   # making a dummy file named `D' -- because `-MD' means `put the output | ||||||
|  |   # in D'. | ||||||
|  |   mkdir conftest.dir | ||||||
|  |   # Copy depcomp to subdir because otherwise we won't find it if we're | ||||||
|  |   # using a relative directory. | ||||||
|  |   cp "$am_depcomp" conftest.dir | ||||||
|  |   cd conftest.dir | ||||||
|  |   # We will build objects and dependencies in a subdirectory because | ||||||
|  |   # it helps to detect inapplicable dependency modes.  For instance | ||||||
|  |   # both Tru64's cc and ICC support -MD to output dependencies as a | ||||||
|  |   # side effect of compilation, but ICC will put the dependencies in | ||||||
|  |   # the current directory while Tru64 will put them in the object | ||||||
|  |   # directory. | ||||||
|  |   mkdir sub | ||||||
|  |  | ||||||
|  |   am_cv_$1_dependencies_compiler_type=none | ||||||
|  |   if test "$am_compiler_list" = ""; then | ||||||
|  |      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | ||||||
|  |   fi | ||||||
|  |   am__universal=false | ||||||
|  |   m4_case([$1], [CC], | ||||||
|  |     [case " $depcc " in #( | ||||||
|  |      *\ -arch\ *\ -arch\ *) am__universal=true ;; | ||||||
|  |      esac], | ||||||
|  |     [CXX], | ||||||
|  |     [case " $depcc " in #( | ||||||
|  |      *\ -arch\ *\ -arch\ *) am__universal=true ;; | ||||||
|  |      esac]) | ||||||
|  |  | ||||||
|  |   for depmode in $am_compiler_list; do | ||||||
|  |     # Setup a source with many dependencies, because some compilers | ||||||
|  |     # like to wrap large dependency lists on column 80 (with \), and | ||||||
|  |     # we should not choose a depcomp mode which is confused by this. | ||||||
|  |     # | ||||||
|  |     # We need to recreate these files for each test, as the compiler may | ||||||
|  |     # overwrite some of them when testing with obscure command lines. | ||||||
|  |     # This happens at least with the AIX C compiler. | ||||||
|  |     : > sub/conftest.c | ||||||
|  |     for i in 1 2 3 4 5 6; do | ||||||
|  |       echo '#include "conftst'$i'.h"' >> sub/conftest.c | ||||||
|  |       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | ||||||
|  |       # Solaris 8's {/usr,}/bin/sh. | ||||||
|  |       touch sub/conftst$i.h | ||||||
|  |     done | ||||||
|  |     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | ||||||
|  |  | ||||||
|  |     # We check with `-c' and `-o' for the sake of the "dashmstdout" | ||||||
|  |     # mode.  It turns out that the SunPro C++ compiler does not properly | ||||||
|  |     # handle `-M -o', and we need to detect this.  Also, some Intel | ||||||
|  |     # versions had trouble with output in subdirs | ||||||
|  |     am__obj=sub/conftest.${OBJEXT-o} | ||||||
|  |     am__minus_obj="-o $am__obj" | ||||||
|  |     case $depmode in | ||||||
|  |     gcc) | ||||||
|  |       # This depmode causes a compiler race in universal mode. | ||||||
|  |       test "$am__universal" = false || continue | ||||||
|  |       ;; | ||||||
|  |     nosideeffect) | ||||||
|  |       # after this tag, mechanisms are not by side-effect, so they'll | ||||||
|  |       # only be used when explicitly requested | ||||||
|  |       if test "x$enable_dependency_tracking" = xyes; then | ||||||
|  | 	continue | ||||||
|  |       else | ||||||
|  | 	break | ||||||
|  |       fi | ||||||
|  |       ;; | ||||||
|  |     msvisualcpp | msvcmsys) | ||||||
|  |       # This compiler won't grok `-c -o', but also, the minuso test has | ||||||
|  |       # not run yet.  These depmodes are late enough in the game, and | ||||||
|  |       # so weak that their functioning should not be impacted. | ||||||
|  |       am__obj=conftest.${OBJEXT-o} | ||||||
|  |       am__minus_obj= | ||||||
|  |       ;; | ||||||
|  |     none) break ;; | ||||||
|  |     esac | ||||||
|  |     if depmode=$depmode \ | ||||||
|  |        source=sub/conftest.c object=$am__obj \ | ||||||
|  |        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | ||||||
|  |        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | ||||||
|  |          >/dev/null 2>conftest.err && | ||||||
|  |        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | ||||||
|  |        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | ||||||
|  |        grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | ||||||
|  |        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | ||||||
|  |       # icc doesn't choke on unknown options, it will just issue warnings | ||||||
|  |       # or remarks (even with -Werror).  So we grep stderr for any message | ||||||
|  |       # that says an option was ignored or not supported. | ||||||
|  |       # When given -MP, icc 7.0 and 7.1 complain thusly: | ||||||
|  |       #   icc: Command line warning: ignoring option '-M'; no argument required | ||||||
|  |       # The diagnosis changed in icc 8.0: | ||||||
|  |       #   icc: Command line remark: option '-MP' not supported | ||||||
|  |       if (grep 'ignoring option' conftest.err || | ||||||
|  |           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | ||||||
|  |         am_cv_$1_dependencies_compiler_type=$depmode | ||||||
|  |         break | ||||||
|  |       fi | ||||||
|  |     fi | ||||||
|  |   done | ||||||
|  |  | ||||||
|  |   cd .. | ||||||
|  |   rm -rf conftest.dir | ||||||
|  | else | ||||||
|  |   am_cv_$1_dependencies_compiler_type=none | ||||||
|  | fi | ||||||
|  | ]) | ||||||
|  | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | ||||||
|  | AM_CONDITIONAL([am__fastdep$1], [ | ||||||
|  |   test "x$enable_dependency_tracking" != xno \ | ||||||
|  |   && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | ||||||
|  | ]) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # AM_SET_DEPDIR | ||||||
|  | # ------------- | ||||||
|  | # Choose a directory name for dependency files. | ||||||
|  | # This macro is AC_REQUIREd in _AM_DEPENDENCIES | ||||||
|  | AC_DEFUN([AM_SET_DEPDIR], | ||||||
|  | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl | ||||||
|  | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | ||||||
|  | ]) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # AM_DEP_TRACK | ||||||
|  | # ------------ | ||||||
|  | AC_DEFUN([AM_DEP_TRACK], | ||||||
|  | [AC_ARG_ENABLE(dependency-tracking, | ||||||
|  | [  --disable-dependency-tracking  speeds up one-time build | ||||||
|  |   --enable-dependency-tracking   do not reject slow dependency extractors]) | ||||||
|  | if test "x$enable_dependency_tracking" != xno; then | ||||||
|  |   am_depcomp="$ac_aux_dir/depcomp" | ||||||
|  |   AMDEPBACKSLASH='\' | ||||||
|  | fi | ||||||
|  | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | ||||||
|  | AC_SUBST([AMDEPBACKSLASH])dnl | ||||||
|  | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | ||||||
|  | ]) | ||||||
|  |  | ||||||
|  | # Generate code to set up dependency tracking.              -*- Autoconf -*- | ||||||
|  |  | ||||||
|  | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 | ||||||
|  | # Free Software Foundation, Inc. | ||||||
|  | # | ||||||
|  | # This file is free software; the Free Software Foundation | ||||||
|  | # gives unlimited permission to copy and/or distribute it, | ||||||
|  | # with or without modifications, as long as this notice is preserved. | ||||||
|  |  | ||||||
|  | #serial 5 | ||||||
|  |  | ||||||
|  | # _AM_OUTPUT_DEPENDENCY_COMMANDS | ||||||
|  | # ------------------------------ | ||||||
|  | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | ||||||
|  | [{ | ||||||
|  |   # Autoconf 2.62 quotes --file arguments for eval, but not when files | ||||||
|  |   # are listed without --file.  Let's play safe and only enable the eval | ||||||
|  |   # if we detect the quoting. | ||||||
|  |   case $CONFIG_FILES in | ||||||
|  |   *\'*) eval set x "$CONFIG_FILES" ;; | ||||||
|  |   *)   set x $CONFIG_FILES ;; | ||||||
|  |   esac | ||||||
|  |   shift | ||||||
|  |   for mf | ||||||
|  |   do | ||||||
|  |     # Strip MF so we end up with the name of the file. | ||||||
|  |     mf=`echo "$mf" | sed -e 's/:.*$//'` | ||||||
|  |     # Check whether this is an Automake generated Makefile or not. | ||||||
|  |     # We used to match only the files named `Makefile.in', but | ||||||
|  |     # some people rename them; so instead we look at the file content. | ||||||
|  |     # Grep'ing the first line is not enough: some people post-process | ||||||
|  |     # each Makefile.in and add a new line on top of each file to say so. | ||||||
|  |     # Grep'ing the whole file is not good either: AIX grep has a line | ||||||
|  |     # limit of 2048, but all sed's we know have understand at least 4000. | ||||||
|  |     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | ||||||
|  |       dirpart=`AS_DIRNAME("$mf")` | ||||||
|  |     else | ||||||
|  |       continue | ||||||
|  |     fi | ||||||
|  |     # Extract the definition of DEPDIR, am__include, and am__quote | ||||||
|  |     # from the Makefile without running `make'. | ||||||
|  |     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | ||||||
|  |     test -z "$DEPDIR" && continue | ||||||
|  |     am__include=`sed -n 's/^am__include = //p' < "$mf"` | ||||||
|  |     test -z "am__include" && continue | ||||||
|  |     am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | ||||||
|  |     # When using ansi2knr, U may be empty or an underscore; expand it | ||||||
|  |     U=`sed -n 's/^U = //p' < "$mf"` | ||||||
|  |     # Find all dependency output files, they are included files with | ||||||
|  |     # $(DEPDIR) in their names.  We invoke sed twice because it is the | ||||||
|  |     # simplest approach to changing $(DEPDIR) to its actual value in the | ||||||
|  |     # expansion. | ||||||
|  |     for file in `sed -n " | ||||||
|  |       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | ||||||
|  | 	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | ||||||
|  |       # Make sure the directory exists. | ||||||
|  |       test -f "$dirpart/$file" && continue | ||||||
|  |       fdir=`AS_DIRNAME(["$file"])` | ||||||
|  |       AS_MKDIR_P([$dirpart/$fdir]) | ||||||
|  |       # echo "creating $dirpart/$file" | ||||||
|  |       echo '# dummy' > "$dirpart/$file" | ||||||
|  |     done | ||||||
|  |   done | ||||||
|  | } | ||||||
|  | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # AM_OUTPUT_DEPENDENCY_COMMANDS | ||||||
|  | # ----------------------------- | ||||||
|  | # This macro should only be invoked once -- use via AC_REQUIRE. | ||||||
|  | # | ||||||
|  | # This code is only required when automatic dependency tracking | ||||||
|  | # is enabled.  FIXME.  This creates each `.P' file that we will | ||||||
|  | # need in order to bootstrap the dependency handling code. | ||||||
|  | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | ||||||
|  | [AC_CONFIG_COMMANDS([depfiles], | ||||||
|  |      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | ||||||
|  |      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | ||||||
|  | ]) | ||||||
|  |  | ||||||
|  | # Copyright (C) 2003, 2005  Free Software Foundation, Inc. | ||||||
|  | # | ||||||
|  | # This file is free software; the Free Software Foundation | ||||||
|  | # gives unlimited permission to copy and/or distribute it, | ||||||
|  | # with or without modifications, as long as this notice is preserved. | ||||||
|  |  | ||||||
|  | # serial 2 | ||||||
|  |  | ||||||
|  | # Check whether the underlying file-system supports filenames | ||||||
|  | # with a leading dot.  For instance MS-DOS doesn't. | ||||||
|  | AC_DEFUN([AM_SET_LEADING_DOT], | ||||||
|  | [rm -rf .tst 2>/dev/null | ||||||
|  | mkdir .tst 2>/dev/null | ||||||
|  | if test -d .tst; then | ||||||
|  |   am__leading_dot=. | ||||||
|  | else | ||||||
|  |   am__leading_dot=_ | ||||||
|  | fi | ||||||
|  | rmdir .tst 2>/dev/null | ||||||
|  | AC_SUBST([am__leading_dot])]) | ||||||
|  |  | ||||||
|  | # Check to see how 'make' treats includes.	            -*- Autoconf -*- | ||||||
|  |  | ||||||
|  | # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc. | ||||||
|  | # | ||||||
|  | # This file is free software; the Free Software Foundation | ||||||
|  | # gives unlimited permission to copy and/or distribute it, | ||||||
|  | # with or without modifications, as long as this notice is preserved. | ||||||
|  |  | ||||||
|  | # serial 4 | ||||||
|  |  | ||||||
|  | # AM_MAKE_INCLUDE() | ||||||
|  | # ----------------- | ||||||
|  | # Check to see how make treats includes. | ||||||
|  | AC_DEFUN([AM_MAKE_INCLUDE], | ||||||
|  | [am_make=${MAKE-make} | ||||||
|  | cat > confinc << 'END' | ||||||
|  | am__doit: | ||||||
|  | 	@echo this is the am__doit target | ||||||
|  | .PHONY: am__doit | ||||||
|  | END | ||||||
|  | # If we don't find an include directive, just comment out the code. | ||||||
|  | AC_MSG_CHECKING([for style of include used by $am_make]) | ||||||
|  | am__include="#" | ||||||
|  | am__quote= | ||||||
|  | _am_result=none | ||||||
|  | # First try GNU make style include. | ||||||
|  | echo "include confinc" > confmf | ||||||
|  | # Ignore all kinds of additional output from `make'. | ||||||
|  | case `$am_make -s -f confmf 2> /dev/null` in #( | ||||||
|  | *the\ am__doit\ target*) | ||||||
|  |   am__include=include | ||||||
|  |   am__quote= | ||||||
|  |   _am_result=GNU | ||||||
|  |   ;; | ||||||
|  | esac | ||||||
|  | # Now try BSD make style include. | ||||||
|  | if test "$am__include" = "#"; then | ||||||
|  |    echo '.include "confinc"' > confmf | ||||||
|  |    case `$am_make -s -f confmf 2> /dev/null` in #( | ||||||
|  |    *the\ am__doit\ target*) | ||||||
|  |      am__include=.include | ||||||
|  |      am__quote="\"" | ||||||
|  |      _am_result=BSD | ||||||
|  |      ;; | ||||||
|  |    esac | ||||||
|  | fi | ||||||
|  | AC_SUBST([am__include]) | ||||||
|  | AC_SUBST([am__quote]) | ||||||
|  | AC_MSG_RESULT([$_am_result]) | ||||||
|  | rm -f confinc confmf | ||||||
|  | ]) | ||||||
|  |  | ||||||
|  | # Copyright (C) 2006, 2008  Free Software Foundation, Inc. | ||||||
|  | # | ||||||
|  | # This file is free software; the Free Software Foundation | ||||||
|  | # gives unlimited permission to copy and/or distribute it, | ||||||
|  | # with or without modifications, as long as this notice is preserved. | ||||||
|  |  | ||||||
|  | # serial 2 | ||||||
|  |  | ||||||
|  | # _AM_SUBST_NOTMAKE(VARIABLE) | ||||||
|  | # --------------------------- | ||||||
|  | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | ||||||
|  | # This macro is traced by Automake. | ||||||
|  | AC_DEFUN([_AM_SUBST_NOTMAKE]) | ||||||
|  |  | ||||||
|  | # AM_SUBST_NOTMAKE(VARIABLE) | ||||||
|  | # --------------------------- | ||||||
|  | # Public sister of _AM_SUBST_NOTMAKE. | ||||||
|  | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | ||||||
|  |  | ||||||
|  | m4_include([../acinclude.m4]) | ||||||
							
								
								
									
										20
									
								
								libgloss/xc16x/close.S
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								libgloss/xc16x/close.S
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | .section .text | ||||||
|  | .global __close | ||||||
|  | __close: | ||||||
|  | #ifdef __xc16xL__ | ||||||
|  | rets | ||||||
|  | #else | ||||||
|  | ret | ||||||
|  | #endif | ||||||
							
								
								
									
										3992
									
								
								libgloss/xc16x/configure
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										3992
									
								
								libgloss/xc16x/configure
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										81
									
								
								libgloss/xc16x/configure.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								libgloss/xc16x/configure.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,81 @@ | |||||||
|  | # | ||||||
|  | # Copyright (C) 2006 KPIT Cummins | ||||||
|  | # Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  | # All rights reserved. | ||||||
|  | # | ||||||
|  | # Redistribution and use in source and binary forms is permitted | ||||||
|  | # provided that the above copyright notice and following paragraph are | ||||||
|  | # duplicated in all such forms. | ||||||
|  | # | ||||||
|  | # This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  | # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  | # | ||||||
|  | # | ||||||
|  | # Process this file with autoconf to produce a configure script. | ||||||
|  | # | ||||||
|  | AC_PREREQ(2.59) | ||||||
|  | AC_INIT(crt0.S) | ||||||
|  |  | ||||||
|  | if test "${enable_shared}" = "yes" ; then | ||||||
|  |     echo "Shared libraries not supported for cross compiling, ignored" | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | if test "$srcdir" = "." ; then | ||||||
|  |   if test "${with_target_subdir}" != "." ; then | ||||||
|  |     libgloss_topdir="${srcdir}/${with_multisrctop}../../.." | ||||||
|  |   else | ||||||
|  |     libgloss_topdir="${srcdir}/${with_multisrctop}../.." | ||||||
|  |   fi | ||||||
|  | else | ||||||
|  |   libgloss_topdir="${srcdir}/../.." | ||||||
|  | fi | ||||||
|  | AC_CONFIG_AUX_DIR($libgloss_topdir) | ||||||
|  |  | ||||||
|  | AC_CANONICAL_SYSTEM | ||||||
|  | AC_ARG_PROGRAM | ||||||
|  |  | ||||||
|  | AC_PROG_INSTALL | ||||||
|  |  | ||||||
|  | LIB_AC_PROG_CC | ||||||
|  | AS=${AS-as} | ||||||
|  | AC_SUBST(AS) | ||||||
|  | AR=${AR-ar} | ||||||
|  | AC_SUBST(AR) | ||||||
|  | LD=${LD-ld} | ||||||
|  | AC_SUBST(LD) | ||||||
|  | AC_PROG_RANLIB | ||||||
|  | LIB_AM_PROG_AS | ||||||
|  |  | ||||||
|  |  | ||||||
|  | host_makefile_frag=${srcdir}/../config/default.mh | ||||||
|  | target_makefile_frag=${srcdir}/../config/xc16x.mt | ||||||
|  |  | ||||||
|  | dnl We have to assign the same value to other variables because autoconf | ||||||
|  | dnl doesn't provide a mechanism to substitute a replacement keyword with | ||||||
|  | dnl arbitrary data or pathnames. | ||||||
|  | dnl | ||||||
|  | host_makefile_frag_path=$host_makefile_frag | ||||||
|  | AC_SUBST(host_makefile_frag_path) | ||||||
|  | AC_SUBST_FILE(host_makefile_frag) | ||||||
|  | target_makefile_frag_path=$target_makefile_frag | ||||||
|  | AC_SUBST(target_makefile_frag_path) | ||||||
|  | AC_SUBST_FILE(target_makefile_frag) | ||||||
|  | AC_SUBST(part_specific_obj) | ||||||
|  | AC_SUBST(script_list) | ||||||
|  | AC_SUBST(bsp_list) | ||||||
|  |  | ||||||
|  | AC_CONFIG_FILES([Makefile], | ||||||
|  | [if test -n "$CONFIG_FILES"; then | ||||||
|  |   unset ac_file | ||||||
|  |   . ${libgloss_topdir}/config-ml.in | ||||||
|  | fi], | ||||||
|  | srcdir=${srcdir} | ||||||
|  | target=${target} | ||||||
|  | with_multisubdir=${with_multisubdir} | ||||||
|  | ac_configure_args="${ac_configure_args} --enable-multilib" | ||||||
|  | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | ||||||
|  | libgloss_topdir=${libgloss_topdir} | ||||||
|  | ) | ||||||
|  | AC_OUTPUT | ||||||
|  |  | ||||||
|  |  | ||||||
							
								
								
									
										39
									
								
								libgloss/xc16x/create.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								libgloss/xc16x/create.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | #include<sys/stat.h> | ||||||
|  | #include<sys/types.h> | ||||||
|  | /*volatile int creatsys(char *name,int perms) | ||||||
|  | { | ||||||
|  |  #ifndef __xc16xL__ | ||||||
|  |         asm volatile("push r10\n" | ||||||
|  | 		     " mov r10,r9  \n" | ||||||
|  |                      " mov r9,#0x300 \n" | ||||||
|  | 		     ); | ||||||
|  |                                                                                  | ||||||
|  |   #endif | ||||||
|  |  | ||||||
|  | asm volatile("trap #7"); | ||||||
|  | #ifndef __xc16xL__ | ||||||
|  | asm volatile("pop r10"); | ||||||
|  | #endif | ||||||
|  | } | ||||||
|  | */ | ||||||
|  | volatile int _creat(char *name,int perms) | ||||||
|  | { | ||||||
|  |  int temp; | ||||||
|  |  | ||||||
|  |   temp=creatsys(name,perms);     | ||||||
|  | // putchar((char)temp); | ||||||
|  | //printf("%d\n",temp);					 | ||||||
|  | return temp;   | ||||||
|  | } | ||||||
							
								
								
									
										41
									
								
								libgloss/xc16x/crt0.S
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								libgloss/xc16x/crt0.S
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | 	.section .text | ||||||
|  | 	.global _start | ||||||
|  | 	.align 2 | ||||||
|  | _start: | ||||||
|  | 	#if __xc16xL__ | ||||||
|  | 	mov dpp0,#0x2 | ||||||
|  | 	#else | ||||||
|  | 	mov dpp0,#0x300 | ||||||
|  | 	#endif | ||||||
|  | 	mov dpp1,#1 | ||||||
|  | 	mov dpp2,#2 | ||||||
|  | 	mov dpp3,#3 | ||||||
|  | 	mov sp,#0xfc00 | ||||||
|  | 	mov r0,#0xc000 | ||||||
|  | 	#if __xc16x__ | ||||||
|  | 	mov csp,#0x0 | ||||||
|  | 	mov dpp0,#0x0 | ||||||
|  | 	#else | ||||||
|  | 	mov csp,#0xc0 | ||||||
|  |       	#endif | ||||||
|  |          | ||||||
|  | #if __xc16xL__ | ||||||
|  | calls #SEG:_main,#SOF:_main | ||||||
|  | #else | ||||||
|  | calla cc_UC,_main | ||||||
|  | #endif | ||||||
|  |  	mov r8,#0x0	 | ||||||
|  | 	trap #0	 | ||||||
|  | ret | ||||||
							
								
								
									
										20
									
								
								libgloss/xc16x/fstat.S
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								libgloss/xc16x/fstat.S
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | .section .text | ||||||
|  | .global __fstat | ||||||
|  | __fstat: | ||||||
|  | #ifdef __xc16xL__ | ||||||
|  | rets | ||||||
|  | #else | ||||||
|  | ret | ||||||
|  | #endif | ||||||
							
								
								
									
										19
									
								
								libgloss/xc16x/getchar1.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								libgloss/xc16x/getchar1.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | signed char getchar (void) | ||||||
|  | { | ||||||
|  |                                                                                 | ||||||
|  |   asm(" trap #2"); | ||||||
|  |                                                                                  | ||||||
|  | } | ||||||
|  |  | ||||||
							
								
								
									
										26
									
								
								libgloss/xc16x/isatty.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								libgloss/xc16x/isatty.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | /* isatty.c */ | ||||||
|  |  | ||||||
|  | /* Dumb implementation so programs will at least run.  */ | ||||||
|  |  | ||||||
|  | #include <sys/stat.h> | ||||||
|  |  | ||||||
|  | int | ||||||
|  | isatty (int fd) | ||||||
|  | { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |   return 1; | ||||||
|  | } | ||||||
							
								
								
									
										21
									
								
								libgloss/xc16x/lseek.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								libgloss/xc16x/lseek.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | #include <sys/types.h> | ||||||
|  | #include <sys/stat.h> | ||||||
|  |  | ||||||
|  |  | ||||||
|  | int | ||||||
|  | _lseek (int file, int ptr, int dir) | ||||||
|  | { | ||||||
|  |   return trap_lseek (file,(unsigned long)ptr, dir); | ||||||
|  | } | ||||||
							
								
								
									
										29
									
								
								libgloss/xc16x/mem-layout.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								libgloss/xc16x/mem-layout.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | /* Ideally this kind of stuff is specified in a linker script.  It's not clear | ||||||
|  |    what the default linker script should do, so for now we have this.  */ | ||||||
|  |  | ||||||
|  | #ifndef STACK_SIZE | ||||||
|  | /* Cache lines recycle at 4096 I think, and 4096 is listed as the page size, | ||||||
|  |    so we make the stack size a multiple of it.  Not that it's relevant or | ||||||
|  |    anything, but why not base it on *something*?  */ | ||||||
|  | #define STACK_SIZE (4096 * 4) | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | int stack_size asm ("stack_size") = STACK_SIZE; | ||||||
|  |  | ||||||
|  | #ifndef SBRK_SIZE | ||||||
|  | #define SBRK_SIZE (4096 * 32) | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | int sbrk_size asm ("sbrk_size") = SBRK_SIZE; | ||||||
							
								
								
									
										39
									
								
								libgloss/xc16x/misc.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								libgloss/xc16x/misc.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | #include <_ansi.h> | ||||||
|  | #include <sys/types.h> | ||||||
|  | #include <sys/stat.h> | ||||||
|  |  | ||||||
|  | /* _raise(), getpid(), and kill() are required by abort(). | ||||||
|  |    getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES.  */ | ||||||
|  |  | ||||||
|  | int _DEFUN(_raise,(sig), | ||||||
|  | 	   int sig) | ||||||
|  | { | ||||||
|  |   errno = ENOSYS; | ||||||
|  |   return -1; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | int _DEFUN(_getpid,(),) | ||||||
|  | { | ||||||
|  |   errno = ENOSYS; | ||||||
|  |   return -1; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | int _DEFUN(_kill,(pid, sig), | ||||||
|  | 	   int pid _AND | ||||||
|  | 	   int sig) | ||||||
|  | { | ||||||
|  |   errno = ENOSYS; | ||||||
|  |   return -1; | ||||||
|  | } | ||||||
							
								
								
									
										38
									
								
								libgloss/xc16x/open.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								libgloss/xc16x/open.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | #include<sys/types.h> | ||||||
|  | #include<sys/stat.h> | ||||||
|  | /*volatile int opensys(char *name,int flags,int perms) | ||||||
|  | { | ||||||
|  |  #ifndef __xc16xL__ | ||||||
|  |         asm volatile("push r11\n" | ||||||
|  | 		     "mov r11,r10 \n" | ||||||
|  |                      " mov r10,r9  \n" | ||||||
|  |                      " mov r9,#0x300 \n" | ||||||
|  | 		     ); | ||||||
|  |                                                                                  | ||||||
|  |   #endif | ||||||
|  |  | ||||||
|  | asm volatile("trap #5"); | ||||||
|  | #ifndef __xc16xL__ | ||||||
|  | asm volatile("pop r11"); | ||||||
|  | #endif | ||||||
|  | }*/ | ||||||
|  |  | ||||||
|  | int _open(char *name,int flags,int perms) | ||||||
|  | { | ||||||
|  |  int temp; | ||||||
|  |  | ||||||
|  |   temp=opensys(name,flags,perms);     | ||||||
|  | return temp;   | ||||||
|  | } | ||||||
							
								
								
									
										29
									
								
								libgloss/xc16x/read.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								libgloss/xc16x/read.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | #include<sys/types.h> | ||||||
|  | #include<sys/stat.h> | ||||||
|  |                                                                                  | ||||||
|  | /*int trap1(int file, unsigned long ptr,int len) | ||||||
|  | { | ||||||
|  |  asm volatile("TRAP #4"); | ||||||
|  |  | ||||||
|  | }*/ | ||||||
|  |                                                                                  | ||||||
|  | int _read(int file, char *ptr,int len) | ||||||
|  | { | ||||||
|  |  	 | ||||||
|  |  return trap1(file,(unsigned long)ptr,1); | ||||||
|  |   | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
							
								
								
									
										36
									
								
								libgloss/xc16x/sbrk.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								libgloss/xc16x/sbrk.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | #include <_ansi.h> | ||||||
|  | #include <sys/types.h> | ||||||
|  | #include <sys/stat.h> | ||||||
|  |  | ||||||
|  |  char *stack_ptr ; | ||||||
|  |  | ||||||
|  | caddr_t | ||||||
|  |   _sbrk(incr) | ||||||
|  |      int incr; | ||||||
|  | { | ||||||
|  |   extern char end;		/* Defined by the linker */ | ||||||
|  |   static char *heap_end=&end; | ||||||
|  |   char *prev_heap_end; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |   prev_heap_end = heap_end; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |   heap_end += incr; | ||||||
|  |   return (caddr_t)prev_heap_end; | ||||||
|  | } | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								libgloss/xc16x/sys/syscall.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								libgloss/xc16x/sys/syscall.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  |  | ||||||
							
								
								
									
										33
									
								
								libgloss/xc16x/syscalls.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								libgloss/xc16x/syscalls.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | #include <sys/types.h> | ||||||
|  | #include <sys/stat.h> | ||||||
|  | #include <sys/syscall.h> | ||||||
|  | #include <_ansi.h> | ||||||
|  | #include <errno.h> | ||||||
|  | #include <fcntl.h> | ||||||
|  | #include <stdarg.h> | ||||||
|  | #include <reent.h> | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | void _exit(int n) | ||||||
|  | { | ||||||
|  | asm volatile("trap #0"); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | int isatty(file) | ||||||
|  |      int file; | ||||||
|  | { | ||||||
|  |   return 1; | ||||||
|  | } | ||||||
							
								
								
									
										67
									
								
								libgloss/xc16x/trap_handle.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								libgloss/xc16x/trap_handle.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | int trap0(int file, unsigned long ptr,int len) | ||||||
|  | { | ||||||
|  | asm volatile("TRAP #3"); | ||||||
|  | return len; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | int trap1(int file, unsigned long ptr,int len) | ||||||
|  | { | ||||||
|  |  asm volatile("TRAP #4"); | ||||||
|  |                                                                                  | ||||||
|  | } | ||||||
|  |                                                                                  | ||||||
|  | int trap_lseek(int file, unsigned long ptr,int len) | ||||||
|  | { | ||||||
|  |  asm volatile("TRAP #8"); | ||||||
|  |                                                                                  | ||||||
|  | } | ||||||
|  |                                                                                  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | volatile int opensys(char *name,int flags,int perms) | ||||||
|  | { | ||||||
|  |  #ifndef __xc16xL__ | ||||||
|  |         asm volatile("push r11\n" | ||||||
|  |                      "mov r11,r10 \n" | ||||||
|  |                      " mov r10,r9  \n" | ||||||
|  |                      " mov r9,#0x300 \n" | ||||||
|  |                      ); | ||||||
|  |                                                                                  | ||||||
|  |   #endif | ||||||
|  |                                                                                  | ||||||
|  | asm volatile("trap #5"); | ||||||
|  | #ifndef __xc16xL__ | ||||||
|  | asm volatile("pop r11"); | ||||||
|  | #endif | ||||||
|  | } | ||||||
|  |                                                                                  | ||||||
|  | volatile int creatsys(char *name,int perms) | ||||||
|  | { | ||||||
|  |  #ifndef __xc16xL__ | ||||||
|  |         asm volatile("push r10\n" | ||||||
|  |                      " mov r10,r9  \n" | ||||||
|  |                      " mov r9,#0x300 \n" | ||||||
|  |                      ); | ||||||
|  |                                                                                  | ||||||
|  |   #endif | ||||||
|  |                                                                                  | ||||||
|  | asm volatile("trap #7"); | ||||||
|  | #ifndef __xc16xL__ | ||||||
|  | asm volatile("pop r10"); | ||||||
|  | #endif | ||||||
|  | } | ||||||
|  |                                                                                  | ||||||
|  |  | ||||||
							
								
								
									
										25
									
								
								libgloss/xc16x/write.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								libgloss/xc16x/write.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (C) 2006 KPIT Cummins | ||||||
|  |  * Copyright (C) 2009 Conny Marco Menebröcker | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * Redistribution and use in source and binary forms is permitted | ||||||
|  |  * provided that the above copyright notice and following paragraph are | ||||||
|  |  * duplicated in all such forms. | ||||||
|  |  * | ||||||
|  |  * This file is distributed WITHOUT ANY WARRANTY; without even the implied | ||||||
|  |  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||||||
|  |  */ | ||||||
|  | #include<sys/types.h> | ||||||
|  | #include<sys/stat.h> | ||||||
|  |  | ||||||
|  | /*int trap0(int file, unsigned long ptr,int len) | ||||||
|  | { | ||||||
|  | asm volatile("TRAP #3"); | ||||||
|  | return len; | ||||||
|  | } | ||||||
|  | */ | ||||||
|  | int _write(int file, char *ptr,int len) | ||||||
|  | { | ||||||
|  |  return trap0(file,(unsigned long)ptr,len); | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user