public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] libgloss: xc16x: drop old stub port
@ 2024-01-20  3:47 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2024-01-20  3:47 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=40b1b5c7a95dd7bf8b729420cec6e3c48dea204e

commit 40b1b5c7a95dd7bf8b729420cec6e3c48dea204e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Fri Dec 29 21:29:44 2023 -0500

    libgloss: xc16x: drop old stub port
    
    First off, afaict, xc16x support has never been merged into gcc.
    Upstream merge isn't strictly required for new ports, but it seems
    like people should merge eventually in some shape, and considering
    the libgloss port was merged in 2009, ~14 years seems like plenty
    of leeway.  Which is to say, no one else can seem to build this
    which makes updating & testing things very difficult.
    
    Ignoring that, from what I can tell, this port has only ever built
    and installed a crt0.o file.  It defines libeval.a & libcygmon.a
    targets, but nothing depends on them.  The SCRIPTS & BSP variables
    are always empty.  The original port merge define these in the
    configure script as substitutes, but never set the vars, so they
    were always replaced with nothing.
    
    I actually broke this build 2 years ago when merging the configure
    up a level in commit 30f244155b8e82aa948ddcb8f2350654fc1adb92
    ("libgloss: merge subdirs that have unique makefile_frags up a
    level").  I saw that it was exporting a bunch of vars in the
    configure script, but never set them, so I incorrectly assumed
    they weren't used.  Which means the Makefile has been setting them
    to invalid values like literal @bsp_list@ and @script_list@.
    
    Considering no one has complained, I have to assume no one cares
    about this port, and we can all stop wasting time on it.

Diff:
---
 libgloss/Makefile.in         |   6 +-
 libgloss/config/xc16x.mt     |   3 -
 libgloss/configure           |   7 ---
 libgloss/configure.ac        |   5 --
 libgloss/xc16x/Makefile.in   | 145 -------------------------------------------
 libgloss/xc16x/close.S       |  20 ------
 libgloss/xc16x/create.c      |  39 ------------
 libgloss/xc16x/crt0.S        |  41 ------------
 libgloss/xc16x/fstat.S       |  20 ------
 libgloss/xc16x/getchar1.c    |  19 ------
 libgloss/xc16x/isatty.c      |  26 --------
 libgloss/xc16x/lseek.c       |  21 -------
 libgloss/xc16x/mem-layout.c  |  29 ---------
 libgloss/xc16x/misc.c        |  37 -----------
 libgloss/xc16x/open.c        |  38 ------------
 libgloss/xc16x/read.c        |  29 ---------
 libgloss/xc16x/sbrk.c        |  36 -----------
 libgloss/xc16x/sys/syscall.h |   1 -
 libgloss/xc16x/syscalls.c    |  33 ----------
 libgloss/xc16x/trap_handle.c |  67 --------------------
 libgloss/xc16x/write.c       |  25 --------
 21 files changed, 2 insertions(+), 645 deletions(-)

diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in
index c4d931dea..9b845538a 100644
--- a/libgloss/Makefile.in
+++ b/libgloss/Makefile.in
@@ -481,8 +481,8 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES = m68hc11/Makefile m68k/Makefile pa/Makefile \
 	mips/Makefile rs6000/Makefile cr16/Makefile cris/Makefile \
-	crx/Makefile mep/Makefile mt/Makefile xc16x/Makefile \
-	m32c/Makefile spu/Makefile pru/Makefile sparc/libsys/Makefile
+	crx/Makefile mep/Makefile mt/Makefile m32c/Makefile \
+	spu/Makefile pru/Makefile sparc/libsys/Makefile
 CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
@@ -2912,8 +2912,6 @@ mep/Makefile: $(top_builddir)/config.status $(top_srcdir)/mep/Makefile.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 mt/Makefile: $(top_builddir)/config.status $(top_srcdir)/mt/Makefile.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
-xc16x/Makefile: $(top_builddir)/config.status $(top_srcdir)/xc16x/Makefile.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
 m32c/Makefile: $(top_builddir)/config.status $(top_srcdir)/m32c/Makefile.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 spu/Makefile: $(top_builddir)/config.status $(top_srcdir)/spu/Makefile.in
diff --git a/libgloss/config/xc16x.mt b/libgloss/config/xc16x.mt
deleted file mode 100644
index 2ac79cebc..000000000
--- a/libgloss/config/xc16x.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Dummy target-specific Makefile fragment for XC16X.  We can't
-# use default.mt because it refers to generic source files whose
-# names conflict with the XC16X-specific sources.
diff --git a/libgloss/configure b/libgloss/configure
index c58633244..fd5d9416b 100755
--- a/libgloss/configure
+++ b/libgloss/configure
@@ -2946,12 +2946,6 @@ case "${target}" in
 	config_visium=true
 	config_testsuite=false
 	;;
-  xc16x-*-*)
-	ac_config_files="$ac_config_files xc16x/Makefile"
-
-	subdirs="$subdirs xc16x"
-	target_makefile_frag=${srcdir}/config/xc16x.mt
-	;;
   xstormy16-*-*)
 	config_xstormy16=true
 	;;
@@ -6599,7 +6593,6 @@ do
     "crx/Makefile") CONFIG_FILES="$CONFIG_FILES crx/Makefile" ;;
     "mep/Makefile") CONFIG_FILES="$CONFIG_FILES mep/Makefile" ;;
     "mt/Makefile") CONFIG_FILES="$CONFIG_FILES mt/Makefile" ;;
