* [PATCH 1/2] libgloss: ft32: delete unused/invalid assembly file
@ 2023-12-29 5:21 Mike Frysinger
2023-12-29 5:21 ` [PATCH 2/2] libgloss: merge ft32 into top-level Makefile Mike Frysinger
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2023-12-29 5:21 UTC (permalink / raw)
To: newlib
This is a .c file, not assembly, and it's a duplicate (same content)
as the existing sim-lseek.c. Delete it since it's unused and doesn't
actually compile.
---
libgloss/ft32/sim-lseek.S | 31 -------------------------------
1 file changed, 31 deletions(-)
delete mode 100644 libgloss/ft32/sim-lseek.S
diff --git a/libgloss/ft32/sim-lseek.S b/libgloss/ft32/sim-lseek.S
deleted file mode 100644
index 488edf3dfad6..000000000000
--- a/libgloss/ft32/sim-lseek.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * sim-lseek.S -- write interface for FT32 simulator
- *
- * Copyright (C) 2015 FTDI (support@ftdichip.com)
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-
-/*
- * lseek -- Since a simulated serial port is non-seekable, we return
- * an error.
- */
-off_t
-_lseek (int fd,
- off_t offset,
- int whence)
-{
- errno = ESPIPE;
- return ((off_t)-1);
-}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] libgloss: merge ft32 into top-level Makefile
2023-12-29 5:21 [PATCH 1/2] libgloss: ft32: delete unused/invalid assembly file Mike Frysinger
@ 2023-12-29 5:21 ` Mike Frysinger
0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2023-12-29 5:21 UTC (permalink / raw)
To: newlib
Avoid a recursive make to speed things up a bit.
A ft32-elf build shows installed objects & libs produce same code.
Mention of ft32-elf-common.ld is dropped as it has never existed
in the tree, and has been an (ignored) error in the past.
---
libgloss/Makefile.am | 3 +
libgloss/Makefile.in | 458 +++++++++++++++++++++++--------------
libgloss/configure | 19 +-
libgloss/configure.ac | 5 +-
libgloss/ft32/Makefile.in | 129 -----------
libgloss/ft32/Makefile.inc | 37 +++
6 files changed, 337 insertions(+), 314 deletions(-)
delete mode 100644 libgloss/ft32/Makefile.in
create mode 100644 libgloss/ft32/Makefile.inc
diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index abd1fbbd1651..d420dd42a122 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -90,6 +90,9 @@ endif
if CONFIG_FRV
include frv/Makefile.inc
endif
+if CONFIG_FT32
+include ft32/Makefile.inc
+endif
if CONFIG_I386
include i386/Makefile.inc
endif
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 30f4eea61d4f..ef368888107d 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -139,8 +139,7 @@ case "${target}" in
config_frv=true
;;
ft32*-*-*)
- AC_CONFIG_FILES([ft32/Makefile])
- subdirs="$subdirs ft32"
+ config_ft32=true
;;
lm32*-*-*)
config_lm32=true
@@ -229,7 +228,7 @@ AC_SUBST(subdirs)
dnl These subdirs have converted to non-recursive make. Hopefully someday all
dnl the ports above will too!
m4_foreach_w([SUBDIR], [
- aarch64 arc arm bfin csky d30v epiphany fr30 frv i386 i960 iq2000
+ aarch64 arc arm bfin csky d30v epiphany fr30 frv ft32 i386 i960 iq2000
libnosys lm32
m32r mcore mn10200 mn10300 moxie msp430
nds32 nios2 or1k riscv rl78 rx v850 visium wince xstormy16 xtensa
diff --git a/libgloss/ft32/Makefile.in b/libgloss/ft32/Makefile.in
deleted file mode 100644
index 4fa84e3fb860..000000000000
--- a/libgloss/ft32/Makefile.in
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright (C) 2015 FTDI (support@ftdichip.com)
-#
-# The authors hereby grant permission to use, copy, modify, distribute,
-# and license this software and its documentation for any purpose, provided
-# that existing copyright notices are retained in all copies and that this
-# notice is included verbatim in any distributions. No written agreement,
-# license, or royalty fee is required for any of the authorized uses.
-# Modifications to this software may be copyrighted by their authors
-# and need not follow the licensing terms described here, provided that
-# the new terms are clearly indicated on the first page of each file where
-# they apply.
-
-# Makefile for libgloss/spro. This is the board support code for the
-# ft32 target.
-
-DESTDIR =
-VPATH = @srcdir@ @srcdir@/..
-srcdir = @srcdir@
-objdir = .
-srcroot = $(srcdir)/../..
-objroot = $(objdir)/../..
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-host_alias = @host_alias@
-target_alias = @target_alias@
-
-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@
-AR = @AR@
-LD = @LD@
-RANLIB = @RANLIB@
-AR_FLAGS = rc
-
-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`
-
-LD_SCRIPTS = ft32-elf-common.ld sim.ld
-
-CRT0 = crt0.o
-SIM_BSP = libsim.a
-SIM_OBJS = fstat.o \
- getpid.o \
- isatty.o \
- kill.o \
- sbrk.o \
- sim-close.o \
- sim-exit.o \
- sim-inbyte.o \
- sim-lseek.o \
- sim-open.o \
- sim-read.o \
- sim-time.o \
- sim-unlink.o \
- sim-write.o \
- stat.o
-
-#### Host specific Makefile fragment comes in here.
-@host_makefile_frag@
-
-all: $(CRT0) $(SIM_BSP)
-
-$(SIM_BSP): $(SIM_OBJS)
- $(AR) $(ARFLAGS) $@ $?
- $(RANLIB) $@
-
-fstat.o: $(srcdir)/fstat.c
-getpid.o: $(srcdir)/getpid.c
-isatty.o: $(srcdir)/isatty.c
-kill.o: $(srcdir)/kill.c
-putnum.o: $(srcdir)/putnum.c
-sbrk.o: $(srcdir)/sbrk.c
-sim-close.o: $(srcdir)/sim-close.S
-sim-exit.o: $(srcdir)/sim-exit.S
-sim-inbyte.o: $(srcdir)/sim-inbyte.c
-sim-lseek.o: $(srcdir)/sim-lseek.c
-sim-open.o: $(srcdir)/sim-open.S
-sim-read.o: $(srcdir)/sim-read.S
-sim-time.o: $(srcdir)/sim-time.c
-sim-unlink.o: $(srcdir)/sim-unlink.S
-sim-write.o: $(srcdir)/sim-write.S
-stat.o: $(srcdir)/stat.c
-
-install: $($(CPU)_INSTALL)
- ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
- $(INSTALL_DATA) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
- $(INSTALL_DATA) $(SIM_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_BSP)
- for x in ${LD_SCRIPTS}; do \
- ${INSTALL_DATA} ${srcdir}/$$x $(DESTDIR)${tooldir}/lib/$$x; \
- done;
-
-clean mostlyclean:
- rm -f *.o *.a
-
-distclean maintainer-clean realclean: clean
- rm -f Makefile
-
-.PHONY: info dvi doc install-info clean-info
-info doc dvi:
-install-info:
-clean-info:
-
-Makefile: Makefile.in ../config.status
- cd .. && $(SHELL) config.status
diff --git a/libgloss/ft32/Makefile.inc b/libgloss/ft32/Makefile.inc
new file mode 100644
index 000000000000..344b109fa4b9
--- /dev/null
+++ b/libgloss/ft32/Makefile.inc
@@ -0,0 +1,37 @@
+## Copyright (C) 2015 FTDI (support@ftdichip.com)
+##
+## The authors hereby grant permission to use, copy, modify, distribute,
+## and license this software and its documentation for any purpose, provided
+## that existing copyright notices are retained in all copies and that this
+## notice is included verbatim in any distributions. No written agreement,
+## license, or royalty fee is required for any of the authorized uses.
+## Modifications to this software may be copyrighted by their authors
+## and need not follow the licensing terms described here, provided that
+## the new terms are clearly indicated on the first page of each file where
+## they apply.
+
+if !HAVE_MULTISUBDIR
+multilibtool_DATA += \
+ %D%/sim.ld
+endif
+
+multilibtool_DATA += %D%/crt0.o
+libobjs_a_SOURCES += %D%/crt0.S
+
+multilibtool_LIBRARIES += %D%/libsim.a
+%C%_libsim_a_SOURCES = \
+ %D%/fstat.c \
+ %D%/getpid.c \
+ %D%/isatty.c \
+ %D%/kill.c \
+ %D%/sbrk.c \
+ %D%/sim-close.S \
+ %D%/sim-exit.S \
+ %D%/sim-inbyte.c \
+ %D%/sim-lseek.c \
+ %D%/sim-open.S \
+ %D%/sim-read.S \
+ %D%/sim-time.c \
+ %D%/sim-unlink.S \
+ %D%/sim-write.S \
+ %D%/stat.c
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-29 5:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-29 5:21 [PATCH 1/2] libgloss: ft32: delete unused/invalid assembly file Mike Frysinger
2023-12-29 5:21 ` [PATCH 2/2] libgloss: merge ft32 into top-level Makefile Mike 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).