public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] newlib: drop support for decstation & sunos systems
@ 2022-02-14  0:23 Mike Frysinger
  2022-02-15 13:39 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2022-02-14  0:23 UTC (permalink / raw)
  To: newlib

These targets don't actually cross-compile -- they try to pull some
objects out of the host's /lib/libc.a, /lib/libm.a, and /lib/crt0.o
directly and merge them into newlib's own libraries.  This is hard
to keep working and impossible to test.  Considering the vintage of
such targets, and gcc dropping them many many years ago, drop them
from newlib too.  This will make cleaning up the build a lot easier.
---
 newlib/configure.host                    |  11 -
 newlib/libc/configure                    |   9 -
 newlib/libc/configure.ac                 |   3 -
 newlib/libc/sys/decstation/Makefile.am   |  42 --
 newlib/libc/sys/decstation/Makefile.in   | 550 -------------------
 newlib/libc/sys/decstation/_main.c       |   6 -
 newlib/libc/sys/decstation/sys/dirent.h  |  41 --
 newlib/libc/sys/sparc64/Makefile.am      | 116 ----
 newlib/libc/sys/sparc64/Makefile.in      | 656 -----------------------
 newlib/libc/sys/sparc64/_exit.S          |  14 -
 newlib/libc/sys/sparc64/_main.c          |   6 -
 newlib/libc/sys/sparc64/cerror.S         |  29 -
 newlib/libc/sys/sparc64/closedir.c       |  54 --
 newlib/libc/sys/sparc64/creat.c          |  11 -
 newlib/libc/sys/sparc64/crt0.S           | 123 -----
 newlib/libc/sys/sparc64/dup2.S           |   9 -
 newlib/libc/sys/sparc64/execve.S         |  27 -
 newlib/libc/sys/sparc64/ieee.c           | 111 ----
 newlib/libc/sys/sparc64/isatty.c         |  17 -
 newlib/libc/sys/sparc64/lstat.S          |   5 -
 newlib/libc/sys/sparc64/opendir.c        |  76 ---
 newlib/libc/sys/sparc64/readdir.c        |  68 ---
 newlib/libc/sys/sparc64/rewinddir.c      |  45 --
 newlib/libc/sys/sparc64/sbrk.S           |  78 ---
 newlib/libc/sys/sparc64/scandir.c        | 134 -----
 newlib/libc/sys/sparc64/seekdir.c        |  48 --
 newlib/libc/sys/sparc64/sigsetjmp.S      |  77 ---
 newlib/libc/sys/sparc64/stat.S           |   9 -
 newlib/libc/sys/sparc64/sys/_timeval.h   |  30 --
 newlib/libc/sys/sparc64/sys/dirent.h     |  43 --
 newlib/libc/sys/sparc64/sys/fcntl.h      | 178 ------
 newlib/libc/sys/sparc64/sys/file.h       |   3 -
 newlib/libc/sys/sparc64/sys/stat.h       | 132 -----
 newlib/libc/sys/sparc64/sys/syscall.h    | 346 ------------
 newlib/libc/sys/sparc64/sys/syscallasm.h |  87 ---
 newlib/libc/sys/sparc64/sys/termios.h    | 122 -----
 newlib/libc/sys/sparc64/sys/utime.h      |  13 -
 newlib/libc/sys/sparc64/sys/utmp.h       |  43 --
 newlib/libc/sys/sparc64/sys/wait.h       |  43 --
 newlib/libc/sys/sparc64/telldir.c        | 125 -----
 newlib/libc/sys/sparc64/template.S       |  14 -
 newlib/libc/sys/sparc64/template_r.S     |  26 -
 newlib/libc/sys/sparc64/utime.S          |  10 -
 newlib/libc/sys/sparc64/utime2.c         |  26 -
 newlib/libc/sys/sparc64/wait.S           |  35 --
 newlib/libc/sys/sun4/Makefile.am         |  93 ----
 newlib/libc/sys/sun4/Makefile.in         | 616 ---------------------
 newlib/libc/sys/sun4/_main.c             |   6 -
 newlib/libc/sys/sun4/ieee.c              | 111 ----
 newlib/libc/sys/sun4/sys/dirent.h        |  40 --
 newlib/libc/sys/sun4/sys/file.h          |   3 -
 newlib/libc/sys/sun4/sys/termios.h       | 122 -----
 newlib/libc/sys/sun4/sys/utime.h         |  13 -
 newlib/libc/sys/sun4/sys/utmp.h          |  43 --
 newlib/libc/sys/sun4/sys/wait.h          |  43 --
 55 files changed, 4741 deletions(-)
 delete mode 100644 newlib/libc/sys/decstation/Makefile.am
 delete mode 100644 newlib/libc/sys/decstation/Makefile.in
 delete mode 100644 newlib/libc/sys/decstation/_main.c
 delete mode 100644 newlib/libc/sys/decstation/sys/dirent.h
 delete mode 100644 newlib/libc/sys/sparc64/Makefile.am
 delete mode 100644 newlib/libc/sys/sparc64/Makefile.in
 delete mode 100644 newlib/libc/sys/sparc64/_exit.S
 delete mode 100644 newlib/libc/sys/sparc64/_main.c
 delete mode 100644 newlib/libc/sys/sparc64/cerror.S
 delete mode 100644 newlib/libc/sys/sparc64/closedir.c
 delete mode 100644 newlib/libc/sys/sparc64/creat.c
 delete mode 100644 newlib/libc/sys/sparc64/crt0.S
 delete mode 100644 newlib/libc/sys/sparc64/dup2.S
 delete mode 100644 newlib/libc/sys/sparc64/execve.S
 delete mode 100644 newlib/libc/sys/sparc64/ieee.c
 delete mode 100644 newlib/libc/sys/sparc64/isatty.c
 delete mode 100644 newlib/libc/sys/sparc64/lstat.S
 delete mode 100644 newlib/libc/sys/sparc64/opendir.c
 delete mode 100644 newlib/libc/sys/sparc64/readdir.c
 delete mode 100644 newlib/libc/sys/sparc64/rewinddir.c
 delete mode 100644 newlib/libc/sys/sparc64/sbrk.S
 delete mode 100644 newlib/libc/sys/sparc64/scandir.c
 delete mode 100644 newlib/libc/sys/sparc64/seekdir.c
 delete mode 100644 newlib/libc/sys/sparc64/sigsetjmp.S
 delete mode 100644 newlib/libc/sys/sparc64/stat.S
 delete mode 100644 newlib/libc/sys/sparc64/sys/_timeval.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/dirent.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/fcntl.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/file.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/stat.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/syscall.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/syscallasm.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/termios.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/utime.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/utmp.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/wait.h
 delete mode 100644 newlib/libc/sys/sparc64/telldir.c
 delete mode 100644 newlib/libc/sys/sparc64/template.S
 delete mode 100644 newlib/libc/sys/sparc64/template_r.S
 delete mode 100644 newlib/libc/sys/sparc64/utime.S
 delete mode 100644 newlib/libc/sys/sparc64/utime2.c
 delete mode 100644 newlib/libc/sys/sparc64/wait.S
 delete mode 100644 newlib/libc/sys/sun4/Makefile.am
 delete mode 100644 newlib/libc/sys/sun4/Makefile.in
 delete mode 100644 newlib/libc/sys/sun4/_main.c
 delete mode 100644 newlib/libc/sys/sun4/ieee.c
 delete mode 100644 newlib/libc/sys/sun4/sys/dirent.h
 delete mode 100644 newlib/libc/sys/sun4/sys/file.h
 delete mode 100644 newlib/libc/sys/sun4/sys/termios.h
 delete mode 100644 newlib/libc/sys/sun4/sys/utime.h
 delete mode 100644 newlib/libc/sys/sun4/sys/utmp.h
 delete mode 100644 newlib/libc/sys/sun4/sys/wait.h

