From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 3B4A8385800C for ; Fri, 11 Feb 2022 12:50:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B4A8385800C 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 BD8753431CC; Fri, 11 Feb 2022 12:50:56 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 2/8] libgloss: merge i386 configure script up a level Date: Fri, 11 Feb 2022 07:50:48 -0500 Message-Id: <20220211125054.12397-3-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220211125054.12397-1-vapier@gentoo.org> References: <20220211125054.12397-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_STOCKGEN, 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: Fri, 11 Feb 2022 12:50:59 -0000 Move the minor i386-specific logic to a dedicated variable so we can merge its configure logic up a level. --- libgloss/Makefile.in | 8 +- libgloss/configure | 17 +- libgloss/configure.ac | 4 +- libgloss/i386/Makefile.in | 9 +- libgloss/i386/acinclude.m4 | 10 + libgloss/i386/aclocal.m4 | 384 ---- libgloss/i386/configure | 3938 ------------------------------------ libgloss/i386/configure.ac | 58 - 8 files changed, 37 insertions(+), 4391 deletions(-) create mode 100644 libgloss/i386/acinclude.m4 delete mode 100644 libgloss/i386/aclocal.m4 delete mode 100755 libgloss/i386/configure delete mode 100644 libgloss/i386/configure.ac diff --git a/libgloss/configure.ac b/libgloss/configure.ac index 486492b7bf0d..20f15a88b023 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -52,7 +52,8 @@ case "${target}" in config_testsuite=true ;; i[[3456]]86-*-elf* | i[[3456]]86-*-coff*) - AC_CONFIG_SUBDIRS([i386]) + AC_CONFIG_FILES([i386/Makefile]) + subdirs="$subdirs i386" ;; m32r-*-*) AC_CONFIG_FILES([m32r/Makefile]) @@ -321,6 +322,7 @@ dnl rm -f conftest* ]) AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix", [symbol prefix]) +m4_include([i386/acinclude.m4]) m4_include([libnosys/acinclude.m4]) dnl We have to assign the same value to other variables because autoconf diff --git a/libgloss/i386/Makefile.in b/libgloss/i386/Makefile.in index 4fabce42aefc..7ed0b075f72e 100644 --- a/libgloss/i386/Makefile.in +++ b/libgloss/i386/Makefile.in @@ -101,7 +101,7 @@ clean mostlyclean: rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x distclean maintainer-clean realclean: clean - rm -f Makefile config.status a.out + rm -f Makefile a.out .PHONY: install info install-info clean-info install: @@ -123,8 +123,5 @@ test.o: ${srcdir}/test.c # these are for the BSPs ${CRT0}: cygmon-crt0.S -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/i386/acinclude.m4 b/libgloss/i386/acinclude.m4 new file mode 100644 index 000000000000..75bca476d18a --- /dev/null +++ b/libgloss/i386/acinclude.m4 @@ -0,0 +1,10 @@ +I386_CPPFLAGS= +case "${target}" in + i[[3456]]86-*-coff) + I386_CPPFLAGS="-DCOFF" + ;; + i[[3456]]86-*-aout) + I386_CPPFLAGS="-DAOUT" + ;; +esac +AC_SUBST(I386_CPPFLAGS) diff --git a/libgloss/i386/configure.ac b/libgloss/i386/configure.ac deleted file mode 100644 index ac1518648146..000000000000 --- a/libgloss/i386/configure.ac +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 1995, 1996 Cygnus Support -# -# The authors hereby grant permission to use, copy, modify, distribute, -# and license this software and its documentation for any purpose, provided -# that existing copyright notices are retained in all copies and that this -# notice is included verbatim in any distributions. No written agreement, -# license, or royalty fee is required for any of the authorized uses. -# Modifications to this software may be copyrighted by their authors -# and need not follow the licensing terms described here, provided that -# the new terms are clearly indicated on the first page of each file where -# they apply. -# -# Process this file with autoconf to produce a configure script. -# -AC_INIT(cygmon-salib.c) - -AC_CONFIG_AUX_DIR(../..) - -AC_CANONICAL_SYSTEM -AC_ARG_PROGRAM - -AC_PROG_INSTALL - -I386_CPPFLAGS= -case "$target" in - *coff) - I386_CPPFLAGS="-DCOFF" - ;; - *aout) - I386_CPPFLAGS="-DAOUT" - ;; -esac -AC_SUBST(I386_CPPFLAGS) - -LIB_AC_PROG_CC -AS=${AS-as} -AC_SUBST(AS) -AR=${AR-ar} -AC_SUBST(AR) -LD=${LD-ld} -AC_SUBST(LD) -AC_PROG_RANLIB -LIB_AM_PROG_AS - -host_makefile_frag=${srcdir}/../config/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) - -AM_ENABLE_MULTILIB(, ../..) - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -- 2.34.1