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 D4E243858C2C for ; Thu, 10 Feb 2022 08:51:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D4E243858C2C 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 75422343072; Thu, 10 Feb 2022 08:51:32 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 3/5] newlib: phoenix: merge machine/ trampoline up a level Date: Thu, 10 Feb 2022 03:51:24 -0500 Message-Id: <20220210085126.21023-4-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220210085126.21023-1-vapier@gentoo.org> References: <20220210085126.21023-1-vapier@gentoo.org> 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, 10 Feb 2022 08:51:34 -0000 The machine/{configure,Makefile} files exist only to fan out to the specific machine/$arch/ subdir. We already have all that same info in the phoenix/ dir itself, so by moving the recursive configure and make calls into it, we can cut off this logic entirely and save the overhead. --- newlib/libc/sys/phoenix/Makefile.am | 10 +- newlib/libc/sys/phoenix/Makefile.in | 11 +- newlib/libc/sys/phoenix/configure | 26 +- newlib/libc/sys/phoenix/configure.ac | 10 +- newlib/libc/sys/phoenix/machine/Makefile.am | 25 - newlib/libc/sys/phoenix/machine/Makefile.in | 556 -- newlib/libc/sys/phoenix/machine/aclocal.m4 | 937 --- newlib/libc/sys/phoenix/machine/configure | 5649 ------------------ newlib/libc/sys/phoenix/machine/configure.ac | 21 - 9 files changed, 44 insertions(+), 7201 deletions(-) delete mode 100644 newlib/libc/sys/phoenix/machine/Makefile.am delete mode 100644 newlib/libc/sys/phoenix/machine/Makefile.in delete mode 100644 newlib/libc/sys/phoenix/machine/aclocal.m4 delete mode 100644 newlib/libc/sys/phoenix/machine/configure delete mode 100644 newlib/libc/sys/phoenix/machine/configure.ac diff --git a/newlib/libc/sys/phoenix/Makefile.am b/newlib/libc/sys/phoenix/Makefile.am index d6c32e734e5b..d97ef77550c7 100644 --- a/newlib/libc/sys/phoenix/Makefile.am +++ b/newlib/libc/sys/phoenix/Makefile.am @@ -2,9 +2,9 @@ AM_CPPFLAGS = -I$(srcdir)/include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(INCLTDL) -SUBDIRS = machine +SUBDIRS = $(PHOENIX_MACHINE_DIR) -PHOENIX_MACH_LIB = machine/lib.a +PHOENIX_MACH_LIB = $(PHOENIX_MACHINE_DIR)/lib.a SUBLIBS = \ $(PHOENIX_MACH_LIB) @@ -106,11 +106,11 @@ lib.a: $(lib_a_OBJECTS) all-local: crt0.o -crt0.o: machine/crt0.o +crt0.o: $(PHOENIX_MACHINE_DIR)/crt0.o rm -f $@ - ln machine/crt0.o $@ >/dev/null 2>/dev/null || cp machine/crt0.o $@ + ln $(PHOENIX_MACHINE_DIR)/crt0.o $@ >/dev/null 2>/dev/null || cp $(PHOENIX_MACHINE_DIR)/crt0.o $@ -machine/crt0.o: ; @true +$(PHOENIX_MACHINE_DIR)/crt0.o: ; @true AM_CFLAGS = -I $(srcdir)/../../stdio ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. -I ../../../../config diff --git a/newlib/libc/sys/phoenix/configure.ac b/newlib/libc/sys/phoenix/configure.ac index 9d64b9d258a2..95b8c26516cf 100644 --- a/newlib/libc/sys/phoenix/configure.ac +++ b/newlib/libc/sys/phoenix/configure.ac @@ -9,7 +9,15 @@ AC_CONFIG_AUX_DIR(../../../..) NEWLIB_CONFIGURE(../../..) -AC_CONFIG_SUBDIRS(machine) +if test -n "${machine_dir}"; then + case ${machine_dir} in + arm) AC_CONFIG_SUBDIRS(machine/arm) ;; + esac +fi +PHOENIX_MACHINE_DIR=machine/${machine_dir} +AC_SUBST(PHOENIX_MACHINE_DIR) + +AM_CONDITIONAL(HAVE_MACHINE_DIR, test x${machine_dir} != x) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/newlib/libc/sys/phoenix/machine/Makefile.am b/newlib/libc/sys/phoenix/machine/Makefile.am deleted file mode 100644 index 793d011bef30..000000000000 --- a/newlib/libc/sys/phoenix/machine/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -## Process this file with automake to generate Makefile.in - -SUBDIRS = $(machine_dir) . - -CRT0 = crt0.o - -noinst_DATA = $(CRT0) lib.a - -$(CRT0): $(machine_dir)/$(CRT0) - rm -f $@ - ln $(machine_dir)/$(CRT0) $@ >/dev/null 2>/dev/null \ - || cp $(machine_dir)/$(CRT0) $@ - -$(machine_dir)/$(CRT0): ; @true - -CLEANFILES = $(CRT0) - -lib.a: $(machine_dir)/lib.a - rm -f $@ - ln $< $@ >/dev/null 2>/dev/null || cp $< $@ - -doc: - -ACLOCAL_AMFLAGS = -I ../../../.. -I ../../../../.. -I ../../../../../config -CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libc/sys/phoenix/machine/configure.ac b/newlib/libc/sys/phoenix/machine/configure.ac deleted file mode 100644 index 972ffc9c86ec..000000000000 --- a/newlib/libc/sys/phoenix/machine/configure.ac +++ /dev/null @@ -1,21 +0,0 @@ -dnl This is the newlib/libc/sys configure.in file. -dnl Process this file with autoconf to produce a configure script. - -AC_INIT([newlib],[NEWLIB_VERSION]) -AC_CONFIG_SRCDIR([arm]) - -dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. -AC_CONFIG_AUX_DIR(../../../../..) - -NEWLIB_CONFIGURE(../../../..) - -if test -n "${machine_dir}"; then - case ${machine_dir} in - arm) AC_CONFIG_SUBDIRS(arm) ;; - esac; -fi - -AM_CONDITIONAL(HAVE_MACHINE_DIR, test x${machine_dir} != x) - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -- 2.34.1