From nobody Tue May 7 00:39:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548972629512827.2571648722673; Thu, 31 Jan 2019 14:10:29 -0800 (PST) Received: from localhost ([127.0.0.1]:33543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpKXS-0002VU-Es for importer@patchew.org; Thu, 31 Jan 2019 17:10:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpKV5-0000cg-Tj for qemu-devel@nongnu.org; Thu, 31 Jan 2019 17:08:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpKL2-0002xC-18 for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:57:37 -0500 Received: from ssl.serverraum.org ([2a01:4f8:151:8464::1:2]:55781) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpKL1-0002p7-Mv for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:57:35 -0500 Received: from apollo.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:6257:18ff:fec4:ca34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 15F1222F35; Thu, 31 Jan 2019 22:57:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1548971823; bh=WdhWN7tp8HR1JW84gfPxcqHzpbuW7PGmuDlZ3Bm4oi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ke1BDt3xUhMieoQNzLnhEKGDNwT4GdSow4RHBfRsZpmOoQeCWSErFNTu5NpPrBTx1 GTpvzJgrt+97hkBEvCeZx+cNMkS2JDH1XTFYjNc/KCMoySOfhCZJdzaNvWddTwHg/C TsUaVOno86frMf1xqrvojFqrWlgAcbxCVR/hLb+Q= From: Michael Walle To: qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 22:56:09 +0100 Message-Id: <20190131215611.29341-2-michael@walle.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190131215611.29341-1-michael@walle.cc> References: <20190131215611.29341-1-michael@walle.cc> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.100.2 at web X-Virus-Status: Clean Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:4f8:151:8464::1:2 Subject: [Qemu-devel] [RFC PATCH 1/3] tests/docker: add debian-lm32-cross image X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Walle , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Unfortunately, there is no debian package for the lm32 toolchain. To keep the build times short, only build the binutils from scratch. Signed-off-by: Michael Walle --- tests/docker/Makefile.include | 5 ++-- tests/docker/dockerfiles/debian-lm32-cross.docker | 31 +++++++++++++++++++= ++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 tests/docker/dockerfiles/debian-lm32-cross.docker diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 0b9c8828e1..055bfc594d 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -90,6 +90,7 @@ docker-image-debian-amd64: docker-image-debian9 docker-image-debian-armel-cross: docker-image-debian9 docker-image-debian-armhf-cross: docker-image-debian9 docker-image-debian-arm64-cross: docker-image-debian9 +docker-image-debian-lm32-cross: docker-image-debian9 docker-image-debian-mips-cross: docker-image-debian9 docker-image-debian-mipsel-cross: docker-image-debian9 docker-image-debian-mips64el-cross: docker-image-debian9 @@ -114,8 +115,8 @@ docker-image-tricore-cross: docker-image-debian9 # These images may be good enough for building tests but not for test buil= ds DOCKER_PARTIAL_IMAGES +=3D debian-alpha-cross debian-hppa-cross debian-m68= k-cross debian-sh4-cross DOCKER_PARTIAL_IMAGES +=3D debian-sparc64-cross debian-mips64-cross debian= -riscv64-cross -DOCKER_PARTIAL_IMAGES +=3D debian-tricore-cross debian-powerpc-cross fedor= a-i386-cross -DOCKER_PARTIAL_IMAGES +=3D fedora-cris-cross +DOCKER_PARTIAL_IMAGES +=3D debian-tricore-cross debian-powerpc-cross debia= n-lm32-cross +DOCKER_PARTIAL_IMAGES +=3D fedora-i386-cross fedora-cris-cross =20 # Rules for building linux-user powered images # diff --git a/tests/docker/dockerfiles/debian-lm32-cross.docker b/tests/dock= er/dockerfiles/debian-lm32-cross.docker new file mode 100644 index 0000000000..1114d8ac6d --- /dev/null +++ b/tests/docker/dockerfiles/debian-lm32-cross.docker @@ -0,0 +1,31 @@ +# +# Docker LatticeMico32 cross-compiler target +# +# This docker target builds on the debian Stretch base image. +# +# Copyright (c) 2019 Michael Walle +# Copyright (c) 2018 Philippe Mathieu-Daud=C3=A9 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +FROM qemu:debian9 + +MAINTAINER Michael Walle + +RUN apt-get update && \ + DEBIAN_FRONTEND=3Dnoninteractive apt install -yy eatmydata +RUN DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ + apt-get install -y --no-install-recommends \ + wget + +ENV BINUTILS_VERSION 2.31 + +RUN wget http://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VERSION.tar.xz= && \ + tar -xJf binutils-$BINUTILS_VERSION.tar.xz -C /usr/src && \ + cd /usr/src/binutils-$BINUTILS_VERSION && \ + ./configure --prefix=3D/usr --disable-nls --target=3Dlm32-elf && \ + make && make install && \ + rm -rf /usr/src/binutils-$BINUTILS_VERSION + +# This image isn't designed for building QEMU but building tests +ENV QEMU_CONFIGURE_OPTS --disable-system --disable-user --=20 2.11.0 From nobody Tue May 7 00:39:35 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548972924560863.1749123819659; Thu, 31 Jan 2019 14:15:24 -0800 (PST) Received: from localhost ([127.0.0.1]:33633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpKc9-00073A-1F for importer@patchew.org; Thu, 31 Jan 2019 17:15:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpKV7-0000qT-KS for qemu-devel@nongnu.org; Thu, 31 Jan 2019 17:08:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpKL2-0002x1-0K for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:57:36 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:44165) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpKL1-0002od-GH for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:57:35 -0500 Received: from apollo.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:6257:18ff:fec4:ca34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 4E9CB22F36; Thu, 31 Jan 2019 22:57:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1548971823; bh=DiXgtREfW7RA1EzlELRMPbzTZRZYvqNRlvn5/Q4/300=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vqclDYXNeY4u5sV7r53HXLO7tLkFuajAAavBO8K8d3N5F25Zo6Ipsh1oOnYfW4f+9 XXO3eoypfNh24VU/DmO3cJjIIQPlCf9gcyBTJXXuTXMw8yjeEM5gvblz3N+WBVSbpp B8tNOFayx6vgdOwG5vxntD9Kv5yH3E04cG1PMMHA= From: Michael Walle To: qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 22:56:10 +0100 Message-Id: <20190131215611.29341-3-michael@walle.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190131215611.29341-1-michael@walle.cc> References: <20190131215611.29341-1-michael@walle.cc> X-Virus-Scanned: clamav-milter 0.100.2 at web X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 176.9.125.105 Subject: [Qemu-devel] [RFC PATCH 2/3] tests/tcg: also pass AS and LD variables X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Walle , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The lm32 architecture doesn't need the complete compiler. In fact, only the building of GCC is skipped to make building the docker image faster. Signed-off-by: Michael Walle --- tests/tcg/Makefile.include | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include index 73b5626fc5..19b81400f5 100644 --- a/tests/tcg/Makefile.include +++ b/tests/tcg/Makefile.include @@ -41,17 +41,26 @@ ifneq ($(DOCKER_IMAGE),) # We also need the Docker make rules to depend on include $(SRC_PATH)/tests/docker/Makefile.include =20 -DOCKER_COMPILE_CMD=3D"$(DOCKER_SCRIPT) cc --user $(shell id -u) \ +DOCKER_CC_CMD=3D"$(DOCKER_SCRIPT) cc --user $(shell id -u) \ --cc $(DOCKER_CROSS_COMPILER) \ -i qemu:$(DOCKER_IMAGE) \ -s $(SRC_PATH) -- " +DOCKER_AS_CMD=3D"$(DOCKER_SCRIPT) cc --user $(shell id -u) \ + --cc $(DOCKER_CROSS_ASSEMBLER) \ + -i qemu:$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " +DOCKER_LD_CMD=3D"$(DOCKER_SCRIPT) cc --user $(shell id -u) \ + --cc $(DOCKER_CROSS_LINKER) \ + -i qemu:$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " DOCKER_PREREQ=3Ddocker-image-$(DOCKER_IMAGE) =20 .PHONY: docker-build-guest-tests docker-build-guest-tests: $(DOCKER_PREREQ) $(call quiet-command, \ (mkdir -p tests && cd tests && \ - $(MAKE) -f $(TCG_MAKE) CC=3D$(DOCKER_COMPILE_CMD) \ + $(MAKE) -f $(TCG_MAKE) CC=3D$(DOCKER_CC_CMD) \ + AS=3D$(DOCKER_AS_CMD) LD=3D$(DOCKER_LD_CMD) \ BUILD_STATIC=3Dy \ EXTRA_CFLAGS=3D$(DOCKER_CROSS_COMPILER_CFLAGS)), \ "BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)") --=20 2.11.0 From nobody Tue May 7 00:39:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548972786014112.56773300247232; Thu, 31 Jan 2019 14:13:06 -0800 (PST) Received: from localhost ([127.0.0.1]:33610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpKZy-0004uI-T3 for importer@patchew.org; Thu, 31 Jan 2019 17:13:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpKV6-0000qT-H2 for qemu-devel@nongnu.org; Thu, 31 Jan 2019 17:08:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpKL2-0002xM-68 for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:57:37 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:56671) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpKL1-0002oc-GE for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:57:36 -0500 Received: from apollo.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:6257:18ff:fec4:ca34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 8059222F37; Thu, 31 Jan 2019 22:57:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1548971823; bh=D6KdDut7NxY/4m2GDXX8ttEjtLaat8XBrc14zgEKJGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ts7GYxtPllogrFzyG8+UhfNcOX49iHSwFiZmrQ+ngRknu6HJduU+6uC/i4FKa5t72 /IZC4XecazJ64jmUtRR+l3dG8xQIQtfOrOlQoi6xdrcFCHR4F9qOMezL9uhOnhr2lq M5+wjZg5KNrMn1HWYMsG/XVkKWELTNLkcTBwP7mM= From: Michael Walle To: qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 22:56:11 +0100 Message-Id: <20190131215611.29341-4-michael@walle.cc> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190131215611.29341-1-michael@walle.cc> References: <20190131215611.29341-1-michael@walle.cc> X-Virus-Scanned: clamav-milter 0.100.2 at web X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 176.9.125.105 Subject: [Qemu-devel] [RFC PATCH 3/3] tests/tcg/lm32: enable system tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Walle , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Convert the existing to the new common cross build infrastructure. Signed-off-by: Michael Walle --- tests/tcg/lm32/Makefile | 106 -----------------------------= ---- tests/tcg/lm32/Makefile.include | 8 +++ tests/tcg/lm32/Makefile.softmmu-target | 33 ++++++++++ 3 files changed, 41 insertions(+), 106 deletions(-) delete mode 100644 tests/tcg/lm32/Makefile create mode 100644 tests/tcg/lm32/Makefile.include create mode 100644 tests/tcg/lm32/Makefile.softmmu-target diff --git a/tests/tcg/lm32/Makefile b/tests/tcg/lm32/Makefile deleted file mode 100644 index 57e7363b2c..0000000000 --- a/tests/tcg/lm32/Makefile +++ /dev/null @@ -1,106 +0,0 @@ --include ../../../config-host.mak - -CROSS=3Dlm32-elf- - -SIM =3D qemu-system-lm32 -SIMFLAGS =3D -M lm32-evr -nographic -semihosting -net none -kernel - -CC =3D $(CROSS)gcc -AS =3D $(CROSS)as -AS =3D $(CC) -x assembler -SIZE =3D $(CROSS)size -LD =3D $(CC) -OBJCOPY =3D $(CROSS)objcopy - -TSRC_PATH =3D $(SRC_PATH)/tests/tcg/lm32 - -LDFLAGS =3D -T$(TSRC_PATH)/linker.ld -ASFLAGS +=3D -Wa,-I,$(TSRC_PATH)/ - -CRT =3D crt.o -HELPER =3D helper.o -TESTCASES +=3D test_add.tst -TESTCASES +=3D test_addi.tst -TESTCASES +=3D test_and.tst -TESTCASES +=3D test_andhi.tst -TESTCASES +=3D test_andi.tst -TESTCASES +=3D test_b.tst -TESTCASES +=3D test_be.tst -TESTCASES +=3D test_bg.tst -TESTCASES +=3D test_bge.tst -TESTCASES +=3D test_bgeu.tst -TESTCASES +=3D test_bgu.tst -TESTCASES +=3D test_bi.tst -TESTCASES +=3D test_bne.tst -TESTCASES +=3D test_break.tst -TESTCASES +=3D test_bret.tst -TESTCASES +=3D test_call.tst -TESTCASES +=3D test_calli.tst -TESTCASES +=3D test_cmpe.tst -TESTCASES +=3D test_cmpei.tst -TESTCASES +=3D test_cmpg.tst -TESTCASES +=3D test_cmpgi.tst -TESTCASES +=3D test_cmpge.tst -TESTCASES +=3D test_cmpgei.tst -TESTCASES +=3D test_cmpgeu.tst -TESTCASES +=3D test_cmpgeui.tst -TESTCASES +=3D test_cmpgu.tst -TESTCASES +=3D test_cmpgui.tst -TESTCASES +=3D test_cmpne.tst -TESTCASES +=3D test_cmpnei.tst -TESTCASES +=3D test_divu.tst -TESTCASES +=3D test_eret.tst -TESTCASES +=3D test_lb.tst -TESTCASES +=3D test_lbu.tst -TESTCASES +=3D test_lh.tst -TESTCASES +=3D test_lhu.tst -TESTCASES +=3D test_lw.tst -TESTCASES +=3D test_modu.tst -TESTCASES +=3D test_mul.tst -TESTCASES +=3D test_muli.tst -TESTCASES +=3D test_nor.tst -TESTCASES +=3D test_nori.tst -TESTCASES +=3D test_or.tst -TESTCASES +=3D test_ori.tst -TESTCASES +=3D test_orhi.tst -#TESTCASES +=3D test_rcsr.tst -TESTCASES +=3D test_ret.tst -TESTCASES +=3D test_sb.tst -TESTCASES +=3D test_scall.tst -TESTCASES +=3D test_sextb.tst -TESTCASES +=3D test_sexth.tst -TESTCASES +=3D test_sh.tst -TESTCASES +=3D test_sl.tst -TESTCASES +=3D test_sli.tst -TESTCASES +=3D test_sr.tst -TESTCASES +=3D test_sri.tst -TESTCASES +=3D test_sru.tst -TESTCASES +=3D test_srui.tst -TESTCASES +=3D test_sub.tst -TESTCASES +=3D test_sw.tst -#TESTCASES +=3D test_wcsr.tst -TESTCASES +=3D test_xnor.tst -TESTCASES +=3D test_xnori.tst -TESTCASES +=3D test_xor.tst -TESTCASES +=3D test_xori.tst - -all: build - -%.o: $(TSRC_PATH)/%.c - $(CC) $(CFLAGS) -c $< -o $@ - -%.o: $(TSRC_PATH)/%.S - $(AS) $(ASFLAGS) -c $< -o $@ - -%.tst: %.o $(TSRC_PATH)/macros.inc $(CRT) $(HELPER) - $(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $(HELPER) $< -o $@ - -build: $(TESTCASES) - -check: $(TESTCASES:test_%.tst=3Dcheck_%) - -check_%: test_%.tst - @$(SIM) $(SIMFLAGS) $< - -clean: - $(RM) -fr $(TESTCASES) $(CRT) $(HELPER) diff --git a/tests/tcg/lm32/Makefile.include b/tests/tcg/lm32/Makefile.incl= ude new file mode 100644 index 0000000000..f36f23031d --- /dev/null +++ b/tests/tcg/lm32/Makefile.include @@ -0,0 +1,8 @@ +# +# Makefile.include for all CRIS targets +# + +DOCKER_IMAGE=3Ddebian-lm32-cross +DOCKER_CROSS_COMPILER=3Dlm32-elf-gcc +DOCKER_CROSS_ASSEMBLER=3Dlm32-elf-as +DOCKER_CROSS_LINKER=3Dlm32-elf-ld diff --git a/tests/tcg/lm32/Makefile.softmmu-target b/tests/tcg/lm32/Makefi= le.softmmu-target new file mode 100644 index 0000000000..71a1a1802b --- /dev/null +++ b/tests/tcg/lm32/Makefile.softmmu-target @@ -0,0 +1,33 @@ +# +# lm32 softmmu tests +# + +LM32_SRC =3D $(SRC_PATH)/tests/tcg/lm32 +LM32_ALL =3D $(wildcard $(LM32_SRC)/test_*.S) +LM32_TESTS =3D $(patsubst $(LM32_SRC)/%.S, %, $(LM32_ALL)) +# Filter out common blobs and broken tests +LM32_BROKEN_TESTS =3D +LM32_USABLE_TESTS =3D $(filter-out $(LM32_BROKEN_TESTS), $(LM32_TESTS)) +LM32_RUNS =3D $(patsubst %, run-%, $(LM32_USABLE_TESTS)) + +# add to the list of tests +TESTS +=3D $(LM32_USABLE_TESTS) +VPATH +=3D $(LM32_SRC) + +QEMU_OPTS =3D -M lm32-evr -nographic -semihosting -net none -serial none -= monitor none -kernel + +INCLUDE_DIRS =3D $(SRC_PATH)/tests/tcg/lm32 +LM32_INC =3D $(addprefix -I,$(INCLUDE_DIRS)) + +LDFLAGS =3D -T$(SRC_PATH)/tests/tcg/lm32/linker.ld + +CRT =3D crt.o helper.o + +$(LM32_USABLE_TESTS): macros.inc $(CRT) Makefile.softmmu-target + +# special rule for common blobs +%.o: %.S + $(AS) $(LM32_INC) $(ASFLAGS) -c $< -o $@ + +%: %.o + $(LD) $(LM32_INC) $< -o $@ $(LDFLAGS) $(CRT) --=20 2.11.0