public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH 3/8] libgloss: merge moxie configure script up a level
Date: Fri, 11 Feb 2022 07:50:49 -0500	[thread overview]
Message-ID: <20220211125054.12397-4-vapier@gentoo.org> (raw)
In-Reply-To: <20220211125054.12397-1-vapier@gentoo.org>

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


  parent reply	other threads:[~2022-02-11 12:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220211125054.12397-4-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).