From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH 3/4] libgloss: merge arc into top-level Makefile
Date: Tue, 20 Dec 2022 20:58:08 -0500 [thread overview]
Message-ID: <20221221015809.4154-4-vapier@gentoo.org> (raw)
In-Reply-To: <20221221015809.4154-1-vapier@gentoo.org>
Avoid a recursive make to speed things up a bit.
---
libgloss/Makefile.am | 3 +
libgloss/Makefile.in | 136 +++++++++++++++++++++++++-------------
libgloss/arc/Makefile.in | 122 ----------------------------------
libgloss/arc/Makefile.inc | 12 ++++
libgloss/configure | 19 ++++--
libgloss/configure.ac | 5 +-
6 files changed, 122 insertions(+), 175 deletions(-)
delete mode 100644 libgloss/arc/Makefile.in
create mode 100644 libgloss/arc/Makefile.inc
diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index 9fed4655a422..f5016dcd4b3e 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -63,6 +63,9 @@ endif
if CONFIG_AARCH64
include aarch64/Makefile.inc
endif
+if CONFIG_ARC
+include arc/Makefile.inc
+endif
if CONFIG_ARM
include arm/Makefile.inc
endif
diff --git a/libgloss/arc/Makefile.in b/libgloss/arc/Makefile.in
deleted file mode 100644
index e343dd222863..000000000000
--- a/libgloss/arc/Makefile.in
+++ /dev/null
@@ -1,122 +0,0 @@
-#
-#
-DESTDIR =
-VPATH = @srcdir@ @srcdir@/..
-srcdir = @srcdir@
-objdir = .
-srcroot = $(srcdir)/../..
-objroot = $(objdir)/../..
-mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-host_alias = @host_alias@
-target_alias = @target_alias@
-
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
-
-objtype = @objtype@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-# Multilib support variables.
-# TOP is used instead of MULTI{BUILD,SRC}TOP.
-MULTIDIRS =
-MULTISUBDIR =
-MULTIDO = true
-MULTICLEAN = true
-
-SHELL = /bin/sh
-
-CC = @CC@
-
-AS = @AS@
-AR = @AR@
-LD = @LD@
-RANLIB = @RANLIB@
-
-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`
-
-CRT0 = gcrt0.o crt0.o
-CRT0_INSTALL = install-crt0
-
-NSIM_BSP = libnsim.a
-NSIM_OBJS = \
- libcfunc.o \
- nsim-syscalls.o \
- sbrk.o \
- mcount.o
-NSIM_INSTALL = install-nsim
-NSIM_SCRIPTS = nsim.specs
-
-NANO_SCRIPTS = nano.specs
-NANO_INSTALL = install-nano
-
-CFLAGS = -g
-
-# Host specific makefile fragment comes in here.
-@host_makefile_frag@
-
-all: $(CRT0) $(NSIM_BSP)
-
-$(NSIM_BSP): $(NSIM_OBJS)
- $(AR) $(ARFLAGS) $@ $?
- $(RANLIB) $@
-
-libcfunc.o: libcfunc.c
-nsim-syscalls.o: nsim-syscalls.c
-sbrk.o: sbrk.c
-mcount.o: mcount.c
-gcrt0.o: gcrt0.S crt0.S
-crt0.o: crt0.S
-
-clean mostlyclean:
- rm -f *.o *.a
-
-distclean maintainer-clean realclean: clean
- rm -f Makefile *~
-
-.PHONY: install info install-info clean-info doc dvi
-install: $(CRT0_INSTALL) $(NSIM_INSTALL) $(NANO_INSTALL)
-
-# multilibdir may not exist yet - libgcc for ARC depends on libc, hence
-# newlib/libgloss is built before libgcc. And in parallel build libgloss maybe
-# built and installed before newlib, therefore libgloss has to create target
-# directory.
-
-$(CRT0_INSTALL):
- $(mkinstalldirs) $(DESTDIR)${tooldir}/lib${MULTISUBDIR}
- for c in $(CRT0); do \
- b=`basename $$c`; \
- ${INSTALL_DATA} $$c $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$b ;\
- done
-
-$(NSIM_INSTALL):
- $(mkinstalldirs) $(DESTDIR)${tooldir}/lib${MULTISUBDIR}
- $(INSTALL_DATA) $(NSIM_BSP) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(NSIM_BSP)
- for x in $(NSIM_SCRIPTS); do \
- $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$$x; done
-
-$(NANO_INSTALL):
- $(mkinstalldirs) $(DESTDIR)${tooldir}/lib${MULTISUBDIR}
- for x in $(NANO_SCRIPTS); do \
- $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$$x; done
-
-doc:
-info:
-dvi:
-install-info:
-clean-info:
-
-Makefile: Makefile.in ../config.status
- cd .. && $(SHELL) config.status
diff --git a/libgloss/arc/Makefile.inc b/libgloss/arc/Makefile.inc
new file mode 100644
index 000000000000..fe9cc761045d
--- /dev/null
+++ b/libgloss/arc/Makefile.inc
@@ -0,0 +1,12 @@
+multilibtool_LIBRARIES += %D%/libnsim.a
+%C%_libnsim_a_SOURCES = \
+ %D%/libcfunc.c \
+ %D%/mcount.c \
+ %D%/nsim-syscalls.c \
+ %D%/sbrk.c
+
+multilibtool_DATA += \
+ %D%/crt0.o \
+ %D%/gcrt0.o \
+ %D%/nano.specs \
+ %D%/nsim.specs
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index 6b0117805570..ef7b57854bd8 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -52,8 +52,7 @@ case "${target}" in
config_testsuite=true
;;
arc*-*-*)
- AC_CONFIG_FILES([arc/Makefile])
- subdirs="$subdirs arc"
+ config_arc=true
;;
csky*-*-*)
AC_CONFIG_FILES([csky/Makefile])
@@ -251,7 +250,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 arm bfin iq2000 libnosys lm32 riscv wince
+ aarch64 arc arm bfin iq2000 libnosys lm32 riscv wince
], [dnl
AM_CONDITIONAL([CONFIG_]m4_toupper(SUBDIR), [test x$config_]SUBDIR = xtrue)
])
--
2.38.1
next prev parent reply other threads:[~2022-12-21 1:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 1:58 [PATCH 0/4] libgloss: convert a few more arches to automake Mike Frysinger
2022-12-21 1:58 ` [PATCH 1/4] libgloss: merge aarch64 into top-level Makefile Mike Frysinger
2022-12-21 1:58 ` [PATCH 2/4] libgloss: merge arm " Mike Frysinger
2022-12-21 1:58 ` Mike Frysinger [this message]
2022-12-21 1:58 ` [PATCH 4/4] libgloss: merge d30v " Mike Frysinger
2023-01-09 10:51 ` [PATCH 0/4] libgloss: convert a few more arches to automake 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=20221221015809.4154-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).