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 30f244155b
("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.
This commit is contained in:
Mike Frysinger 2023-12-29 21:29:44 -05:00
parent 2f0cd375f3
commit 40b1b5c7a9
21 changed files with 2 additions and 645 deletions

View File

@ -481,8 +481,8 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = m68hc11/Makefile m68k/Makefile pa/Makefile \ CONFIG_CLEAN_FILES = m68hc11/Makefile m68k/Makefile pa/Makefile \
mips/Makefile rs6000/Makefile cr16/Makefile cris/Makefile \ mips/Makefile rs6000/Makefile cr16/Makefile cris/Makefile \
crx/Makefile mep/Makefile mt/Makefile xc16x/Makefile \ crx/Makefile mep/Makefile mt/Makefile m32c/Makefile \
m32c/Makefile spu/Makefile pru/Makefile sparc/libsys/Makefile spu/Makefile pru/Makefile sparc/libsys/Makefile
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \ 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 $@ cd $(top_builddir) && $(SHELL) ./config.status $@
mt/Makefile: $(top_builddir)/config.status $(top_srcdir)/mt/Makefile.in mt/Makefile: $(top_builddir)/config.status $(top_srcdir)/mt/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@ 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 m32c/Makefile: $(top_builddir)/config.status $(top_srcdir)/m32c/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@ cd $(top_builddir) && $(SHELL) ./config.status $@
spu/Makefile: $(top_builddir)/config.status $(top_srcdir)/spu/Makefile.in spu/Makefile: $(top_builddir)/config.status $(top_srcdir)/spu/Makefile.in

View File

@ -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.

7
libgloss/configure vendored
View File

@ -2946,12 +2946,6 @@ case "${target}" in
config_visium=true config_visium=true
config_testsuite=false config_testsuite=false
;; ;;
xc16x-*-*)
ac_config_files="$ac_config_files xc16x/Makefile"
subdirs="$subdirs xc16x"
target_makefile_frag=${srcdir}/config/xc16x.mt
;;
xstormy16-*-*) xstormy16-*-*)
config_xstormy16=true config_xstormy16=true
;; ;;
@ -6599,7 +6593,6 @@ do
"crx/Makefile") CONFIG_FILES="$CONFIG_FILES crx/Makefile" ;; "crx/Makefile") CONFIG_FILES="$CONFIG_FILES crx/Makefile" ;;
"mep/Makefile") CONFIG_FILES="$CONFIG_FILES mep/Makefile" ;; "mep/Makefile") CONFIG_FILES="$CONFIG_FILES mep/Makefile" ;;
"mt/Makefile") CONFIG_FILES="$CONFIG_FILES mt/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" ;; "m32c/Makefile") CONFIG_FILES="$CONFIG_FILES m32c/Makefile" ;;
"spu/Makefile") CONFIG_FILES="$CONFIG_FILES spu/Makefile" ;; "spu/Makefile") CONFIG_FILES="$CONFIG_FILES spu/Makefile" ;;
"pru/Makefile") CONFIG_FILES="$CONFIG_FILES pru/Makefile" ;; "pru/Makefile") CONFIG_FILES="$CONFIG_FILES pru/Makefile" ;;

View File

@ -166,11 +166,6 @@ case "${target}" in
config_visium=true config_visium=true
config_testsuite=false config_testsuite=false
;; ;;
xc16x-*-*)
AC_CONFIG_FILES([xc16x/Makefile])
subdirs="$subdirs xc16x"
target_makefile_frag=${srcdir}/config/xc16x.mt
;;
xstormy16-*-*) xstormy16-*-*)
config_xstormy16=true config_xstormy16=true
;; ;;

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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

View File

@ -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");
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -1 +0,0 @@

View File

@ -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;
}

View File

@ -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
}

View File

@ -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);
}