From patchwork Wed Dec 27 05:55:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82876 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE9483858C36 for ; Wed, 27 Dec 2023 05:55:35 +0000 (GMT) X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 15F133858D32 for ; Wed, 27 Dec 2023 05:55:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 15F133858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 15F133858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703656522; cv=none; b=lFL9BkZbzW3F9IDEH+HA5gLlq5ya+6pd/VNsZ1dU1n5/eMcM3NpxkgkjE81chzsU7WATWhj0nse+GQbHAN90DNDg8oOhAQ4g2W5eS/QuveEpIo1C02P+/ctphM6HTTyY5gz8VI0XTadDuqw0k1Psk/L5lFH6rnrIV4+9M1lXE+U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703656522; c=relaxed/simple; bh=BhqWo4L4BRJdk9TdV8OiqQeX5QIUsU6RExmlQRtYD+8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=HuID9mbcrlDmqygzbpObosDJ35/ecSaFCUbXfmYX/c+fPp0Ss1NNvVKgPlPSIyio9A+blbdOA9lOJO8yrDttcNkiw7DF6+GQY8hZE1vKvY48m3WQULwEJSJ/fzzme0m4gVj/tTMU4gZuSGlcvZx26Idq3AVP3E8yZnGHJDxi45s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id B646934067D; Wed, 27 Dec 2023 05:55:19 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH] libgloss: merge m32r into top-level Makefile Date: Wed, 27 Dec 2023 00:55:18 -0500 Message-ID: <20231227055518.19120-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: newlib-bounces+patchwork=sourceware.org@sourceware.org Avoid a recursive make to speed things up a bit. A m32r-elf build shows installed objects & libs produce same code. --- libgloss/Makefile.am | 3 + libgloss/Makefile.in | 378 +++++++++++++++++++++++++------------ libgloss/configure | 19 +- libgloss/configure.ac | 5 +- libgloss/m32r/Makefile.in | 141 -------------- libgloss/m32r/Makefile.inc | 60 ++++++ 6 files changed, 339 insertions(+), 267 deletions(-) delete mode 100644 libgloss/m32r/Makefile.in create mode 100644 libgloss/m32r/Makefile.inc diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am index b2aaada002d5..d51a7a2a9ade 100644 --- a/libgloss/Makefile.am +++ b/libgloss/Makefile.am @@ -99,6 +99,9 @@ endif if CONFIG_LM32 include lm32/Makefile.inc endif +if CONFIG_M32R +include m32r/Makefile.inc +endif if CONFIG_MCORE include mcore/Makefile.inc endif diff --git a/libgloss/configure.ac b/libgloss/configure.ac index 5518199aa6a9..60f4f35b64cc 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -66,8 +66,7 @@ case "${target}" in config_i386=true ;; m32r-*-*) - AC_CONFIG_FILES([m32r/Makefile]) - subdirs="$subdirs m32r" + config_m32r=true ;; m68hc11-*-* | m6811-*-* | m68hc12-*-* | m6812-*-*) AC_CONFIG_FILES([m68hc11/Makefile]) @@ -236,7 +235,7 @@ dnl These subdirs have converted to non-recursive make. Hopefully someday all dnl the ports above will too! m4_foreach_w([SUBDIR], [ aarch64 arc arm bfin csky d30v frv i386 i960 iq2000 libnosys lm32 - mcore mn10200 mn10300 moxie msp430 + m32r mcore mn10200 mn10300 moxie msp430 nds32 nios2 riscv rl78 rx v850 wince xstormy16 xtensa ], [dnl AM_CONDITIONAL([CONFIG_]m4_toupper(SUBDIR), [test x$config_]SUBDIR = xtrue) diff --git a/libgloss/m32r/Makefile.in b/libgloss/m32r/Makefile.in deleted file mode 100644 index 786502eb8b1a..000000000000 --- a/libgloss/m32r/Makefile.in +++ /dev/null @@ -1,141 +0,0 @@ -# Makefile for libgloss/m32r -# Copyright (c) 1996, 1998 Cygnus Support. -# All rights reserved. -# -# Redistribution and use in source and binary forms are permitted -# provided that the above copyright notice and this paragraph are -# duplicated in all such forms and that any documentation, -# and/or other materials related to such -# distribution and use acknowledge that the software was developed -# at Cygnus Support, Inc. Cygnus Support, Inc. may not be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - -DESTDIR = -VPATH = @srcdir@ @srcdir@/.. -srcdir = @srcdir@ -objdir = . -srcroot = $(srcdir)/../.. -objroot = $(objdir)/../.. - -host_alias = @host_alias@ -target_alias = @target_alias@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libdir = @libdir@ -tooldir = $(exec_prefix)/$(target_alias) - -TOP = ../.. -SRCTOP = ../.. - -# Multilib support variables. -# TOP is used instead of MULTI{BUILD,SRC}TOP. -MULTISRCTOP = -MULTIBUILDTOP = -MULTIDIRS = -MULTISUBDIR = -MULTIDO = true -MULTICLEAN = true - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -SHELL = /bin/sh - -CC = @CC@ - -AS = @AS@ -AR = @AR@ -LD = @LD@ -RANLIB = @RANLIB@ - -AR_FLAGS = qv -BISON = bison -MAKEINFO = makeinfo - -.NOEXPORT: -MAKEOVERRIDES= - -TARGETDOC = ../../targetdep.tex - -CRT0 = crt0.o -GDBLIB = m32r-lib.o -GDBSTUB = m32r-stub.o -EVASCRIPT = eva.ld -STUBSCRIPT = eva-stub.ld - -GENERIC_LIBOBJS = \ - chmod.o close.o exit.o fstat.o getpid.o isatty.o kill.o lseek.o \ - open.o raise.o read.o sbrk.o stat.o unlink.o utime.o write.o - -LIBOBJS = trap0.o $(GENERIC_LIBOBJS) -LIBGLOSS = libgloss.a - -MONLIBOBJS = trapmon0.o $(GENERIC_LIBOBJS) -MONLIBGLOSS = libmon.a -MONSPECS = mon.specs - -# Host specific makefile fragment comes in here. -@host_makefile_frag@ - -all: $(CRT0) $(LIBGLOSS) $(MONLIBGLOSS) $(GDBLIB) $(GDBSTUB) - -libgloss.a: $(LIBOBJS) - $(AR) $(ARFLAGS) $@ $(LIBOBJS) - $(RANLIB) $@ - -libmon.a: $(MONLIBOBJS) - $(AR) $(ARFLAGS) $@ $(MONLIBOBJS) - $(RANLIB) $@ - -install: - mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR} - $(INSTALL_DATA) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0) - $(INSTALL_DATA) $(LIBGLOSS) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(LIBGLOSS) - $(INSTALL_DATA) $(MONLIBGLOSS) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(MONLIBGLOSS) - $(INSTALL_DATA) $(GDBLIB) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(GDBLIB) - $(INSTALL_DATA) $(GDBSTUB) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(GDBSTUB) - $(INSTALL_DATA) $(srcdir)/$(EVASCRIPT) $(DESTDIR)$(tooldir)/lib/$(EVASCRIPT) - $(INSTALL_DATA) $(srcdir)/$(STUBSCRIPT) $(DESTDIR)$(tooldir)/lib/$(STUBSCRIPT) - $(INSTALL_DATA) $(srcdir)/$(MONSPECS) $(DESTDIR)$(tooldir)/lib/$(MONSPECS) - -clean mostlyclean: - rm -f *~ *.[oa] - -distclean maintainer-clean realclean: clean - rm -f Makefile - -info doc: -install-info: -clean-info: - -Makefile: Makefile.in ../config.status - cd .. && $(SHELL) config.status - -# to support SunOS VPATH -crt0.o: crt0.S -m32r-lib.o: m32r-lib.c -m32r-stub.o: m32r-stub.c -chmod.o: chmod.c -close.o: close.c -exit.o: exit.c -fstat.o: fstat.c -getpid.o: getpid.c -isatty.o: isatty.c -kill.o: kill.c -lseek.o: lseek.c -open.o: open.c -raise.o: raise.c -read.o: read.c -sbrk.o: sbrk.c -stat.o: stat.c -unlink.o: unlink.c -utime.o: utime.c -write.o: write.c -trap0.o: trap0.S -trapmon0.o: trapmon0.c diff --git a/libgloss/m32r/Makefile.inc b/libgloss/m32r/Makefile.inc new file mode 100644 index 000000000000..7870cf8899ca --- /dev/null +++ b/libgloss/m32r/Makefile.inc @@ -0,0 +1,60 @@ +## Makefile for libgloss/m32r +## Copyright (c) 1996, 1998 Cygnus Support. +## All rights reserved. +## +## Redistribution and use in source and binary forms are permitted +## provided that the above copyright notice and this paragraph are +## duplicated in all such forms and that any documentation, +## and/or other materials related to such +## distribution and use acknowledge that the software was developed +## at Cygnus Support, Inc. Cygnus Support, Inc. may not be used to +## endorse or promote products derived from this software without +## specific prior written permission. +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +## IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +## WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +if !HAVE_MULTISUBDIR +multilibtool_DATA += \ + %D%/eva.ld \ + %D%/eva-stub.ld \ + %D%/mon.specs +endif + +multilibtool_DATA += %D%/crt0.o +libobjs_a_SOURCES += %D%/crt0.S + +%C%_common_lib_sources = \ + %D%/chmod.c \ + %D%/close.c \ + %D%/exit.c \ + %D%/fstat.c \ + %D%/getpid.c \ + %D%/isatty.c \ + %D%/kill.c \ + %D%/lseek.c \ + %D%/open.c \ + %D%/raise.c \ + %D%/read.c \ + %D%/sbrk.c \ + %D%/stat.c \ + %D%/unlink.c \ + %D%/utime.c \ + %D%/write.c + +multilibtool_LIBRARIES += %D%/libgloss.a +%C%_libgloss_a_SOURCES = \ + %D%/trap0.S \ + $(%C%_common_lib_sources) + +multilibtool_LIBRARIES += %D%/libmon.a +%C%_libmon_a_SOURCES = \ + %D%/trapmon0.c \ + $(%C%_common_lib_sources) + +multilibtool_DATA += \ + %D%/m32r-lib.o \ + %D%/m32r-stub.o +libobjs_a_SOURCES += \ + %D%/m32r-lib.c \ + %D%/m32r-stub.c