-    "xc16x/Makefile") CONFIG_FILES="$CONFIG_FILES xc16x/Makefile" ;;
     "m32c/Makefile") CONFIG_FILES="$CONFIG_FILES m32c/Makefile" ;;
     "spu/Makefile") CONFIG_FILES="$CONFIG_FILES spu/Makefile" ;;
     "pru/Makefile") CONFIG_FILES="$CONFIG_FILES pru/Makefile" ;;
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 17e98a2fa..55f4261d1 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -166,11 +166,6 @@ case "${target}" in
 	config_visium=true
 	config_testsuite=false
 	;;
-  xc16x-*-*)
-	AC_CONFIG_FILES([xc16x/Makefile])
-	subdirs="$subdirs xc16x"
-	target_makefile_frag=${srcdir}/config/xc16x.mt
-	;;
   xstormy16-*-*)
 	config_xstormy16=true
 	;;
diff --git a/libgloss/xc16x/Makefile.in b/libgloss/xc16x/Makefile.in
deleted file mode 100644
index 5e2584e00..000000000
--- a/libgloss/xc16x/Makefile.in
+++ /dev/null
@@ -1,145 +0,0 @@
-#
-# 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
-
-mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs
-
-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
-
-# 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 \
-    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} ${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} $@
-
-
-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:
-	${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
-	@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:
-
-# these are for the BSPs
-crt0.o: ${srcdir}/crt0.S
-
-# target specific makefile fragment comes in here.
-@target_makefile_frag@
-
-Makefile: Makefile.in ../config.status
-	cd .. && $(SHELL) config.status
diff --git a/libgloss/xc16x/close.S b/libgloss/xc16x/close.S
deleted file mode 100644
index 9b2f76f8d..000000000
--- a/libgloss/xc16x/close.S
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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
diff --git a/libgloss/xc16x/create.c b/libgloss/xc16x/create.c
deleted file mode 100644
index 33f4e0b20..000000000
--- a/libgloss/xc16x/create.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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;  
-}
diff --git a/libgloss/xc16x/crt0.S b/libgloss/xc16x/crt0.S
deleted file mode 100644
index 0186f4740..000000000
--- a/libgloss/xc16x/crt0.S
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
diff --git a/libgloss/xc16x/fstat.S b/libgloss/xc16x/fstat.S
deleted file mode 100644
index 292303e3b..000000000
--- a/libgloss/xc16x/fstat.S
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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
diff --git a/libgloss/xc16x/getchar1.c b/libgloss/xc16x/getchar1.c
deleted file mode 100644
index 4ba5959c4..000000000
--- a/libgloss/xc16x/getchar1.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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");
-                                                                                
-}
-
diff --git a/libgloss/xc16x/isatty.c b/libgloss/xc16x/isatty.c
deleted file mode 100644
index 30e6a5327..000000000
--- a/libgloss/xc16x/isatty.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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;
-}
diff --git a/libgloss/xc16x/lseek.c b/libgloss/xc16x/lseek.c
deleted file mode 100644
index ff3057d25..000000000
--- a/libgloss/xc16x/lseek.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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);
-}
diff --git a/libgloss/xc16x/mem-layout.c b/libgloss/xc16x/mem-layout.c
deleted file mode 100644
index 4619ed290..000000000
--- a/libgloss/xc16x/mem-layout.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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;
diff --git a/libgloss/xc16x/misc.c b/libgloss/xc16x/misc.c
deleted file mode 100644
index d96550129..000000000
--- a/libgloss/xc16x/misc.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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 _raise (int sig)
-{
-  errno = ENOSYS;
-  return -1;
-}
-
-int _getpid (void)
-{
-  errno = ENOSYS;
-  return -1;
-}
-
-int _kill (int pid,
-	   int sig)
-{
-  errno = ENOSYS;
-  return -1;
-}
diff --git a/libgloss/xc16x/open.c b/libgloss/xc16x/open.c
deleted file mode 100644
index 4dd0d070d..000000000
--- a/libgloss/xc16x/open.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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;  
-}
diff --git a/libgloss/xc16x/read.c b/libgloss/xc16x/read.c
deleted file mode 100644
index b117af946..000000000
--- a/libgloss/xc16x/read.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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);
- 
-}
-
-
diff --git a/libgloss/xc16x/sbrk.c b/libgloss/xc16x/sbrk.c
deleted file mode 100644
index deb2df26c..000000000
--- a/libgloss/xc16x/sbrk.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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;
-}
-
diff --git a/libgloss/xc16x/sys/syscall.h b/libgloss/xc16x/sys/syscall.h
deleted file mode 100644
index 8b1378917..000000000
--- a/libgloss/xc16x/sys/syscall.h
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/libgloss/xc16x/syscalls.c b/libgloss/xc16x/syscalls.c
deleted file mode 100644
index 03b6368cb..000000000
--- a/libgloss/xc16x/syscalls.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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;
-}
diff --git a/libgloss/xc16x/trap_handle.c b/libgloss/xc16x/trap_handle.c
deleted file mode 100644
index 899cdc20d..000000000
--- a/libgloss/xc16x/trap_handle.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
-}
-                                                                                
-
diff --git a/libgloss/xc16x/write.c b/libgloss/xc16x/write.c
deleted file mode 100644
index 10b1b556a..000000000
--- a/libgloss/xc16x/write.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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);
-}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-20  3:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-20  3:47 [newlib-cygwin/main] libgloss: xc16x: drop old stub port Michael Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).