From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 400463858D20 for ; Thu, 17 Feb 2022 04:45:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 400463858D20 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 D4470342F17; Thu, 17 Feb 2022 04:45:34 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH] newlib: separate out libg from libc Date: Wed, 16 Feb 2022 23:45:32 -0500 Message-Id: <20220217044532.10798-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Thu, 17 Feb 2022 04:45:37 -0000 Make this a separate target from libc so that we can migrate libc over to automake more easily. Having it integrated into the libc target is difficult to handle when using automake rules which expect a one-to-one mapping between names & inputs. --- newlib/Makefile.am | 13 +++++++++---- newlib/Makefile.in | 21 +++++++++++---------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/newlib/Makefile.am b/newlib/Makefile.am index 6d3b60b330b0..a0f76865e640 100644 --- a/newlib/Makefile.am +++ b/newlib/Makefile.am @@ -4,6 +4,7 @@ AUTOMAKE_OPTIONS = dejagnu ACLOCAL_AMFLAGS = -I . -I .. -I ../config # Variables that will accumulate in subdirs. +CLEANFILES = PHONY = SUFFIXES = info_TEXINFOS = @@ -70,6 +71,7 @@ noinst_DATA += stmp-targ-include toollib_LIBRARIES = libm.a \ libc.a +noinst_DATA += libg.a if HAVE_MULTISUBDIR BUILD_MULTISUBDIR = $(builddir)$(MULTISUBDIR) if HAVE_CRT0 @@ -80,6 +82,8 @@ endif toollib_DATA = $(CRT0) $(CRT1) +CLEANFILES += libg.a + # The functions ldexp, frexp and modf are traditionally supplied in # both libc.a and libm.a. We build them in libm.a and copy them over, # along with some required supporting routines. @@ -99,18 +103,20 @@ MATHOBJS_IN_LIBC = \ $(lpfx)s_copysign.o $(lpfx)sf_copysign.o libc.a: libc/libc.a libm.a - rm -rf libc.a libg.a tmp + rm -rf libc.a tmp mkdir tmp cd tmp; \ $(AR) x ../libm.a $(MATHOBJS_IN_LIBC) ; \ $(AR) x ../libc/libc.a ; \ $(AR) $(AR_FLAGS) ../$@ *.o $(RANLIB) libc.a - ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a rm -rf tmp libc/libc.a: ; @true +libg.a: libc.a + ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a + libm.a: libm/libm.a rm -f $@ ln $< $@ >/dev/null 2>/dev/null || cp $< $@ @@ -247,13 +253,12 @@ stmp-targ-include: config.status $(MAKE) targ-include/newlib.h touch $@ -CLEANFILES = stmp-targ-include +CLEANFILES += stmp-targ-include ## We hook install-multi because this Makefile doesn't have any exec targets, ## only data targets. If that ever changes, this should be removed and the ## install-exec-local in ../multilib.am will kick in. install-data-local: install-toollibLIBRARIES install-multi - rm -f $(DESTDIR)$(toollibdir)/libg.a ln $(DESTDIR)$(toollibdir)/libc.a $(DESTDIR)$(toollibdir)/libg.a >/dev/null 2>/dev/null || cp $(DESTDIR)$(toollibdir)/libc.a $(DESTDIR)$(toollibdir)/libg.a -if [ -z "$(MULTISUBDIR)" ]; then \ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include; \ -- 2.34.1