diff --git a/newlib/configure.host b/newlib/configure.host
index 3c5df5a41b6a..8344d7923cc2 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -525,9 +525,6 @@ case "${host}" in
   microblaze*-*-*)
 	machine_dir=microblaze
 	;;
-  mips*-dec-*)
-	sys_dir=decstation
-	;;
   mmix-knuth-mmixware)
 	sys_dir=mmixware
 	;;
@@ -548,14 +545,6 @@ case "${host}" in
   sh*-*)
 	sys_dir=sh
 	;;
-  sparc-sun-sunos*)
-	sys_dir=sun4
-	unix_dir=unix
-	;;
-  sparc64*)
-	sys_dir=sparc64
-	unix_dir=unix
-	;;
   spu-*-*)
 	default_newlib_io_long_long="yes"
 	default_newlib_atexit_dynamic_alloc="no"
diff --git a/newlib/libc/configure.ac b/newlib/libc/configure.ac
index d762eb938ebf..63b3c5124fff 100644
--- a/newlib/libc/configure.ac
+++ b/newlib/libc/configure.ac
@@ -118,7 +118,6 @@ if test -n "${sys_dir}"; then
     amdgcn) AC_CONFIG_FILES([sys/amdgcn/Makefile]) ;;
     arm) AC_CONFIG_FILES([sys/arm/Makefile]) ;;
     d10v) AC_CONFIG_FILES([sys/d10v/Makefile]) ;;
