From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 8D15C385840E for ; Fri, 11 Feb 2022 12:51:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8D15C385840E 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 3ACBB342F90; Fri, 11 Feb 2022 12:51:10 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH 8/8] libgloss: merge mn10300 configure script up a level Date: Fri, 11 Feb 2022 07:50:54 -0500 Message-Id: <20220211125054.12397-9-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=-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: Fri, 11 Feb 2022 12:51:12 -0000 Move the minor mn10300-specific logic to a dedicated file & namespace them so we can merge its configure logic up a level. part_specific_obj wasn't used anywhere (looks like copy & paste left over from mips), so drop it entirely. --- libgloss/Makefile.in | 21 +- libgloss/configure | 23 +- libgloss/configure.ac | 5 +- libgloss/mn10300/Makefile.in | 13 +- libgloss/mn10300/acinclude.m4 | 14 + libgloss/mn10300/aclocal.m4 | 384 ---- libgloss/mn10300/configure | 3951 --------------------------------- libgloss/mn10300/configure.ac | 67 - 8 files changed, 57 insertions(+), 4421 deletions(-) create mode 100644 libgloss/mn10300/acinclude.m4 delete mode 100644 libgloss/mn10300/aclocal.m4 delete mode 100755 libgloss/mn10300/configure delete mode 100644 libgloss/mn10300/configure.ac diff --git a/libgloss/configure.ac b/libgloss/configure.ac index f2e0d442e8d3..78e92a0e8d30 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -107,7 +107,9 @@ case "${target}" in target_makefile_frag=${srcdir}/config/mn10200.mt ;; mn10300-*-*) - AC_CONFIG_SUBDIRS([mn10300]) + AC_CONFIG_FILES([mn10300/Makefile]) + subdirs="$subdirs mn10300" + target_makefile_frag=${srcdir}/config/mn10300.mt ;; bfin-*-*) config_bfin=true @@ -331,6 +333,7 @@ m4_include([i386/acinclude.m4]) m4_include([libnosys/acinclude.m4]) m4_include([m68k/acinclude.m4]) m4_include([mcore/acinclude.m4]) +m4_include([mn10300/acinclude.m4]) m4_include([moxie/acinclude.m4]) dnl We have to assign the same value to other variables because autoconf diff --git a/libgloss/mn10300/Makefile.in b/libgloss/mn10300/Makefile.in index 925b2a47d32a..1669d5ce4fbb 100644 --- a/libgloss/mn10300/Makefile.in +++ b/libgloss/mn10300/Makefile.in @@ -82,8 +82,8 @@ CFLAGS = -g GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \ then echo -L${objroot}/../gcc ; fi` -SCRIPTS = @script_list@ -BSP = @bsp_list@ +SCRIPTS = @MN10300_SCRIPT_LIST@ +BSP = @MN10300_BSP_LIST@ # Host specific makefile fragment comes in here. @host_makefile_frag@ @@ -124,7 +124,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: @@ -152,8 +152,5 @@ crt0_cygmon.o: ${srcdir}/crt0_cygmon.S # target specific makefile fragment comes in here. @target_makefile_frag@ -Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_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/mn10300/acinclude.m4 b/libgloss/mn10300/acinclude.m4 new file mode 100644 index 000000000000..93fa5286e8d5 --- /dev/null +++ b/libgloss/mn10300/acinclude.m4 @@ -0,0 +1,14 @@ +MN10300_SCRIPT_LIST= +MN10300_BSP_LIST= +case "${target}" in + mn10300-*elf) + MN10300_SCRIPT_LIST="eval sim asb2303 asb2305" + MN10300_BSP_LIST="libeval.a libcygmon.a" + ;; + *) + MN10300_SCRIPT_LIST="eval sim" + MN10300_BSP_LIST="libeval.a" + ;; +esac +AC_SUBST(MN10300_SCRIPT_LIST) +AC_SUBST(MN10300_BSP_LIST) diff --git a/libgloss/mn10300/configure.ac b/libgloss/mn10300/configure.ac deleted file mode 100644 index 88af0f948748..000000000000 --- a/libgloss/mn10300/configure.ac +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 1995, 1996, 2000 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(crt0.S) - -AC_CONFIG_AUX_DIR(../..) - -AC_CANONICAL_SYSTEM -AC_ARG_PROGRAM - -AC_PROG_INSTALL - -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 - -case "${target}" in - mn10300-*elf) - part_specific_obj=vr4300.o - script_list="eval sim asb2303 asb2305" - bsp_list="libeval.a libcygmon.a" - ;; - *) - part_specific_obj=vr4300.o - script_list="eval sim" - bsp_list="libeval.a" - ;; -esac - -host_makefile_frag=${srcdir}/../config/default.mh -target_makefile_frag=${srcdir}/../config/mn10300.mt - -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) -target_makefile_frag_path=$target_makefile_frag -AC_SUBST(target_makefile_frag_path) -AC_SUBST_FILE(target_makefile_frag) -AC_SUBST(part_specific_obj) -AC_SUBST(script_list) -AC_SUBST(bsp_list) - -AM_ENABLE_MULTILIB(, ../..) - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -- 2.34.1