From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id EC5C63858439 for ; Sat, 5 Feb 2022 05:47:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EC5C63858439 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 904B7342F9D; Sat, 5 Feb 2022 05:47:07 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 5/5] libgloss: merge bfin into top-level Makefile Date: Sat, 5 Feb 2022 00:46:56 -0500 Message-Id: <20220205054656.11443-6-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220205054656.11443-1-vapier@gentoo.org> References: <20220205054656.11443-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2022 05:47:09 -0000 Avoid a recursive make to speed things up a bit. --- libgloss/Makefile.am | 9 + libgloss/Makefile.in | 342 +++++++++++++++++++++++++++++++------ libgloss/bfin/Makefile.in | 207 ---------------------- libgloss/bfin/Makefile.inc | 71 ++++++++ libgloss/configure | 33 +++- libgloss/configure.ac | 5 +- 6 files changed, 406 insertions(+), 261 deletions(-) delete mode 100644 libgloss/bfin/Makefile.in create mode 100644 libgloss/bfin/Makefile.inc diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am index 42d7b7ffb4b8..b180309ca238 100644 --- a/libgloss/Makefile.am +++ b/libgloss/Makefile.am @@ -15,6 +15,12 @@ multilibtooldir = $(tooldir)/lib$(MULTISUBDIR) multilibtool_DATA = multilibtool_LIBRARIES = +includetooldir = $(tooldir)/include +includetool_DATA = + +includesystooldir = $(tooldir)/include/sys +includesystool_DATA = + # A fake library so automake will generate rules for plain objects that we want # to install (e.g. our crt0.o objects). noinst_LIBRARIES = libobjs.a @@ -53,6 +59,9 @@ TEXINFO_TEX = ../texinfo/texinfo.tex if HAVE_DOC include doc/Makefile.inc endif +if CONFIG_BFIN +include bfin/Makefile.inc +endif if CONFIG_IQ2000 include iq2000/Makefile.inc endif diff --git a/libgloss/bfin/Makefile.inc b/libgloss/bfin/Makefile.inc new file mode 100644 index 000000000000..35e880809a0e --- /dev/null +++ b/libgloss/bfin/Makefile.inc @@ -0,0 +1,71 @@ +# Here is all of the simulator stuff. +multilibtool_LIBRARIES += %D%/libsim.a +%C%_libsim_a_SOURCES = \ + %D%/clear_cache_range.c \ + %D%/syscalls.c +%C%_libsim_a_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -I$(srcdir)/%D/include + +check_PROGRAMS += %D%/sim-test + +# Here is all of the development board stuff. +multilibtool_DATA += \ + %D%/crt0.o \ + %D%/basiccrt.o \ + %D%/basiccrts.o \ + %D%/basiccrt561.o \ + %D%/basiccrt561s.o \ + %D%/basiccrt561b.o +# %D%/basiccrt60x.o \ +# %D%/basiccrt60xs.o \ +# %D%/basiccrt60xc1.o +libobjs_a_SOURCES += \ + %D%/crt0.S \ + %D%/basiccrt.S + +if !HAVE_MULTISUBDIR +multilibtool_DATA += \ + %D%/bfin-common-sc.ld %D%/bfin-common-mc.ld %D%/bfin-common-mc0.ld \ + %D%/bf504.ld %D%/bf506.ld \ + %D%/bf512.ld %D%/bf514.ld %D%/bf516.ld %D%/bf518.ld \ + %D%/bf522.ld %D%/bf523.ld %D%/bf524.ld %D%/bf525.ld %D%/bf526.ld %D%/bf527.ld \ + %D%/bf531.ld %D%/bf532.ld %D%/bf533.ld \ + %D%/bf534.ld %D%/bf536.ld %D%/bf537.ld \ + %D%/bf538.ld %D%/bf539.ld \ + %D%/bf542.ld %D%/bf544.ld %D%/bf547.ld %D%/bf548.ld %D%/bf549.ld \ + %D%/bf561.ld %D%/bf561a.ld %D%/bf561b.ld %D%/bf561m.ld \ + %D%/bf606.ld %D%/bf606c0.ld %D%/bf606c1.ld %D%/bf606m.ld \ + %D%/bf607.ld %D%/bf607c0.ld %D%/bf607c1.ld %D%/bf607m.ld \ + %D%/bf608.ld %D%/bf608c0.ld %D%/bf608c1.ld %D%/bf608m.ld \ + %D%/bf609.ld %D%/bf609c0.ld %D%/bf609c1.ld %D%/bf609m.ld \ + %D%/bf592.ld + +includetool_DATA += $(wildcard $(srcdir)/%D%/include/*.h) +includesystool_DATA += $(wildcard $(srcdir)/%D%/include/sys/*.h) +endif + +multilibtool_LIBRARIES += %D%/libbfinbsp.a +%C%_libbfinbsp_a_SOURCES = \ + %D%/clear_cache_range.c \ + %D%/_exit.c +%C%_libbfinbsp_a_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -I$(srcdir)/%D/include + +%D%/basiccrt.$(OBJEXT): %D%/basiccrt.S + $(AM_V_CC)$(COMPILE) -o $@ -c $< $(if $(findstring mcpu=,$(CFLAGS)),,-mcpu=bf532-any) +%D%/basiccrts.$(OBJEXT): %D%/basiccrt.S + $(AM_V_CC)$(COMPILE) -o $@ -c $< $(if $(findstring mcpu=,$(CFLAGS)),,-mcpu=bf532-any) -D__BFIN_SDRAM +%D%/basiccrt561.$(OBJEXT): %D%/basiccrt.S + $(AM_V_CC)$(COMPILE) -o $@ -c $< $(if $(findstring mcpu=,$(CFLAGS)),-mcpu=bf561-any,-mcpu=bf561-none) +%D%/basiccrt561s.$(OBJEXT): %D%/basiccrt.S + $(AM_V_CC)$(COMPILE) -o $@ -c $< $(if $(findstring mcpu=,$(CFLAGS)),-mcpu=bf561-any,-mcpu=bf561-none) -D__BFIN_SDRAM +%D%/basiccrt561b.$(OBJEXT): %D%/basiccrt.S + $(AM_V_CC)$(COMPILE) -o $@ -c $< $(if $(findstring mcpu=,$(CFLAGS)),-mcpu=bf561-any,-mcpu=bf561-none) -D__ADSPBF561_COREB__ +%D%/basiccrt60x.$(OBJEXT): %D%/basiccrt.S + $(AM_V_CC)$(COMPILE) -o $@ -c $< $(if $(findstring mcpu=,$(CFLAGS)),-mcpu=bf608-any,-mcpu=bf608-none) +%D%/basiccrt60xs.$(OBJEXT): %D%/basiccrt.S + $(AM_V_CC)$(COMPILE) -o $@ -c $< $(if $(findstring mcpu=,$(CFLAGS)),-mcpu=bf608-any,-mcpu=bf608-none) -D__BFIN_SDRAM +%D%/basiccrt60xc1.$(OBJEXT): %D%/basiccrt.S + $(AM_V_CC)$(COMPILE) -o $@ -c $< $(if $(findstring mcpu=,$(CFLAGS)),-mcpu=bf608-any,-mcpu=bf608-none) -D__ADSPBF60x_CORE1__ diff --git a/libgloss/configure.ac b/libgloss/configure.ac index 21871f954444..11b115e2a7a0 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -19,6 +19,7 @@ else have_multisubdir=yes fi AM_CONDITIONAL(HAVE_DOC, test x$have_multisubdir = xno) +AM_CONDITIONAL(HAVE_MULTISUBDIR, test x$have_multisubdir = xyes) AC_NO_EXECUTABLES @@ -103,8 +104,7 @@ case "${target}" in AC_CONFIG_SUBDIRS([mn10300]) ;; bfin-*-*) - AC_CONFIG_FILES([bfin/Makefile]) - subdirs="$subdirs bfin" + config_bfin=true ;; cr16-*-*) AC_CONFIG_FILES([cr16/Makefile]) @@ -223,6 +223,7 @@ case "${target}" in ;; esac +AM_CONDITIONAL(CONFIG_BFIN, test x$config_bfin = xtrue) AM_CONDITIONAL(CONFIG_IQ2000, test x$config_iq2000 = xtrue) dnl For now, don't bother configuring testsuite -- 2.34.1