* [PATCH 0/8] libgloss: more merging of configure scripts
@ 2022-02-11 12:50 Mike Frysinger
2022-02-11 12:50 ` [PATCH 1/8] libgloss: i386: simplify target flags Mike Frysinger
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
More work to reduce the number of configure scripts in libgloss.
Fairly mechanical at this point. Gets us down to 8 total.
Mike Frysinger (8):
libgloss: i386: simplify target flags
libgloss: merge i386 configure script up a level
libgloss: merge moxie configure script up a level
libgloss: merge mcore configure script up a level
libgloss: m68k: switch to AC_NO_EXECUTABLES
libgloss: merge m68k configure script up a level
libgloss: merge mn10200 configure script up a level
libgloss: merge mn10300 configure script up a level
libgloss/Makefile.in | 43 +-
libgloss/configure | 136 +-
libgloss/configure.ac | 25 +-
libgloss/i386/Makefile.in | 13 +-
libgloss/i386/acinclude.m4 | 10 +
libgloss/i386/aclocal.m4 | 384 ---
libgloss/i386/configure | 3941 --------------------------
libgloss/i386/configure.ac | 59 -
libgloss/m68k/Makefile.in | 11 +-
libgloss/m68k/acinclude.m4 | 16 +
libgloss/m68k/aclocal.m4 | 384 ---
libgloss/m68k/configure | 4963 ---------------------------------
libgloss/m68k/configure.ac | 71 -
libgloss/mcore/Makefile.in | 11 +-
libgloss/mcore/acinclude.m4 | 10 +
libgloss/mcore/aclocal.m4 | 384 ---
libgloss/mcore/configure | 3938 --------------------------
libgloss/mcore/configure.ac | 45 -
libgloss/mn10200/Makefile.in | 9 +-
libgloss/mn10200/aclocal.m4 | 384 ---
libgloss/mn10200/configure | 3940 --------------------------
libgloss/mn10200/configure.ac | 58 -
libgloss/mn10300/Makefile.in | 13 +-
libgloss/mn10300/acinclude.m4 | 14 +
libgloss/mn10300/aclocal.m4 | 384 ---
libgloss/mn10300/configure | 3951 --------------------------
libgloss/mn10300/configure.ac | 67 -
libgloss/moxie/Makefile.in | 17 +-
libgloss/moxie/acinclude.m4 | 13 +
libgloss/moxie/aclocal.m4 | 384 ---
libgloss/moxie/configure | 3943 --------------------------
libgloss/moxie/configure.ac | 50 -
32 files changed, 268 insertions(+), 27403 deletions(-)
create mode 100644 libgloss/i386/acinclude.m4
delete mode 100644 libgloss/i386/aclocal.m4
delete mode 100755 libgloss/i386/configure
delete mode 100644 libgloss/i386/configure.ac
create mode 100644 libgloss/m68k/acinclude.m4
delete mode 100644 libgloss/m68k/aclocal.m4
delete mode 100755 libgloss/m68k/configure
delete mode 100644 libgloss/m68k/configure.ac
create mode 100644 libgloss/mcore/acinclude.m4
delete mode 100644 libgloss/mcore/aclocal.m4
delete mode 100755 libgloss/mcore/configure
delete mode 100644 libgloss/mcore/configure.ac
delete mode 100644 libgloss/mn10200/aclocal.m4
delete mode 100755 libgloss/mn10200/configure
delete mode 100644 libgloss/mn10200/configure.ac
create mode 100644 libgloss/mn10300/acinclude.m4
delete mode 100644 libgloss/mn10300/aclocal.m4
delete mode 100755 libgloss/mn10300/configure
delete mode 100644 libgloss/mn10300/configure.ac
create mode 100644 libgloss/moxie/acinclude.m4
delete mode 100644 libgloss/moxie/aclocal.m4
delete mode 100755 libgloss/moxie/configure
delete mode 100644 libgloss/moxie/configure.ac
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/8] libgloss: i386: simplify target flags
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
@ 2022-02-11 12:50 ` Mike Frysinger
2022-02-11 12:50 ` [PATCH 2/8] libgloss: merge i386 configure script up a level Mike Frysinger
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
Collapse these 3 settings into one variable to make it eaiser to
merge into the top-level.
---
libgloss/i386/Makefile.in | 4 ++--
libgloss/i386/configure | 13 +++++--------
libgloss/i386/configure.ac | 9 ++++-----
3 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/libgloss/i386/Makefile.in b/libgloss/i386/Makefile.in
index 5764d44b122d..4fabce42aefc 100644
--- a/libgloss/i386/Makefile.in
+++ b/libgloss/i386/Makefile.in
@@ -90,10 +90,10 @@ libcygmon.a: $(CYGMON_OBJS)
${RANLIB} $@
cygmon-salib.o: ${srcdir}/cygmon-salib.c
- $(CC) -c $(CFLAGS) @NEED_UNDERSCORE@ @IS_COFF@ @IS_AOUT@ $(<) -o $@
+ $(CC) -c $(CFLAGS) $(I386_CPPFLAGS) $(<) -o $@
cygmon-crt0.o: ${srcdir}/cygmon-crt0.S
- $(CC) -c $(CFLAGS) @NEED_UNDERSCORE@ @IS_COFF@ @IS_AOUT@ $(<) -o $@
+ $(CC) -c $(CFLAGS) $(I386_CPPFLAGS) $(<) -o $@
doc:
diff --git a/libgloss/i386/configure.ac b/libgloss/i386/configure.ac
index e03620770235..ac1518648146 100644
--- a/libgloss/i386/configure.ac
+++ b/libgloss/i386/configure.ac
@@ -21,14 +21,16 @@ AC_ARG_PROGRAM
AC_PROG_INSTALL
+I386_CPPFLAGS=
case "$target" in
*coff)
- IS_COFF="-DCOFF"
+ I386_CPPFLAGS="-DCOFF"
;;
*aout)
- IS_AOUT="-DAOUT"
+ I386_CPPFLAGS="-DAOUT"
;;
esac
+AC_SUBST(I386_CPPFLAGS)
LIB_AC_PROG_CC
AS=${AS-as}
@@ -37,9 +39,6 @@ AR=${AR-ar}
AC_SUBST(AR)
LD=${LD-ld}
AC_SUBST(LD)
-AC_SUBST(IS_COFF)
-AC_SUBST(IS_AOUT)
-AC_SUBST(NEED_UNDERSCORE)
AC_PROG_RANLIB
LIB_AM_PROG_AS
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/8] libgloss: merge i386 configure script up a level
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
2022-02-11 12:50 ` [PATCH 1/8] libgloss: i386: simplify target flags Mike Frysinger
@ 2022-02-11 12:50 ` Mike Frysinger
2022-02-11 12:50 ` [PATCH 3/8] libgloss: merge moxie " Mike Frysinger
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
Move the minor i386-specific logic to a dedicated variable so we can
merge its configure logic up a level.
---
libgloss/Makefile.in | 8 +-
libgloss/configure | 17 +-
libgloss/configure.ac | 4 +-
libgloss/i386/Makefile.in | 9 +-
libgloss/i386/acinclude.m4 | 10 +
libgloss/i386/aclocal.m4 | 384 ----
libgloss/i386/configure | 3938 ------------------------------------
libgloss/i386/configure.ac | 58 -
8 files changed, 37 insertions(+), 4391 deletions(-)
create mode 100644 libgloss/i386/acinclude.m4
delete mode 100644 libgloss/i386/aclocal.m4
delete mode 100755 libgloss/i386/configure
delete mode 100644 libgloss/i386/configure.ac
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 486492b7bf0d..20f15a88b023 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -52,7 +52,8 @@ case "${target}" in
config_testsuite=true
;;
i[[3456]]86-*-elf* | i[[3456]]86-*-coff*)
- AC_CONFIG_SUBDIRS([i386])
+ AC_CONFIG_FILES([i386/Makefile])
+ subdirs="$subdirs i386"
;;
m32r-*-*)
AC_CONFIG_FILES([m32r/Makefile])
@@ -321,6 +322,7 @@ dnl
rm -f conftest* ])
AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix", [symbol prefix])
+m4_include([i386/acinclude.m4])
m4_include([libnosys/acinclude.m4])
dnl We have to assign the same value to other variables because autoconf
diff --git a/libgloss/i386/Makefile.in b/libgloss/i386/Makefile.in
index 4fabce42aefc..7ed0b075f72e 100644
--- a/libgloss/i386/Makefile.in
+++ b/libgloss/i386/Makefile.in
@@ -101,7 +101,7 @@ 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
+ rm -f Makefile a.out
.PHONY: install info install-info clean-info
install:
@@ -123,8 +123,5 @@ test.o: ${srcdir}/test.c
# these are for the BSPs
${CRT0}: cygmon-crt0.S
-Makefile: Makefile.in config.status @host_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/i386/acinclude.m4 b/libgloss/i386/acinclude.m4
new file mode 100644
index 000000000000..75bca476d18a
--- /dev/null
+++ b/libgloss/i386/acinclude.m4
@@ -0,0 +1,10 @@
+I386_CPPFLAGS=
+case "${target}" in
+ i[[3456]]86-*-coff)
+ I386_CPPFLAGS="-DCOFF"
+ ;;
+ i[[3456]]86-*-aout)
+ I386_CPPFLAGS="-DAOUT"
+ ;;
+esac
+AC_SUBST(I386_CPPFLAGS)
diff --git a/libgloss/i386/configure.ac b/libgloss/i386/configure.ac
deleted file mode 100644
index ac1518648146..000000000000
--- a/libgloss/i386/configure.ac
+++ /dev/null
@@ -1,58 +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(cygmon-salib.c)
-
-AC_CONFIG_AUX_DIR(../..)
-
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-
-AC_PROG_INSTALL
-
-I386_CPPFLAGS=
-case "$target" in
- *coff)
- I386_CPPFLAGS="-DCOFF"
- ;;
- *aout)
- I386_CPPFLAGS="-DAOUT"
- ;;
-esac
-AC_SUBST(I386_CPPFLAGS)
-
-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
-
-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)
-
-AM_ENABLE_MULTILIB(, ../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/8] libgloss: merge moxie configure script up a level
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
2022-02-11 12:50 ` [PATCH 1/8] libgloss: i386: simplify target flags Mike Frysinger
2022-02-11 12:50 ` [PATCH 2/8] libgloss: merge i386 configure script up a level Mike Frysinger
@ 2022-02-11 12:50 ` Mike Frysinger
2022-02-11 12:50 ` [PATCH 4/8] libgloss: merge mcore " Mike Frysinger
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
Move the minor moxie-specific logic to a dedicated file & namespace them
so we can merge its configure logic up a level.
---
libgloss/Makefile.in | 11 +-
libgloss/configure | 20 +-
libgloss/configure.ac | 4 +-
libgloss/moxie/Makefile.in | 17 +-
libgloss/moxie/acinclude.m4 | 13 +
libgloss/moxie/aclocal.m4 | 384 ----
libgloss/moxie/configure | 3943 -----------------------------------
libgloss/moxie/configure.ac | 50 -
8 files changed, 49 insertions(+), 4393 deletions(-)
create mode 100644 libgloss/moxie/acinclude.m4
delete mode 100644 libgloss/moxie/aclocal.m4
delete mode 100755 libgloss/moxie/configure
delete mode 100644 libgloss/moxie/configure.ac
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 20f15a88b023..6eb39118b509 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -149,7 +149,8 @@ case "${target}" in
subdirs="$subdirs mep"
;;
moxie-*-*)
- AC_CONFIG_SUBDIRS([moxie])
+ AC_CONFIG_FILES([moxie/Makefile])
+ subdirs="$subdirs moxie"
;;
microblaze*-*-*)
AC_CONFIG_FILES([microblaze/Makefile])
@@ -324,6 +325,7 @@ AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix", [symbol prefix])
m4_include([i386/acinclude.m4])
m4_include([libnosys/acinclude.m4])
+m4_include([moxie/acinclude.m4])
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
diff --git a/libgloss/moxie/Makefile.in b/libgloss/moxie/Makefile.in
index bb074ce12941..e87510fe2e8f 100644
--- a/libgloss/moxie/Makefile.in
+++ b/libgloss/moxie/Makefile.in
@@ -62,10 +62,10 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
LD_SCRIPTS = moxie-elf-common.ld qemu.ld sim.ld moxiebox.ld
-@BUILD_CRT0_TRUE@CRT0 = crt0.o
-@BUILD_CRT0_TRUE@CRT0_INSTALL = install-crt0
-@BUILD_CRT0_FALSE@CRT0 =
-@BUILD_CRT0_FALSE@CRT0_INSTALL =
+@MOXIE_BUILD_CRT0_TRUE@CRT0 = crt0.o
+@MOXIE_BUILD_CRT0_TRUE@CRT0_INSTALL = install-crt0
+@MOXIE_BUILD_CRT0_FALSE@CRT0 =
+@MOXIE_BUILD_CRT0_FALSE@CRT0_INSTALL =
SIM_BSP = libsim.a
SIM_OBJS = fstat.o \
@@ -146,15 +146,12 @@ clean mostlyclean:
rm -f *.o *.a
distclean maintainer-clean realclean: clean
- rm -f Makefile config.cache config.log config.status
+ rm -f Makefile
.PHONY: info dvi doc install-info clean-info
info doc dvi:
install-info:
clean-info:
-Makefile: Makefile.in config.status @host_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/moxie/acinclude.m4 b/libgloss/moxie/acinclude.m4
new file mode 100644
index 000000000000..77428ee37ded
--- /dev/null
+++ b/libgloss/moxie/acinclude.m4
@@ -0,0 +1,13 @@
+dnl Don't build crt0 for moxiebox, which provides crt0 for us.
+case "${target}" in
+ moxie-*-moxiebox*)
+ MOXIE_BUILD_CRT0_TRUE='#'
+ MOXIE_BUILD_CRT0_FALSE=
+ ;;
+ *)
+ MOXIE_BUILD_CRT0_TRUE=
+ MOXIE_BUILD_CRT0_FALSE='#'
+ ;;
+esac
+AC_SUBST(MOXIE_BUILD_CRT0_TRUE)
+AC_SUBST(MOXIE_BUILD_CRT0_FALSE)
diff --git a/libgloss/moxie/configure.ac b/libgloss/moxie/configure.ac
deleted file mode 100644
index f09d72b77932..000000000000
--- a/libgloss/moxie/configure.ac
+++ /dev/null
@@ -1,50 +0,0 @@
-dnl 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
-
-dnl Don't build crt0 for moxiebox, which provides crt0 for us.
-case "${target}" in
- moxie-*-moxiebox*)
- BUILD_CRT0_TRUE='#'
- BUILD_CRT0_FALSE=
- ;;
- *)
- BUILD_CRT0_TRUE=
- BUILD_CRT0_FALSE='#'
- ;;
-esac
-
-AC_SUBST(BUILD_CRT0_TRUE)
-AC_SUBST(BUILD_CRT0_FALSE)
-
-host_makefile_frag=${srcdir}/../config/default.mh
-
-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)
-
-AM_ENABLE_MULTILIB(, ../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/8] libgloss: merge mcore configure script up a level
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
` (2 preceding siblings ...)
2022-02-11 12:50 ` [PATCH 3/8] libgloss: merge moxie " Mike Frysinger
@ 2022-02-11 12:50 ` Mike Frysinger
2022-02-11 12:50 ` [PATCH 5/8] libgloss: m68k: switch to AC_NO_EXECUTABLES Mike Frysinger
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
Move the minor mcore-specific logic to a dedicated file & namespace them
so we can merge its configure logic up a level.
---
libgloss/Makefile.in | 14 +-
libgloss/configure | 17 +-
libgloss/configure.ac | 4 +-
libgloss/mcore/Makefile.in | 11 +-
libgloss/mcore/acinclude.m4 | 10 +
libgloss/mcore/aclocal.m4 | 384 ----
libgloss/mcore/configure | 3938 -----------------------------------
libgloss/mcore/configure.ac | 45 -
8 files changed, 41 insertions(+), 4382 deletions(-)
create mode 100644 libgloss/mcore/acinclude.m4
delete mode 100644 libgloss/mcore/aclocal.m4
delete mode 100755 libgloss/mcore/configure
delete mode 100644 libgloss/mcore/configure.ac
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 6eb39118b509..0218d6763572 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -142,7 +142,8 @@ case "${target}" in
subdirs="$subdirs lm32"
;;
mcore-*-*)
- AC_CONFIG_SUBDIRS([mcore])
+ AC_CONFIG_FILES([mcore/Makefile])
+ subdirs="$subdirs mcore"
;;
mep-*-*)
AC_CONFIG_FILES([mep/Makefile])
@@ -325,6 +326,7 @@ AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix", [symbol prefix])
m4_include([i386/acinclude.m4])
m4_include([libnosys/acinclude.m4])
+m4_include([mcore/acinclude.m4])
m4_include([moxie/acinclude.m4])
dnl We have to assign the same value to other variables because autoconf
diff --git a/libgloss/mcore/Makefile.in b/libgloss/mcore/Makefile.in
index 7d37027925d2..883e5ed59fd8 100644
--- a/libgloss/mcore/Makefile.in
+++ b/libgloss/mcore/Makefile.in
@@ -59,7 +59,7 @@ SIM_TEST = sim-test
SIM_INSTALL = install-sim
# Here is all of the picobug on cmb stuff
-MON_PREFIX = @bsp_prefix@
+MON_PREFIX = @MCORE_BSP_PREFIX@
MON_LDFLAGS =
MON_BSP = libcmb.a
MON_CRT0 = crt0.o
@@ -121,7 +121,7 @@ clean mostlyclean:
rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(MON_BSP)
distclean maintainer-clean realclean: clean
- rm -f Makefile config.status *~
+ rm -f Makefile *~
.PHONY: install info install-info clean-info
install: ${SIM_INSTALL} ${MON_INSTALL}
@@ -140,8 +140,5 @@ info:
install-info:
clean-info:
-Makefile: Makefile.in config.status @host_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/mcore/acinclude.m4 b/libgloss/mcore/acinclude.m4
new file mode 100644
index 000000000000..7115869f3113
--- /dev/null
+++ b/libgloss/mcore/acinclude.m4
@@ -0,0 +1,10 @@
+MCORE_BSP_PREFIX=
+case "${target}" in
+ mcore-*-elf)
+ MCORE_BSP_PREFIX=elf-
+ ;;
+ mcore-*-pe)
+ MCORE_BSP_PREFIX=pe-
+ ;;
+esac
+AC_SUBST(MCORE_BSP_PREFIX)
diff --git a/libgloss/mcore/configure.ac b/libgloss/mcore/configure.ac
deleted file mode 100644
index f6b3f009643e..000000000000
--- a/libgloss/mcore/configure.ac
+++ /dev/null
@@ -1,45 +0,0 @@
-dnl 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
-
-case "${target}" in
- mcore-*-elf)
- bsp_prefix=elf-
- ;;
- mcore-*-pe)
- bsp_prefix=pe-
- ;;
-esac
-
-AC_SUBST(bsp_prefix)
-
-host_makefile_frag=${srcdir}/../config/default.mh
-
-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)
-
-AM_ENABLE_MULTILIB(, ../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 5/8] libgloss: m68k: switch to AC_NO_EXECUTABLES
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
` (3 preceding siblings ...)
2022-02-11 12:50 ` [PATCH 4/8] libgloss: merge mcore " Mike Frysinger
@ 2022-02-11 12:50 ` Mike Frysinger
2022-02-11 12:50 ` [PATCH 6/8] libgloss: merge m68k configure script up a level Mike Frysinger
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
Use this macro rather than hacking up the LDFLAGS settings. This will
make it easier to merge the logic into the top-level which is already
using AC_NO_EXECUTABLES.
---
libgloss/m68k/configure | 82 ++++++++++++++++++++++++++++++++++++--
libgloss/m68k/configure.ac | 10 +----
2 files changed, 81 insertions(+), 11 deletions(-)
diff --git a/libgloss/m68k/configure.ac b/libgloss/m68k/configure.ac
index 41b49a530a5d..0230e08d8346 100644
--- a/libgloss/m68k/configure.ac
+++ b/libgloss/m68k/configure.ac
@@ -30,15 +30,10 @@ AC_SUBST(LD)
AC_PROG_RANLIB
LIB_AM_PROG_AS
+AC_NO_EXECUTABLES
+
AC_MSG_CHECKING([target cpu family])
TARGET=m68k
-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])],
@@ -47,7 +42,6 @@ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mfido__
#error we are not fido
#endif])],
TARGET="fido",)
-LDFLAGS=$saved_LDFLAGS
AC_MSG_RESULT($TARGET)
AC_SUBST(TARGET)
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 6/8] libgloss: merge m68k configure script up a level
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
` (4 preceding siblings ...)
2022-02-11 12:50 ` [PATCH 5/8] libgloss: m68k: switch to AC_NO_EXECUTABLES Mike Frysinger
@ 2022-02-11 12:50 ` Mike Frysinger
2022-02-11 12:50 ` [PATCH 7/8] libgloss: merge mn10200 " Mike Frysinger
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
Move the minor m68k-specific logic to a dedicated file & namespace them
so we can merge its configure logic up a level.
---
libgloss/Makefile.in | 21 +-
libgloss/configure | 53 +-
libgloss/configure.ac | 4 +-
libgloss/m68k/Makefile.in | 11 +-
libgloss/m68k/acinclude.m4 | 16 +
libgloss/m68k/aclocal.m4 | 384 ---
libgloss/m68k/configure | 5039 ------------------------------------
libgloss/m68k/configure.ac | 65 -
8 files changed, 87 insertions(+), 5506 deletions(-)
create mode 100644 libgloss/m68k/acinclude.m4
delete mode 100644 libgloss/m68k/aclocal.m4
delete mode 100755 libgloss/m68k/configure
delete mode 100644 libgloss/m68k/configure.ac
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 0218d6763572..a32deae08bf4 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -68,7 +68,8 @@ case "${target}" in
subdirs="$subdirs nds32"
;;
fido-*-* | m68*-*-*)
- AC_CONFIG_SUBDIRS([m68k])
+ AC_CONFIG_FILES([m68k/Makefile])
+ subdirs="$subdirs m68k"
;;
hppa*-*-pro*)
AC_CONFIG_FILES([pa/Makefile])
@@ -326,6 +327,7 @@ AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix", [symbol prefix])
m4_include([i386/acinclude.m4])
m4_include([libnosys/acinclude.m4])
+m4_include([m68k/acinclude.m4])
m4_include([mcore/acinclude.m4])
m4_include([moxie/acinclude.m4])
diff --git a/libgloss/m68k/Makefile.in b/libgloss/m68k/Makefile.in
index 42cf2b2d6f4b..7f67426a638b 100644
--- a/libgloss/m68k/Makefile.in
+++ b/libgloss/m68k/Makefile.in
@@ -69,7 +69,7 @@ OBJS = close.o fstat.o getpid.o isatty.o kill.o \
unlink.o write.o
# What targets to build for. This is a list of {m68k,cf}
-TARGET = @TARGET@
+TARGET = @M68K_TARGET@
# Here is all of the simulator stuff
SIM_SCRIPTS = sim.ld
@@ -476,14 +476,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/m68k/acinclude.m4 b/libgloss/m68k/acinclude.m4
new file mode 100644
index 000000000000..2fc1c7f7ecb2
--- /dev/null
+++ b/libgloss/m68k/acinclude.m4
@@ -0,0 +1,16 @@
+M68K_TARGET=m68k
+case "${target}" in
+ fido-*-* | m68*-*-*)
+ AC_MSG_CHECKING([target cpu family])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
+#ifndef __mcoldfire__
+#error we are not coldfire
+#endif])], M68K_TARGET="cf")
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
+#ifndef __mfido__
+#error we are not fido
+#endif])], M68K_TARGET="fido")
+ AC_MSG_RESULT($M68K_TARGET)
+ ;;
+esac
+AC_SUBST(M68K_TARGET)
diff --git a/libgloss/m68k/configure.ac b/libgloss/m68k/configure.ac
deleted file mode 100644
index 0230e08d8346..000000000000
--- a/libgloss/m68k/configure.ac
+++ /dev/null
@@ -1,65 +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
-
-AC_NO_EXECUTABLES
-
-AC_MSG_CHECKING([target cpu family])
-TARGET=m68k
-AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mcoldfire__
- #error we are not coldfire
- #endif])],
- TARGET="cf",)
-AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mfido__
- #error we are not fido
- #endif])],
- TARGET="fido",)
-AC_MSG_RESULT($TARGET)
-AC_SUBST(TARGET)
-
-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] 11+ messages in thread
* [PATCH 7/8] libgloss: merge mn10200 configure script up a level
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
` (5 preceding siblings ...)
2022-02-11 12:50 ` [PATCH 6/8] libgloss: merge m68k configure script up a level Mike Frysinger
@ 2022-02-11 12:50 ` Mike Frysinger
2022-02-11 12:50 ` [PATCH 8/8] libgloss: merge mn10300 " Mike Frysinger
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
The mn10200-specific logic (setting up part_specific_obj) isn't used
by the build anywhere -- looks like copy & paste left overs from mips.
So punt that & merge the target_makefile_frag_path up to the top-level.
---
libgloss/Makefile.in | 18 +-
libgloss/configure | 6 +-
libgloss/configure.ac | 4 +-
libgloss/mn10200/Makefile.in | 9 +-
libgloss/mn10200/aclocal.m4 | 384 ----
libgloss/mn10200/configure | 3940 ---------------------------------
libgloss/mn10200/configure.ac | 58 -
7 files changed, 20 insertions(+), 4399 deletions(-)
delete mode 100644 libgloss/mn10200/aclocal.m4
delete mode 100755 libgloss/mn10200/configure
delete mode 100644 libgloss/mn10200/configure.ac
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index a32deae08bf4..f2e0d442e8d3 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -102,7 +102,9 @@ case "${target}" in
host_makefile_frag=${srcdir}/config/ppc.mh
;;
mn10200-*-*)
- AC_CONFIG_SUBDIRS([mn10200])
+ AC_CONFIG_FILES([mn10200/Makefile])
+ subdirs="$subdirs mn10200"
+ target_makefile_frag=${srcdir}/config/mn10200.mt
;;
mn10300-*-*)
AC_CONFIG_SUBDIRS([mn10300])
diff --git a/libgloss/mn10200/Makefile.in b/libgloss/mn10200/Makefile.in
index af16e7a52977..9db24f444771 100644
--- a/libgloss/mn10200/Makefile.in
+++ b/libgloss/mn10200/Makefile.in
@@ -120,7 +120,7 @@ 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
+ rm -f Makefile a.out
.PHONY: install info install-info clean-info
install:
@@ -145,8 +145,5 @@ ${CRT0}: ${srcdir}/crt0.S
# target specific makefile fragment comes in here.
@target_makefile_frag@
-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/mn10200/configure.ac b/libgloss/mn10200/configure.ac
deleted file mode 100644
index d5a0cc87aac6..000000000000
--- a/libgloss/mn10200/configure.ac
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (c) 1995, 1996, 1997, 1998 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
-
-case "${target}" in
- *)
- part_specific_obj=vr4300.o
- ;;
-esac
-
-host_makefile_frag=${srcdir}/../config/default.mh
-target_makefile_frag=${srcdir}/../config/mn10200.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)
-AC_SUBST(part_specific_obj)
-
-AM_ENABLE_MULTILIB(, ../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 8/8] libgloss: merge mn10300 configure script up a level
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
` (6 preceding siblings ...)
2022-02-11 12:50 ` [PATCH 7/8] libgloss: merge mn10200 " Mike Frysinger
@ 2022-02-11 12:50 ` Mike Frysinger
2022-02-12 10:20 ` [PATCH] libgloss: merge mips " Mike Frysinger
2022-02-16 8:40 ` [PATCH 0/8] libgloss: more merging of configure scripts Corinna Vinschen
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-11 12:50 UTC (permalink / raw)
To: newlib
Move the minor mn10300-specific logic to a dedicated file & namespace
them so we can merge its configure logic up a level. part_specific_obj
wasn't used anywhere (looks like copy & paste left over from mips), so
drop it entirely.
---
libgloss/Makefile.in | 21 +-
libgloss/configure | 23 +-
libgloss/configure.ac | 5 +-
libgloss/mn10300/Makefile.in | 13 +-
libgloss/mn10300/acinclude.m4 | 14 +
libgloss/mn10300/aclocal.m4 | 384 ----
libgloss/mn10300/configure | 3951 ---------------------------------
libgloss/mn10300/configure.ac | 67 -
8 files changed, 57 insertions(+), 4421 deletions(-)
create mode 100644 libgloss/mn10300/acinclude.m4
delete mode 100644 libgloss/mn10300/aclocal.m4
delete mode 100755 libgloss/mn10300/configure
delete mode 100644 libgloss/mn10300/configure.ac
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index f2e0d442e8d3..78e92a0e8d30 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -107,7 +107,9 @@ case "${target}" in
target_makefile_frag=${srcdir}/config/mn10200.mt
;;
mn10300-*-*)
- AC_CONFIG_SUBDIRS([mn10300])
+ AC_CONFIG_FILES([mn10300/Makefile])
+ subdirs="$subdirs mn10300"
+ target_makefile_frag=${srcdir}/config/mn10300.mt
;;
bfin-*-*)
config_bfin=true
@@ -331,6 +333,7 @@ m4_include([i386/acinclude.m4])
m4_include([libnosys/acinclude.m4])
m4_include([m68k/acinclude.m4])
m4_include([mcore/acinclude.m4])
+m4_include([mn10300/acinclude.m4])
m4_include([moxie/acinclude.m4])
dnl We have to assign the same value to other variables because autoconf
diff --git a/libgloss/mn10300/Makefile.in b/libgloss/mn10300/Makefile.in
index 925b2a47d32a..1669d5ce4fbb 100644
--- a/libgloss/mn10300/Makefile.in
+++ b/libgloss/mn10300/Makefile.in
@@ -82,8 +82,8 @@ CFLAGS = -g
GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
then echo -L${objroot}/../gcc ; fi`
-SCRIPTS = @script_list@
-BSP = @bsp_list@
+SCRIPTS = @MN10300_SCRIPT_LIST@
+BSP = @MN10300_BSP_LIST@
# Host specific makefile fragment comes in here.
@host_makefile_frag@
@@ -124,7 +124,7 @@ 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
+ rm -f Makefile a.out
.PHONY: install info install-info clean-info
install:
@@ -152,8 +152,5 @@ crt0_cygmon.o: ${srcdir}/crt0_cygmon.S
# target specific makefile fragment comes in here.
@target_makefile_frag@
-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/mn10300/acinclude.m4 b/libgloss/mn10300/acinclude.m4
new file mode 100644
index 000000000000..93fa5286e8d5
--- /dev/null
+++ b/libgloss/mn10300/acinclude.m4
@@ -0,0 +1,14 @@
+MN10300_SCRIPT_LIST=
+MN10300_BSP_LIST=
+case "${target}" in
+ mn10300-*elf)
+ MN10300_SCRIPT_LIST="eval sim asb2303 asb2305"
+ MN10300_BSP_LIST="libeval.a libcygmon.a"
+ ;;
+ *)
+ MN10300_SCRIPT_LIST="eval sim"
+ MN10300_BSP_LIST="libeval.a"
+ ;;
+esac
+AC_SUBST(MN10300_SCRIPT_LIST)
+AC_SUBST(MN10300_BSP_LIST)
diff --git a/libgloss/mn10300/configure.ac b/libgloss/mn10300/configure.ac
deleted file mode 100644
index 88af0f948748..000000000000
--- a/libgloss/mn10300/configure.ac
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (c) 1995, 1996, 2000 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
-
-case "${target}" in
- mn10300-*elf)
- part_specific_obj=vr4300.o
- script_list="eval sim asb2303 asb2305"
- bsp_list="libeval.a libcygmon.a"
- ;;
- *)
- part_specific_obj=vr4300.o
- script_list="eval sim"
- bsp_list="libeval.a"
- ;;
-esac
-
-host_makefile_frag=${srcdir}/../config/default.mh
-target_makefile_frag=${srcdir}/../config/mn10300.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)
-AC_SUBST(part_specific_obj)
-AC_SUBST(script_list)
-AC_SUBST(bsp_list)
-
-AM_ENABLE_MULTILIB(, ../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] libgloss: merge mips configure script up a level
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
` (7 preceding siblings ...)
2022-02-11 12:50 ` [PATCH 8/8] libgloss: merge mn10300 " Mike Frysinger
@ 2022-02-12 10:20 ` Mike Frysinger
2022-02-16 8:40 ` [PATCH 0/8] libgloss: more merging of configure scripts Corinna Vinschen
9 siblings, 0 replies; 11+ messages in thread
From: Mike Frysinger @ 2022-02-12 10:20 UTC (permalink / raw)
To: newlib
Move the minor mips-specific logic to a dedicated file & namespace
them so we can merge its configure logic up a level.
---
libgloss/Makefile.in | 10 +-
libgloss/aclocal.m4 | 59 +-
libgloss/configure | 136 +-
libgloss/configure.ac | 5 +-
libgloss/mips/Makefile.in | 33 +-
libgloss/mips/acinclude.m4 | 47 +
libgloss/mips/aclocal.m4 | 384 ----
libgloss/mips/configure | 3990 ------------------------------------
libgloss/mips/configure.ac | 103 -
9 files changed, 149 insertions(+), 4618 deletions(-)
create mode 100644 libgloss/mips/acinclude.m4
delete mode 100644 libgloss/mips/aclocal.m4
delete mode 100755 libgloss/mips/configure
delete mode 100644 libgloss/mips/configure.ac
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index f9d037066bc3..eb3110e0427d 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -99,7 +99,9 @@ case "${target}" in
config_wince=true
;;
mips*-*-*)
- AC_CONFIG_SUBDIRS([mips])
+ AC_CONFIG_FILES([mips/Makefile])
+ subdirs="$subdirs mips"
+ target_makefile_frag=${srcdir}/config/mips.mt
;;
riscv*-*-*)
AC_CONFIG_FILES([riscv/Makefile])
@@ -343,6 +345,7 @@ m4_include([i386/acinclude.m4])
m4_include([libnosys/acinclude.m4])
m4_include([m68k/acinclude.m4])
m4_include([mcore/acinclude.m4])
+m4_include([mips/acinclude.m4])
m4_include([mn10300/acinclude.m4])
m4_include([moxie/acinclude.m4])
diff --git a/libgloss/mips/Makefile.in b/libgloss/mips/Makefile.in
index d96478d933ac..4213a1d1f513 100644
--- a/libgloss/mips/Makefile.in
+++ b/libgloss/mips/Makefile.in
@@ -64,31 +64,31 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
then echo ${objroot}/../binutils/objcopy ; \
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
-CRT0 = @crt0@
-PCRT0 = @pcrt0@
+CRT0 = @MIPS_CRT0@
+PCRT0 = pcrt0.o
GENOBJS = syscalls.o fstat.o getpid.o isatty.o kill.o \
lseek.o print.o putnum.o stat.o unlink.o
GENOBJS2 = open.o close.o read.o write.o
-IDTOBJS = idtmon.o @part_specific_obj@ ${GENOBJS}
-PMONOBJS = pmon.o @part_specific_obj@ ${GENOBJS}
-LSIOBJS = lsipmon.o @part_specific_obj@ ${GENOBJS}
-DVEOBJS = dvemon.o @part_specific_obj@ ${GENOBJS} ${GENOBJS2}
-JMR3904OBJS = jmr3904-io.o @part_specific_obj@ ${GENOBJS} ${GENOBJS2}
-CFEOBJS = cfe.o cfe_api.o cfe_mem.o @part_specific_obj@ ${GENOBJS} ${GENOBJS2}
-CYGMONOBJS = open.o close.o cygmon.o @part_specific_obj@ ${GENOBJS}
+IDTOBJS = idtmon.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS}
+PMONOBJS = pmon.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS}
+LSIOBJS = lsipmon.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS}
+DVEOBJS = dvemon.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS} ${GENOBJS2}
+JMR3904OBJS = jmr3904-io.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS} ${GENOBJS2}
+CFEOBJS = cfe.o cfe_api.o cfe_mem.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS} ${GENOBJS2}
+CYGMONOBJS = open.o close.o cygmon.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS}
# Nullmon cannot support read and write, but the test cases pull them in via libs
-NULLMONOBJS = nullmon.o @part_specific_obj@ ${GENOBJS}
+NULLMONOBJS = nullmon.o @MIPS_PART_SPECIFIC_OBJ@ ${GENOBJS}
CFLAGS = -g
GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
then echo -L${objroot}/../gcc ; fi`
-SCRIPTS = @script_list@
-BSP = @bsp_list@
+SCRIPTS = @MIPS_SCRIPT_LIST@
+BSP = @MIPS_BSP_LIST@
-PART_SPECIFIC_DEFINES = @part_specific_defines@
+PART_SPECIFIC_DEFINES = @MIPS_PART_SPECIFIC_DEFINES@
# Host specific makefile fragment comes in here.
@host_makefile_frag@
@@ -253,8 +253,5 @@ syscalls.o: ${srcdir}/syscalls.c
# target specific makefile fragment comes in here.
@target_makefile_frag@
-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/mips/acinclude.m4 b/libgloss/mips/acinclude.m4
new file mode 100644
index 000000000000..6061d8dd1a35
--- /dev/null
+++ b/libgloss/mips/acinclude.m4
@@ -0,0 +1,47 @@
+MIPS_PART_SPECIFIC_OBJ=
+MIPS_PART_SPECIFIC_DEFINES=
+MIPS_SCRIPT_LIST=
+MIPS_BSP_LIST=
+MIPS_CRT0=crt0.o
+
+case "${target}" in
+ mips*-tx39*-*|mipstx39*-*-*)
+ MIPS_SCRIPT_LIST="dve idt jmr3904app jmr3904dram jmr3904dram-java jmr3904app-java sde32 sde64 mti32 mti64 mti64_n32 mti64_64"
+ MIPS_BSP_LIST="libdve.a libidt.a libjmr3904.a"
+ ;;
+ mipsisa32-*-* | mipsisa32el-*-* | \
+ mipsisa32r2-*-* | mipsisa32r2el-*-* | \
+ mipsisa64*-*-*)
+ MIPS_CRT0="crt0_cfe.o crt0_cygmon.o crt0.o"
+ MIPS_SCRIPT_LIST="idt32 idt64 cfe"
+ MIPS_BSP_LIST="libcygmon.a libidt.a libcfe.a"
+ ;;
+ mips*-lsi*-*)
+ MIPS_PART_SPECIFIC_OBJ="entry.o"
+ MIPS_SCRIPT_LIST="lsi"
+ MIPS_BSP_LIST=liblsi.a
+ ;;
+ mips64vr5*-*-*)
+ MIPS_PART_SPECIFIC_OBJ="vr5xxx.o cma101.o"
+ MIPS_PART_SPECIFIC_DEFINES=-DR5000
+ MIPS_SCRIPT_LIST="idt pmon ddb ddb-kseg0 lsi idtecoff nullmon"
+ MIPS_BSP_LIST="libidt.a libpmon.a liblsi.a libnullmon.a"
+ ;;
+ mips64vr-*-* | mips64vrel-*-*)
+ MIPS_PART_SPECIFIC_OBJ="vr5xxx.o cma101.o"
+ MIPS_SCRIPT_LIST="ddb ddb-kseg0 nullmon"
+ MIPS_BSP_LIST="libpmon.a libnullmon.a"
+ ;;
+ mips*)
+ MIPS_CRT0="crt0_cfe.o crt0.o"
+ MIPS_PART_SPECIFIC_OBJ="vr4300.o cma101.o"
+ MIPS_SCRIPT_LIST="idt pmon ddb ddb-kseg0 lsi cfe idtecoff nullmon sde32 sde64 mti32 mti64 mti64_n32 mti64_64"
+ MIPS_BSP_LIST="libidt.a libpmon.a liblsi.a libcfe.a libnullmon.a"
+ ;;
+esac
+
+AC_SUBST(MIPS_PART_SPECIFIC_OBJ)
+AC_SUBST(MIPS_PART_SPECIFIC_DEFINES)
+AC_SUBST(MIPS_SCRIPT_LIST)
+AC_SUBST(MIPS_BSP_LIST)
+AC_SUBST(MIPS_CRT0)
diff --git a/libgloss/mips/configure.ac b/libgloss/mips/configure.ac
deleted file mode 100644
index ca99c7287635..000000000000
--- a/libgloss/mips/configure.ac
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2002 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
-
-crt0=crt0.o
-pcrt0=pcrt0.o
-
-case "${target}" in
- mips*-tx39*-*|mipstx39*-*-*)
- part_specific_obj=
- part_specific_defines=
- script_list="dve idt jmr3904app jmr3904dram jmr3904dram-java jmr3904app-java sde32 sde64 mti32 mti64 mti64_n32 mti64_64"
- bsp_list="libdve.a libidt.a libjmr3904.a"
- ;;
- mipsisa32-*-* | mipsisa32el-*-* | \
- mipsisa32r2-*-* | mipsisa32r2el-*-* | \
- mipsisa64*-*-*)
- crt0="crt0_cfe.o crt0_cygmon.o crt0.o"
- pcrt0="pcrt0.o"
- part_specific_obj=
- part_specific_defines=
- script_list="idt32 idt64 cfe"
- bsp_list="libcygmon.a libidt.a libcfe.a"
- ;;
- mips*-lsi*-*)
- part_specific_obj=entry.o
- part_specific_defines=
- script_list="lsi"
- bsp_list=liblsi.a
- ;;
- mips64vr5*-*-*)
- part_specific_obj="vr5xxx.o cma101.o"
- part_specific_defines=-DR5000
- script_list="idt pmon ddb ddb-kseg0 lsi idtecoff nullmon"
- bsp_list="libidt.a libpmon.a liblsi.a libnullmon.a"
- ;;
- mips64vr-*-* | mips64vrel-*-*)
- part_specific_obj="vr5xxx.o cma101.o"
- script_list="ddb ddb-kseg0 nullmon"
- bsp_list="libpmon.a libnullmon.a"
- ;;
- *)
- crt0="crt0_cfe.o crt0.o"
- part_specific_obj="vr4300.o cma101.o"
- part_specific_defines=
- script_list="idt pmon ddb ddb-kseg0 lsi cfe idtecoff nullmon sde32 sde64 mti32 mti64 mti64_n32 mti64_64"
- bsp_list="libidt.a libpmon.a liblsi.a libcfe.a libnullmon.a"
- ;;
-esac
-
-host_makefile_frag=${srcdir}/../config/default.mh
-target_makefile_frag=${srcdir}/../config/mips.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)
-AC_SUBST(part_specific_obj)
-AC_SUBST(part_specific_defines)
-AC_SUBST(script_list)
-AC_SUBST(bsp_list)
-AC_SUBST(crt0)
-AC_SUBST(pcrt0)
-
-AM_ENABLE_MULTILIB(, ../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/8] libgloss: more merging of configure scripts
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
` (8 preceding siblings ...)
2022-02-12 10:20 ` [PATCH] libgloss: merge mips " Mike Frysinger
@ 2022-02-16 8:40 ` Corinna Vinschen
9 siblings, 0 replies; 11+ messages in thread
From: Corinna Vinschen @ 2022-02-16 8:40 UTC (permalink / raw)
To: newlib
On Feb 11 07:50, Mike Frysinger wrote:
> More work to reduce the number of configure scripts in libgloss.
> Fairly mechanical at this point. Gets us down to 8 total.
>
> Mike Frysinger (8):
> libgloss: i386: simplify target flags
> libgloss: merge i386 configure script up a level
> libgloss: merge moxie configure script up a level
> libgloss: merge mcore configure script up a level
> libgloss: m68k: switch to AC_NO_EXECUTABLES
> libgloss: merge m68k configure script up a level
> libgloss: merge mn10200 configure script up a level
> libgloss: merge mn10300 configure script up a level
Small typo in commit message 1/8 (eaiser -> easier)
LGTM, please push.
Thanks,
Corinna
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-02-16 8:40 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 12:50 [PATCH 0/8] libgloss: more merging of configure scripts Mike Frysinger
2022-02-11 12:50 ` [PATCH 1/8] libgloss: i386: simplify target flags Mike Frysinger
2022-02-11 12:50 ` [PATCH 2/8] libgloss: merge i386 configure script up a level Mike Frysinger
2022-02-11 12:50 ` [PATCH 3/8] libgloss: merge moxie " Mike Frysinger
2022-02-11 12:50 ` [PATCH 4/8] libgloss: merge mcore " Mike Frysinger
2022-02-11 12:50 ` [PATCH 5/8] libgloss: m68k: switch to AC_NO_EXECUTABLES Mike Frysinger
2022-02-11 12:50 ` [PATCH 6/8] libgloss: merge m68k configure script up a level Mike Frysinger
2022-02-11 12:50 ` [PATCH 7/8] libgloss: merge mn10200 " Mike Frysinger
2022-02-11 12:50 ` [PATCH 8/8] libgloss: merge mn10300 " Mike Frysinger
2022-02-12 10:20 ` [PATCH] libgloss: merge mips " Mike Frysinger
2022-02-16 8:40 ` [PATCH 0/8] libgloss: more merging of configure scripts 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).