aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-07-26 11:00:14 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-07-26 11:00:15 +0100
commit34fd92ab4142bde5b54adacd16e6682f4ea83da1 (patch)
tree2b26e1e9e6bf39763a6a842569fe2db2b128b9d5 /tests
parenta2376507f615495b1d16685449ce0ea78c2caf9d (diff)
parent0a9487d80af9ed6fa14d2696bc34a920b32e53e5 (diff)
Merge remote-tracking branch 'remotes/stsquad/tags/pull-for-6.1-rc1-230721-1' into staging
Doc, metadata, plugin and testing updates for 6.1-rc1: - git ignore some file editor detritus - add overview on device emulation terminology - remove needless if leg in configure custom devices logic - numerous gitdm/mailmap updates - fix plugin_exit race for linux-user - fix a few bugs in cache modelling plugin - fix plugin calculation of physical address - handle pure assembler/linker tcg tests outside of docker - add tricore build to gitlab - remove superfluous MacOSX task - generalise the OpenBSI gitlab rules # gpg: Signature made Fri 23 Jul 2021 17:28:26 BST # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-for-6.1-rc1-230721-1: (28 commits) gitlab-ci: Extract OpenSBI job rules to reusable section gitlab-ci: Remove the second superfluous macos task gitlab: enable a very minimal build with the tricore container tests/tcg/configure.sh: add handling for assembler only builds plugins: Fix physical address calculation for IO regions plugins/cache: Fixed "function decl. is not a prototype" warnings plugins/cache: limited the scope of a mutex lock plugins/cache: Fixed a bug with destroying FIFO metadata tcg/plugins: implement a qemu_plugin_user_exit helper contrib/gitdm: add more individual contributor entries. contrib/gitdm: add a new interns group-map for GSoC/Outreachy work contrib/gitdm: add an explicit academic entry for BU contrib/gitdm: add group-map for Netflix contrib/gitdm: add domain-map for NVIDIA contrib/gitdm: add domain-map for Crudebyte contrib/gitdm: un-ironically add a mapping for LWN contrib/gitdm: add domain-map/group-map for Wind River contrib/gitdm: add domain-map for Eldorado contrib/gitdm: add domain-map/group-map mappings for Samsung gitdm.config: sort the corporate GroupMap entries ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/docker/dockerfiles/debian-tricore-cross.docker34
-rwxr-xr-xtests/tcg/configure.sh18
2 files changed, 47 insertions, 5 deletions
diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker
index 985925134c..d8df2c6117 100644
--- a/tests/docker/dockerfiles/debian-tricore-cross.docker
+++ b/tests/docker/dockerfiles/debian-tricore-cross.docker
@@ -1,23 +1,47 @@
#
# Docker TriCore cross-compiler target
#
-# This docker target builds on the debian Stretch base image.
+# This docker target builds on the Debian Buster base image but
+# doesn't inherit from the common one to avoid bringing in unneeded
+# dependencies.
#
# Copyright (c) 2018 Philippe Mathieu-Daudé
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
-FROM qemu/debian10
+FROM docker.io/library/debian:buster-slim
MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
+RUN apt update && \
+ DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
+ DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \
+ bzip2 \
+ ca-certificates \
+ ccache \
+ g++ \
+ gcc \
+ git \
+ libglib2.0-dev \
+ libpixman-1-dev \
+ libtest-harness-perl \
+ locales \
+ make \
+ ninja-build \
+ perl-base \
+ pkgconf \
+ python3-pip \
+ python3-setuptools \
+ python3-wheel
+
RUN git clone --single-branch \
https://github.com/bkoppelmann/tricore-binutils.git \
/usr/src/binutils && \
cd /usr/src/binutils && chmod +x missing && \
- CFLAGS=-w ./configure --prefix=/usr --disable-nls --target=tricore && \
+ CFLAGS=-w ./configure --prefix=/usr/local --disable-nls --target=tricore && \
make && make install && \
rm -rf /usr/src/binutils
-# This image isn't designed for building QEMU but building tests
-ENV QEMU_CONFIGURE_OPTS --disable-system --disable-user
+# This image can only build a very minimal QEMU as well as the tests
+ENV DEF_TARGET_LIST tricore-softmmu
+ENV QEMU_CONFIGURE_OPTS --disable-user --disable-tools --disable-fdt
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index aa7c24328a..1f985ccfc0 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -72,6 +72,10 @@ fi
: ${cross_cc_x86_64="x86_64-linux-gnu-gcc"}
: ${cross_cc_cflags_x86_64="-m64"}
+# tricore is special as it doesn't have a compiler
+: ${cross_as_tricore="tricore-as"}
+: ${cross_ld_tricore="tricore-ld"}
+
for target in $target_list; do
arch=${target%%-*}
@@ -247,6 +251,20 @@ for target in $target_list; do
fi
fi
fi
+
+ # Special handling for assembler only tests
+ eval "target_as=\"\${cross_as_$arch}\""
+ eval "target_ld=\"\${cross_ld_$arch}\""
+ if has $target_as && has $target_ld; then
+ case $target in
+ tricore-softmmu)
+ echo "CROSS_CC_GUEST=$target_as" >> $config_target_mak
+ echo "CROSS_AS_GUEST=$target_as" >> $config_target_mak
+ echo "CROSS_LD_GUEST=$target_ld" >> $config_target_mak
+ got_cross_cc=yes
+ ;;
+ esac
+ fi
fi
if test $got_cross_cc = yes; then