From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH 4/5] libgloss: merge aarch64 configure script up a level
Date: Tue, 13 Dec 2022 21:36:59 -0500 [thread overview]
Message-ID: <20221214023700.13062-5-vapier@gentoo.org> (raw)
In-Reply-To: <20221214023700.13062-1-vapier@gentoo.org>
Move the minor aarch64-specific logic to a dedicated variable so we can
merge its configure logic up a level.
---
libgloss/Makefile.in | 15 +-
libgloss/aarch64/Makefile.in | 41 +-
libgloss/aarch64/acinclude.m4 | 7 +
libgloss/aarch64/aclocal.m4 | 546 ---
libgloss/aarch64/configure | 4784 -------------------------
libgloss/aarch64/configure.ac | 49 -
libgloss/aarch64/cpu-init/Makefile.in | 7 +-
libgloss/configure | 23 +-
libgloss/configure.ac | 4 +-
9 files changed, 45 insertions(+), 5431 deletions(-)
create mode 100644 libgloss/aarch64/acinclude.m4
delete mode 100644 libgloss/aarch64/aclocal.m4
delete mode 100755 libgloss/aarch64/configure
delete mode 100644 libgloss/aarch64/configure.ac
diff --git a/libgloss/aarch64/Makefile.in b/libgloss/aarch64/Makefile.in
index 5d7012023dee..980c75858da3 100644
--- a/libgloss/aarch64/Makefile.in
+++ b/libgloss/aarch64/Makefile.in
@@ -26,6 +26,7 @@
DESTDIR =
VPATH = @srcdir@ @srcdir@/..
srcdir = @srcdir@
+abs_srcdir = @abs_srcdir@
objdir = .
srcroot = $(srcdir)/../..
objroot = $(objdir)/../..
@@ -40,7 +41,7 @@ bindir = @bindir@
libdir = @libdir@
tooldir = $(exec_prefix)/$(target_alias)
-objtype = @objtype@
+objtype = @AARCH64_OBJTYPE@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -66,8 +67,6 @@ AR = @AR@
LD = @LD@
RANLIB = @RANLIB@
-SUBDIRS = @subdirs@
-
OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
then echo ${objroot}/../binutils/objdump ; \
else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
@@ -97,15 +96,6 @@ RDIMON_INSTALL = install-rdimon
#
all: ${CRT0} ${RDIMON_CRT0} ${RDIMON_BSP} ${RDIMON_SCRIPTS}
- @rootpre=`pwd`/; export rootpre; \
- srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
- for dir in .. ${SUBDIRS}; do \
- if [ x$$dir != x.. ]; then \
- if [ -d $$dir ]; then \
- (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
- else true; fi; \
- else true; fi; \
- done
#
# here's where we build the test programs for each target
@@ -147,30 +137,12 @@ $(RDIMON_BSP): $(RDIMON_OBJS)
clean mostlyclean:
rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) ${RDIMON_SCRIPTS}
- @rootpre=`pwd`/; export rootpre; \
- srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
- for dir in .. ${SUBDIRS}; do \
- if [ x$$dir != x.. ]; then \
- if [ -d $$dir ]; then \
- (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) clean); \
- else true; fi; \
- else true; fi; \
- done
distclean maintainer-clean realclean: clean
- rm -f Makefile config.status *~
+ rm -f Makefile *~
.PHONY: install info install-info clean-info
install: ${CRT0_INSTALL} ${RDIMON_INSTALL}
- @rootpre=`pwd`/; export rootpre; \
- srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
- for dir in .. ${SUBDIRS}; do \
- if [ x$$dir != x.. ]; then \
- if [ -d $$dir ]; then \
- (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \
- else true; fi; \
- else true; fi; \
- done
install-crt0:
${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR}
@@ -190,8 +162,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/aarch64/acinclude.m4 b/libgloss/aarch64/acinclude.m4
new file mode 100644
index 000000000000..df08e871a1e5
--- /dev/null
+++ b/libgloss/aarch64/acinclude.m4
@@ -0,0 +1,7 @@
+AARCH64_OBJTYPE=
+case "${target}" in
+ *-*-elf)
+ AARCH64_OBJTYPE=elf-
+ ;;
+esac
+AC_SUBST(AARCH64_OBJTYPE)
diff --git a/libgloss/aarch64/configure.ac b/libgloss/aarch64/configure.ac
deleted file mode 100644
index d691f11a714c..000000000000
--- a/libgloss/aarch64/configure.ac
+++ /dev/null
@@ -1,49 +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
-
-AC_NO_EXECUTABLES
-AC_PROG_CC
-AM_PROG_AS
-AM_PROG_AR
-LD=${LD-ld}
-AC_SUBST(LD)
-AC_PROG_RANLIB
-
-case "${target}" in
- *-*-elf)
- objtype=elf-
- ;;
-esac
-
-AC_SUBST(objtype)
-
-host_makefile_frag=`cd $srcdir/../config;pwd`/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)
-
-# Configure cpu init plug-ins
-if test -d "${srcdir}/cpu-init"; then
- subdirs="${subdirs} cpu-init"
- AC_CONFIG_FILES([cpu-init/Makefile], [dnl
- ac_file=cpu-init/Makefile . ${srcdir}/../../config-ml.in
- ])
- AC_SUBST(subdirs)
-fi
-
-AM_ENABLE_MULTILIB(, ../..)
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/libgloss/aarch64/cpu-init/Makefile.in b/libgloss/aarch64/cpu-init/Makefile.in
index 22648b2af991..4aef917ebe5a 100644
--- a/libgloss/aarch64/cpu-init/Makefile.in
+++ b/libgloss/aarch64/cpu-init/Makefile.in
@@ -103,8 +103,5 @@ info:
install-info:
clean-info:
-Makefile: Makefile.in ../config.status @host_makefile_frag_path@
- $(SHELL) ../config.status --file cpu-init/Makefile
-
-../config.status: ../configure
- $(SHELL) ../config.status --recheck
+Makefile: Makefile.in ../../config.status
+ cd ../.. && $(SHELL) ./config.status --file aarch64/cpu-init/Makefile
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index b683ef65d193..931e3f6de42d 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -36,7 +36,8 @@ target_makefile_frag=${srcdir}/config/default.mt
case "${target}" in
aarch64*-*-*)
- AC_CONFIG_SUBDIRS(aarch64)
+ AC_CONFIG_FILES([aarch64/Makefile aarch64/cpu-init/Makefile])
+ subdirs="$subdirs aarch64 aarch64/cpu-init"
config_testsuite=true
;;
arc*-*-*)
@@ -330,6 +331,7 @@ dnl
rm -f conftest* ])
AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix", [symbol prefix])
+m4_include([aarch64/acinclude.m4])
m4_include([i386/acinclude.m4])
m4_include([libnosys/acinclude.m4])
m4_include([m68k/acinclude.m4])
--
2.38.1
next prev parent reply other threads:[~2022-12-14 2:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 2:36 [PATCH 0/5] libgloss: drop custom multi-build logic Mike Frysinger
2022-12-14 2:36 ` [PATCH 1/5] libgloss: aarch64: delete unused " Mike Frysinger
2022-12-14 2:36 ` [PATCH 2/5] libgloss: arm: inline " Mike Frysinger
2022-12-14 2:36 ` [PATCH 3/5] libgloss: drop unused " Mike Frysinger
2022-12-14 2:36 ` Mike Frysinger [this message]
2022-12-14 2:37 ` [PATCH 5/5] libgloss: merge arm configure script up a level Mike Frysinger
2022-12-19 9:17 ` [PATCH 0/5] libgloss: drop custom multi-build logic 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=20221214023700.13062-5-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).