public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libgloss: csky: clean up unused m68k logic
@ 2022-02-09  5:16 Mike Frysinger
  2022-02-09  7:39 ` [PATCH] libgloss: merge csky configure script up a level Mike Frysinger
  2022-02-10 15:02 ` [PATCH] libgloss: csky: clean up unused m68k logic Corinna Vinschen
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Frysinger @ 2022-02-09  5:16 UTC (permalink / raw)
  To: newlib

It looks like csky was created by copying & pasting the m68k port,
but m68k-specific stuff was left over related to target selection.
The makefile doesn't do anything with it, so punt it all to make
the file much simpler.
---
 libgloss/csky/Makefile.in  |    6 +-
 libgloss/csky/configure    | 1033 +-----------------------------------
 libgloss/csky/configure.ac |   21 -
 3 files changed, 2 insertions(+), 1058 deletions(-)

diff --git a/libgloss/csky/Makefile.in b/libgloss/csky/Makefile.in
index b0af7d653891..911dd40add39 100644
--- a/libgloss/csky/Makefile.in
+++ b/libgloss/csky/Makefile.in
@@ -61,8 +61,6 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
 	then echo ${objroot}/../binutils/objcopy ; \
 	else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
 
-DO = @DO@
-
 CRT0=crt0.S
 
 #
@@ -101,12 +99,10 @@ crt0.o: $(CRT0)
 	$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) -c $< -o $@
 
 .PHONY: install info dvi doc install-info clean-info
-install:: $(DO:%=install_%) crt0.o
+install:: install_hosted crt0.o
 	${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
 	$(INSTALL_PROGRAM) crt0.o $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(crt0.o)
 
-$(DO:%=install_%): install_hosted
-
 .PHONY:install_hosted
 install_hosted::
 	${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
diff --git a/libgloss/csky/configure.ac b/libgloss/csky/configure.ac
index bb9a9195df97..ad29287ecf64 100644
--- a/libgloss/csky/configure.ac
+++ b/libgloss/csky/configure.ac
@@ -30,27 +30,6 @@ AC_SUBST(LD)
 AC_PROG_RANLIB
 LIB_AM_PROG_AS
 
-AC_MSG_CHECKING([target cpu family])
-DO=csky
-dnl Temporarily modify LDFLAGS so that link tests will succeed without
-dnl a C library.  Note that we may not have a C librabry yet and that
-dnl autoconf automatically adds script to check whether we can create
-dnl an executable or not.
-dnl
-saved_LDFLAGS="$LDFLAGS"
-LDFLAGS="-nostdlib -e main"
-AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mcoldfire__
-		#error we are not coldfire
-		#endif])],
-	       DO="cf",)
-AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mfido__
-		#error we are not fido
-		#endif])],
-	       DO="fido",)
-LDFLAGS=$saved_LDFLAGS
-AC_MSG_RESULT($DO)
-AC_SUBST(DO)
-     
 host_makefile_frag=${srcdir}/../config/default.mh
 target_makefile_frag=${srcdir}/../config/default.mt
 
-- 
2.34.1


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

* [PATCH] libgloss: merge csky configure script up a level
  2022-02-09  5:16 [PATCH] libgloss: csky: clean up unused m68k logic Mike Frysinger
@ 2022-02-09  7:39 ` Mike Frysinger
  2022-02-10 15:02 ` [PATCH] libgloss: csky: clean up unused m68k logic Corinna Vinschen
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2022-02-09  7:39 UTC (permalink / raw)
  To: newlib

Now that the csky-specific logic ($DO) has been deleted, we can fold
it up a level easily enough.
---
 libgloss/Makefile.in       |   16 +-
 libgloss/configure         |    5 +-
 libgloss/configure.ac      |    3 +-
 libgloss/csky/Makefile.in  |    9 +-
 libgloss/csky/aclocal.m4   |  384 ----
 libgloss/csky/configure    | 3932 ------------------------------------
 libgloss/csky/configure.ac |   50 -
 7 files changed, 17 insertions(+), 4382 deletions(-)
 delete mode 100644 libgloss/csky/aclocal.m4
 delete mode 100755 libgloss/csky/configure
 delete mode 100644 libgloss/csky/configure.ac

diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 7c50e73bd5e7..45915e7e2c99 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -42,7 +42,8 @@ case "${target}" in
 	subdirs="$subdirs arc"
 	;;
   csky*-*-*)
-	AC_CONFIG_SUBDIRS(csky)
+	AC_CONFIG_FILES([csky/Makefile])
+	subdirs="$subdirs csky"
 	;;
   epiphany-*-*)
 	AC_CONFIG_FILES([epiphany/Makefile])
diff --git a/libgloss/csky/Makefile.in b/libgloss/csky/Makefile.in
index 911dd40add39..ebf7ef2cd47e 100644
--- a/libgloss/csky/Makefile.in
+++ b/libgloss/csky/Makefile.in
@@ -115,14 +115,11 @@ clean mostlyclean:
 	rm -f a.out core *.i *~ *.a *.o *-test *.srec *.dis *.x *.map
 
 distclean maintainer-clean realclean: clean
-	rm -f Makefile config.cache config.log config.status
+	rm -f Makefile
 
 info dvi doc:
 install-info:
 clean-info:
 
-Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
-	$(SHELL) config.status
-
-config.status: configure
-	$(SHELL) config.status --recheck
+Makefile: Makefile.in ../config.status
+	cd .. && $(SHELL) config.status
diff --git a/libgloss/csky/configure.ac b/libgloss/csky/configure.ac
deleted file mode 100644
index ad29287ecf64..000000000000
--- a/libgloss/csky/configure.ac
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (c) 1995, 1996 Cygnus Support
-#
-# 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.
-#
-# process this file with autoconf to produce a configure script.
-AC_INIT(crt0.S)
-
-AC_CONFIG_AUX_DIR(../..)
-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/default.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)
-
-AM_ENABLE_MULTILIB(, ../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-- 
2.34.1


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

* Re: [PATCH] libgloss: csky: clean up unused m68k logic
  2022-02-09  5:16 [PATCH] libgloss: csky: clean up unused m68k logic Mike Frysinger
  2022-02-09  7:39 ` [PATCH] libgloss: merge csky configure script up a level Mike Frysinger
@ 2022-02-10 15:02 ` Corinna Vinschen
  1 sibling, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2022-02-10 15:02 UTC (permalink / raw)
  To: newlib

On Feb  9 00:16, Mike Frysinger wrote:
> It looks like csky was created by copying & pasting the m68k port,
> but m68k-specific stuff was left over related to target selection.
> The makefile doesn't do anything with it, so punt it all to make
> the file much simpler.
> ---
>  libgloss/csky/Makefile.in  |    6 +-
>  libgloss/csky/configure    | 1033 +-----------------------------------
>  libgloss/csky/configure.ac |   21 -
>  3 files changed, 2 insertions(+), 1058 deletions(-)

The csky patches lgtm.


Thanks,
Corinna


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09  5:16 [PATCH] libgloss: csky: clean up unused m68k logic Mike Frysinger
2022-02-09  7:39 ` [PATCH] libgloss: merge csky configure script up a level Mike Frysinger
2022-02-10 15:02 ` [PATCH] libgloss: csky: clean up unused m68k logic 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).