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 A94943858D32 for ; Wed, 27 Dec 2023 05:30:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A94943858D32 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 A94943858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703655026; cv=none; b=ZEKszCKy6vcE5bJb3HVOVpcQDuJmBuJ0a7dNty14bwaEykJO5bjSFJvA5mgEUmzEQU7+jygWwLSrZ9k/o3aG+/AaA7RZoEztQqOOJDcjs6cafzlbxKjHJ9s882yn9OvAibJoUmTkMzULmHT/QwxwZO67UQKzAHmle2vaMr2Zm2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703655026; c=relaxed/simple; bh=hYA5ZmODMpmKRDi6+PWme9fGA5GeBl6Wjw49Ir6XL14=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=VCKPX4e53GW6+u/oRsC7qe5Whttu52/zmxwQ7DXYjVzOuvi8fd/y4fFeA0Wyj0ojBLHanV30dmhwFxO+893ea3bwmvyofdsNWCJq5mrx7xmZsUbgBsfuatw5aUaKrhIth+Lw2olDawEuHfDla0+/bJ66EN7yValNDfv1oMM8UmY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id EB46434069F; Wed, 27 Dec 2023 05:30:23 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH] libgloss: merge xstormy16 into top-level Makefile Date: Wed, 27 Dec 2023 00:30:21 -0500 Message-ID: <20231227053021.29428-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,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 List-Id: Avoid a recursive make to speed things up a bit. A xstormy16-elf build shows installed objects & libs produce same code. --- libgloss/Makefile.am | 3 + libgloss/Makefile.in | 232 +++++++++++++++++++++++++------- libgloss/configure | 19 ++- libgloss/configure.ac | 5 +- libgloss/xstormy16/Makefile.in | 131 ------------------ libgloss/xstormy16/Makefile.inc | 48 +++++++ 6 files changed, 253 insertions(+), 185 deletions(-) delete mode 100644 libgloss/xstormy16/Makefile.in create mode 100644 libgloss/xstormy16/Makefile.inc diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am index e70c9d246cb1..a877e402aff7 100644 --- a/libgloss/Makefile.am +++ b/libgloss/Makefile.am @@ -129,6 +129,9 @@ endif if CONFIG_V850 include v850/Makefile.inc endif +if CONFIG_XSTORMY16 +include xstormy16/Makefile.inc +endif if CONFIG_XTENSA include xtensa/Makefile.inc endif diff --git a/libgloss/configure.ac b/libgloss/configure.ac index 8326889a2167..0ebc9b75b2fc 100644 --- a/libgloss/configure.ac +++ b/libgloss/configure.ac @@ -181,8 +181,7 @@ case "${target}" in target_makefile_frag=${srcdir}/config/xc16x.mt ;; xstormy16-*-*) - AC_CONFIG_FILES([xstormy16/Makefile]) - subdirs="$subdirs xstormy16" + config_xstormy16=true ;; xtensa-*-*) config_xtensa=true @@ -240,7 +239,7 @@ 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 - nds32 nios2 riscv v850 wince xtensa + nds32 nios2 riscv v850 wince xstormy16 xtensa ], [dnl AM_CONDITIONAL([CONFIG_]m4_toupper(SUBDIR), [test x$config_]SUBDIR = xtrue) ]) diff --git a/libgloss/xstormy16/Makefile.in b/libgloss/xstormy16/Makefile.in deleted file mode 100644 index 49d8a8deacfe..000000000000 --- a/libgloss/xstormy16/Makefile.in +++ /dev/null @@ -1,131 +0,0 @@ -# -# - -DESTDIR = -VPATH = @srcdir@ @srcdir@/.. -srcdir = @srcdir@ -objdir = . -srcroot = $(srcdir)/../.. -objroot = $(objdir)/../.. - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -host_alias = @host_alias@ -target_alias = @target_alias@ - -bindir = @bindir@ -libdir = @libdir@ -tooldir = $(exec_prefix)/$(target_alias) - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -# Multilib support variables. -# TOP is used instead of MULTI{BUILD,SRC}TOP. -MULTIDIRS = -MULTISUBDIR = - -SHELL = /bin/sh - -mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs - -CC = @CC@ - -AS = @AS@ -AR = @AR@ -LD = @LD@ -RANLIB = @RANLIB@ - -# Yuk. -OBJCOPY = $(subst ranlib,objcopy,$(RANLIB)) - -OBJS = isatty.o -CFLAGS = -g -O2 -ASFLAGS = --gdwarf2 -SCRIPTS = -CRT = crt0.o crti.o crtn.o - -# Here is all of the simulator stuff -SIM_SCRIPTS = sim_high.ld sim_rom.ld -SIM_LDFLAGS = -SIM_BSP = libsim.a -SIM_OBJS = syscalls.o sim_malloc_start.o - -# Here is stuff for building apps for GDB on the EVA board -EVA_APP_BSP = libeva_app.a -EVA_APP_OBJS = close.o fstat.o getpid.o kill.o lseek.o open.o \ - stat.o unlink.o eva_app.o -EVA_APP_SCRIPTS = eva_app.ld - -# Stub stuff -EVA_STUB_HEX = eva_stub.hex -EVA_STUB = eva_stub.elf -EVA_STUB_OBJS = xstormy16_stub.o crt0_stub.o - -# Host specific makefile fragment comes in here. -@host_makefile_frag@ - -# -# build a test program for each target board. Just trying to get -# it to link is a good test, so we ignore all the errors for now. -# -# all: ${MON_CRT0} ${MON_BSP} -all: ${CRT} ${SIM_BSP} ${EVA_APP_BSP} ${EVA_STUB_HEX} - -# -# here's where we build the board support packages for each target -# -${SIM_BSP}: ${OBJS} ${SIM_OBJS} - ${AR} ${ARFLAGS} ${SIM_BSP} ${SIM_OBJS} ${OBJS} - ${RANLIB} ${SIM_BSP} - -${EVA_APP_BSP}: ${OBJS} ${EVA_APP_OBJS} - ${AR} ${ARFLAGS} ${EVA_APP_BSP} ${EVA_APP_OBJS} ${OBJS} - ${RANLIB} ${EVA_APP_BSP} - -${EVA_STUB_HEX}: ${EVA_STUB} - ${OBJCOPY} -O ihex $< $@ - -${EVA_STUB}: ${EVA_STUB_OBJS} ${srcdir}/eva_stub.ld - ${CC} -g -Os -nostartfiles -T${srcdir}/eva_stub.ld ${EVA_STUB_OBJS} -o $@ - - -# -# here's where we build the test programs for each target -# -.PHONY: test -test: - true - -# -# -# -.c.S: - ${CC} ${CFLAGS_FOR_TARGET} -c $< - -clean mostlyclean: - rm -f a.out core *.i *.o *-test *.srec *.dis *.x *.hex $(SIM_BSP) $(EVA_APP_BSP) $(EVA_STUB) - -distclean maintainer-clean realclean: clean - rm -f Makefile *~ - -.PHONY: install info install-info clean-info -install: - ${mkinstalldirs} ${DESTDIR}${tooldir}/lib${MULTISUBDIR} - set -e; for x in ${SIM_BSP} ${CRT} ${EVA_APP_BSP} ${EVA_STUB_HEX} ${EVA_STUB} ; do\ - ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; \ - done - @for script in ${SCRIPTS} ${SIM_SCRIPTS} ${EVA_APP_SCRIPTS}; do\ - ${INSTALL_DATA} ${srcdir}/$${script} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$${script}; \ - done - - -doc: -info: -install-info: -clean-info: - -Makefile: Makefile.in ../config.status - cd .. && $(SHELL) config.status diff --git a/libgloss/xstormy16/Makefile.inc b/libgloss/xstormy16/Makefile.inc new file mode 100644 index 000000000000..527838c8982a --- /dev/null +++ b/libgloss/xstormy16/Makefile.inc @@ -0,0 +1,48 @@ +multilibtool_DATA += \ + %D%/crt0.o \ + %D%/crti.o \ + %D%/crtn.o +libobjs_a_SOURCES += \ + %D%/crt0.s \ + %D%/crti.s \ + %D%/crtn.s + +## Here is all of the simulator stuff +multilibtool_DATA += \ + %D%/sim_high.ld \ + %D%/sim_rom.ld +multilibtool_LIBRARIES += %D%/libsim.a +%C%_libsim_a_SOURCES = \ + %D%/syscalls.S \ + %D%/sim_malloc_start.s \ + %D%/isatty.c + +## Here is stuff for building apps for GDB on the EVA board +multilibtool_DATA += %D%/eva_app.ld +multilibtool_LIBRARIES += %D%/libeva_app.a +%C%_libeva_app_a_SOURCES = \ + %D%/close.c \ + %D%/fstat.c \ + %D%/getpid.c \ + %D%/kill.c \ + %D%/lseek.c \ + %D%/open.c \ + %D%/stat.c \ + %D%/unlink.c \ + %D%/eva_app.c \ + %D%/isatty.c + +## Stub stuff +multilibtool_DATA += \ + %D%/eva_stub.elf \ + %D%/eva_stub.hex + +%D%/eva_stub.hex: %D%/eva_stub.elf + $(AM_V_GEN)$(OBJCOPY) -O ihex $< $@ + +libobjs_a_SOURCES += \ + %D%/xstormy16_stub.c \ + %D%/crt0_stub.s +%D%/eva_stub.elf: %D%/xstormy16_stub.o %D%/crt0_stub.o %D%/eva_stub.ld + $(AM_V_CCLD)$(LINK) -nostartfiles -T$(srcdir)/%D%/eva_stub.ld \ + %D%/xstormy16_stub.o %D%/crt0_stub.o -- 2.43.0