-    decstation) AC_CONFIG_FILES([sys/decstation/Makefile]) ;;
     epiphany) AC_CONFIG_FILES([sys/epiphany/Makefile]) ;;
     h8300hms) AC_CONFIG_FILES([sys/h8300hms/Makefile]) ;;
     h8500hms) AC_CONFIG_FILES([sys/h8500hms/Makefile]) ;;
@@ -130,8 +129,6 @@ if test -n "${sys_dir}"; then
     rdos) AC_CONFIG_FILES([sys/rdos/Makefile]) ;;
     rtems) AC_CONFIG_FILES([sys/rtems/Makefile]) ;;
     sh) AC_CONFIG_FILES([sys/sh/Makefile]) ;;
-    sparc64) AC_CONFIG_FILES([sys/sparc64/Makefile]) ;;
-    sun4) AC_CONFIG_FILES([sys/sun4/Makefile]) ;;
     sysmec) AC_CONFIG_FILES([sys/sysmec/Makefile]) ;;
     sysnec810) AC_CONFIG_FILES([sys/sysnec810/Makefile]) ;;
     sysnecv850) AC_CONFIG_FILES([sys/sysnecv850/Makefile]) ;;
diff --git a/newlib/libc/sys/decstation/Makefile.am b/newlib/libc/sys/decstation/Makefile.am
deleted file mode 100644
index 22a2fa7d7008..000000000000
--- a/newlib/libc/sys/decstation/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-AM_CCASFLAGS = $(AM_CPPFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-COPYOFILES = \
-	read.o \
-	open.o \
-	_exit.o \
-	write.o \
-	lseek.o \
-	close.o \
-	sbrk.o \
-	cerror.o \
-	fork.o \
-	isatty.o \
-	ioctl.o \
-	getpid.o \
-	time.o \
-	kill.o \
-	wait.o \
-	execve.o \
-	gettimeofday.o \
-	link.o \
-	unlink.o \
-	fstat.o \
-	times.o  \
-	getrusage.o  
-
-lib_a_SOURCES = _main.c
-lib_a_LIBADD = $(COPYOFILES)
-
-$(COPYOFILES):
-	ar x /lib/libc.a $(COPYOFILES) 
-
-all-local: crt0.o
-
-crt0.o:
-	cp /lib/crt0.o crt0.o
diff --git a/newlib/libc/sys/sparc64/Makefile.am b/newlib/libc/sys/sparc64/Makefile.am
deleted file mode 100644
index f2437ba6680c..000000000000
--- a/newlib/libc/sys/sparc64/Makefile.am
+++ /dev/null
@@ -1,116 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-AM_CCASFLAGS = $(AM_CPPFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-# _r.o is for the reentrant syscall stubs.
-
-SUFFIXES = _r.o
-
-.S_r.o:
-	$(COMPILE) -DREENT -c $< -o $@
-
-.c_r.o:
-	$(COMPILE) -DREENT -c $< -o $@
-
-# We no longer copy files out of /lib/libc.a.  This is kept around until
-# most of them have replacements.
-#
-#COPYOFILES = \
-#	Ovfork.o _sigvec.o abort.o access.o chown.o creat.o \
-#	errlst.o getdents.o getdtablesize.o getpid.o \
-#	getrusage.o gettimeofday.o ieee_globals.o ioctl.o isatty.o \
-#	kill.o popen.o sbrk.o sigblock.o sigpause.o sigsetmask.o \
-#	sigtramp.o sigvec.o sleep.o setitimer.o start_float.o \
-#	time.o times.o utime.o utimes.o wait3.o
-COPYOFILES =
-
-# These files are from Sun's libc.a but must be renamed because they
-# conflict with other library .o's. They are renamed to xxxS.o.
-# div.o is used by times.o. errno.o conflicts with libc/errno/errno.o.
-#COPYRENAMEOFILES = divS.o errnoS.o
-COPYRENAMEOFILES =
-
-#COPYOMFILES = ieee_flags.o
-COPYOMFILES =
-
-# CFILES_R, SFILES_R, and TEMPLATE_SFILES_R define those system calls that are
-# needed by the ANSI C part of newlib (and thus we must provide namespace
-# clean versions of them because we define REENTRANT_SYSCALLS_PROVIDED).
-
-CFILES = _main.c ieee.c \
-	closedir.c opendir.c readdir.c rewinddir.c scandir.c seekdir.c \
-	telldir.c \
-	creat.c isatty.c utime2.c
-
-CFILES_R =
-
-SFILES = cerror.S crt0.S dup2.S execve.S _exit.S sigsetjmp.S utime.S
-
-SFILES_R = sbrk.S wait.S
-
-# List of files built from template.S (with an '_' suffix).
-
-TEMPLATE_SFILES = access_ chdir_ chmod_ chown_ dup_ fcntl_ \
-	lstat_ mkdir_ pipe_ rmdir_ times_ umask_ utimes_
-
-TEMPLATE_SFILES_R = close_ fork_ fstat_ getpid_ gettimeofday_ kill_ \
-	link_ lseek_ open_ read_ stat_ times_ unlink_ wait4_ write_
-
-OFILES = $(COPYOFILES) $(COPYRENAMEOFILES) $(COPYOMFILES) \
-	$(SFILES:.S=.o) $(SFILES_R:.S=.o) $(SFILES_R:.S=_r.o) \
-	$(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) $(TEMPLATE_SFILES_R:_=_r.o) \
-	$(CFILES:.c=.o) $(CFILES_R:.c=.o) $(CFILES_R:.c=_r.o)
-
-lib_a_SOURCES = $(SFILES) $(SFILES_R) $(CFILES) $(CFILES_R)
-lib_a_LIBADD = $(COPYOFILES) $(COPYRENAMEOFILES) $(COPYOMFILES) \
-	$(SFILES_R:.S=_r.o) \
-	$(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) \
-	$(TEMPLATE_SFILES_R:_=_r.o) \
-	$(CFILES_R:.c=_r.o)
-
-$(COPYOFILES):
-	$(AR) x /lib/libc.a $(COPYOFILES) 
-
-$(COPYRENAMEOFILES):
-	$(AR) x /lib/libc.a $(COPYRENAMEOFILES:S.o=.o) 
-	for f in $(COPYRENAMEOFILES); do mv `basename $$f S.o`.o $$f; done
-
-$(COPYOMFILES):
-	$(AR) x /lib/libm.a $(COPYOMFILES) 
-
-stamp-srcs: Makefile template.S template_r.S
-	for f in $(TEMPLATE_SFILES:_=);	do \
-	  $(COMPILE) -E -Dfunc=$$f $(srcdir)/template.S >$$f.S; \
-	done
-	for f in $(TEMPLATE_SFILES_R:_=); do \
-	  $(COMPILE) -E -Dfunc=$$f $(srcdir)/template_r.S | sed -e 's/^_/#/' >$$f.S; \
-	done
-	touch stamp-srcs
-
-# Make a dependency for each file built from a template.
-
-$(TEMPLATE_SFILES:_=.S) $(TEMPLATE_SFILES_R:_=.S): stamp-srcs
-
-all-local: crt0.o
-
-close_r.o: close.S
-fork_r.o: fork.S
-fstat_r.o: fstat.S
-getpid_r.o: getpid.S
-gettimeofday_r.o: gettimeofday.S
-kill_r.o: kill.S
-link_r.o: link.S
-lseek_r.o: lseek.S
-open_r.o: open.S
-read_r.o: read.S
-sbrk_r.o: sbrk.S
-stat_r.o: stat.S
-times_r.o: times.S
-unlink_r.o: unlink.S
-wait_r.o: wait.S
-wait4_r.o: wait4.S
-write_r.o: write.S
diff --git a/newlib/libc/sys/sun4/Makefile.am b/newlib/libc/sys/sun4/Makefile.am
deleted file mode 100644
index 13f4745b09ff..000000000000
--- a/newlib/libc/sys/sun4/Makefile.am
+++ /dev/null
@@ -1,93 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-AM_CCASFLAGS = $(AM_CPPFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-COPYOFILES = \
-	Ovfork.o \
-	_exit.o \
-	_sigvec.o \
-	abort.o \
-	access.o \
-	cerror.o \
-	chmod.o \
-	chown.o \
-	close.o \
-	creat.o \
-	dup.o \
-	dup2.o \
-	errlst.o \
-	execl.o \
-	execle.o \
-	execv.o \
-	execve.o \
-	execvp.o \
-	fork.o \
-	fstat.o \
-	getdtablesize.o \
-	getpid.o \
-	getrusage.o  \
-	gettimeofday.o \
-	ieee_globals.o \
-	ioctl.o \
-	isatty.o \
-	kill.o \
-	link.o \
-	lseek.o \
-	open.o \
-	pipe.o \
-	popen.o \
-	read.o \
-	sbrk.o \
-	setitimer.o \
-	sigblock.o \
-	signal.o \
-	sigpause.o \
-	sigsetjmp.o \
-	sigsetmask.o \
-	sigtramp.o \
-	sigvec.o \
-	sleep.o \
-	start_float.o \
-	stat.o \
-	time.o \
-	times.o \
-	umask.o \
-	unlink.o \
-	utime.o \
-	utimes.o \
-	wait.o \
-	wait3.o \
-	wait4.o \
-	write.o \
-	rem.o \
-	multiply.o \
-	umultiply.o
-
-# These files are from Sun's libc.a, but the must be renamed because they
-# conflict with other library .o's.  They are renamed to xxxS.o.
-COPYRENAMEOFILES = divS.o
-
-COPYOMFILES = ieee_flags.o
-
-lib_a_SOURCES = _main.c ieee.c
-lib_a_LIBADD = $(COPYOFILES) $(COPYOMFILES) $(COPYRENAMEOFILES)
-lib_a_CFLAGS = $(AM_CFLAGS)
-
-$(COPYOFILES):
-	$(AR) x /lib/libc.a $(COPYOFILES) 
-
-$(COPYRENAMEOFILES):
-	$(AR) x /lib/libc.a $(COPYRENAMEFILES:S.o=.o)
-	for f in $(COPYRENAMEOFILES); do mv `basename $$f S.o`.o $$f; done
-
-$(COPYOMFILES):
-	$(AR) x /lib/libm.a $(COPYOMFILES) 
-
-all-local: crt0.o
-
-crt0.o:
-	cp /lib/crt0.o crt0.o
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] newlib: drop support for decstation & sunos systems
  2022-02-14  0:23 [PATCH] newlib: drop support for decstation & sunos systems Mike Frysinger
@ 2022-02-15 13:39 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2022-02-15 13:39 UTC (permalink / raw)
  To: newlib

On Feb 13 19:23, Mike Frysinger wrote:
> These targets don't actually cross-compile -- they try to pull some
> objects out of the host's /lib/libc.a, /lib/libm.a, and /lib/crt0.o
> directly and merge them into newlib's own libraries.  This is hard
> to keep working and impossible to test.  Considering the vintage of
> such targets, and gcc dropping them many many years ago, drop them
> from newlib too.  This will make cleaning up the build a lot easier.

ACK


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-15 13:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14  0:23 [PATCH] newlib: drop support for decstation & sunos systems Mike Frysinger
2022-02-15 13:39 ` Corinna Vinschen

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