qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	David Miller <dmiller423@gmail.com>,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: farman@linux.ibm.com, cohuck@redhat.com,
	richard.henderson@linaro.org,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	pasic@linux.ibm.com, borntraeger@linux.ibm.com,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v3 3/3] s390x/tcg/tests: Tests for Miscellaneous-Instruction-Extensions Facility 3
Date: Wed, 16 Feb 2022 10:53:28 +0100	[thread overview]
Message-ID: <27d96cc5-5816-b719-22f7-2b60bb5f9400@redhat.com> (raw)
In-Reply-To: <79af3435-0cbc-9c27-f29e-8aa2d5175c65@redhat.com>

On 16.02.22 10:43, Thomas Huth wrote:
> On 16/02/2022 10.17, David Hildenbrand wrote:
>> On 15.02.22 21:27, David Miller wrote:
> ...
>>> diff --git a/tests/tcg/s390x/Makefile.target
>>> b/tests/tcg/s390x/Makefile.target
>>> index 1a7238b4eb..16b9d45307 100644
>>> --- a/tests/tcg/s390x/Makefile.target
>>> +++ b/tests/tcg/s390x/Makefile.target
>>> @@ -1,6 +1,6 @@
>>>    S390X_SRC=$(SRC_PATH)/tests/tcg/s390x
>>>    VPATH+=$(S390X_SRC)
>>> -CFLAGS+=-march=zEC12 -m64
>>> +CFLAGS+=-march=z15 -m64
>>
>> Unfortunately, this makes our docker builds unhappy -- fail. I assume the
>> compiler in the container is outdated.
>>
>> $ make run-tcg-tests-s390x-linux-user
>> changing dir to build for make "run-tcg-tests-s390x-linux-user"...
>> make[1]: Entering directory '/home/dhildenb/git/qemu/build'
>>    GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc capstone slirp
>>    BUILD   debian10
>>    BUILD   debian-s390x-cross
>>    BUILD   TCG tests for s390x-linux-user
>>    CHECK   debian10
>>    CHECK   debian-s390x-cross
>>    BUILD   s390x-linux-user guest-tests with docker qemu/debian-s390x-cross
>> s390x-linux-gnu-gcc: error: unrecognized argument in option '-march=z15'
>> s390x-linux-gnu-gcc: note: valid arguments to '-march=' are: arch10 arch11 arch12 arch3 arch5 arch6 arch7 arch8 arch9 g5 g6 native z10 z13 z14 z196 z9-109 z9-ec z900 z990 zEC12; did you mean 'z10'?
>>
>> Maybe debian11 could, work.
>>
>> @Thomas do you have any idea if we could get this to work with
>> '-march=z15' or should we work around that by manually encoding
>> the relevant instructions instead?
> 
> I'm not an expert when it comes to containers, but I think you could try to 
> update to debian11 in tests/docker/dockerfiles/debian-s390x-cross.docker and 
> in ./.gitlab-ci.d/container-cross.yml ... if that does not work, it's maybe 
> better to manually encode the instructions.

debian11 won't work for general cross builds.

But, it should work with the tests:


From 8108b075e4f74fa4c590f3acf932e221e166889c Mon Sep 17 00:00:00 2001
From: David Hildenbrand <david@redhat.com>
Date: Wed, 16 Feb 2022 10:45:21 +0100
Subject: [PATCH] tests/tcg/s390x: Build tests with debian11

We need a newer compiler to build with -march=z15, to be used soon.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 tests/docker/Makefile.include                       |  2 ++
 .../dockerfiles/debian-s390x-test-cross.docker      | 13 +++++++++++++
 tests/tcg/configure.sh                              |  2 +-
 3 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 tests/docker/dockerfiles/debian-s390x-test-cross.docker

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index f1a0c5db7a..e77e5a2f40 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -210,6 +210,7 @@ docker-image-debian-arm64-test-cross: docker-image-debian11
 docker-image-debian-microblaze-cross: docker-image-debian10
 docker-image-debian-nios2-cross: docker-image-debian10
 docker-image-debian-powerpc-test-cross: docker-image-debian11
+docker-image-debian-s390x-test-cross: docker-image-debian11
 
 # These images may be good enough for building tests but not for test builds
 DOCKER_PARTIAL_IMAGES += debian-alpha-cross
@@ -219,6 +220,7 @@ DOCKER_PARTIAL_IMAGES += debian-hppa-cross
 DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
 DOCKER_PARTIAL_IMAGES += debian-microblaze-cross
 DOCKER_PARTIAL_IMAGES += debian-nios2-cross
+DOCKER_PARTIAL_IMAGES += debian-s390x-test-cross
 DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross
 DOCKER_PARTIAL_IMAGES += debian-tricore-cross
 DOCKER_PARTIAL_IMAGES += debian-xtensa-cross
diff --git a/tests/docker/dockerfiles/debian-s390x-test-cross.docker b/tests/docker/dockerfiles/debian-s390x-test-cross.docker
new file mode 100644
index 0000000000..26435287b6
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-s390x-test-cross.docker
@@ -0,0 +1,13 @@
+#
+# Docker s390x cross-compiler target (tests only)
+#
+# This docker target builds on the debian Bullseye base image.
+#
+FROM qemu/debian11
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture s390x
+RUN apt update && \
+    DEBIAN_FRONTEND=noninteractive eatmydata \
+        apt install -y --no-install-recommends \
+        crossbuild-essential-s390x gcc-10-s390x-linux-gnu
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 763e9b6ad8..3f00f9307f 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -185,7 +185,7 @@ for target in $target_list; do
       ;;
     s390x-*)
       container_hosts=x86_64
-      container_image=debian-s390x-cross
+      container_image=debian-s390x-test-cross
       container_cross_cc=s390x-linux-gnu-gcc
       ;;
     sh4-*)
-- 
2.34.1

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2022-02-16 10:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 20:27 [PATCH v3 3/3] s390x/tcg/tests: Tests for Miscellaneous-Instruction-Extensions Facility 3 David Miller
2022-02-16  9:17 ` David Hildenbrand
2022-02-16  9:28   ` Christian Borntraeger
2022-02-16  9:30     ` David Hildenbrand
2022-02-16  9:43   ` Thomas Huth
2022-02-16  9:53     ` David Hildenbrand [this message]
2022-02-16 14:19   ` Alex Bennée
2022-02-16 14:27     ` David Hildenbrand
2022-02-16  9:57 ` David Hildenbrand
2022-02-16 10:58   ` David Hildenbrand
2022-02-16 11:05 ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27d96cc5-5816-b719-22f7-2b60bb5f9400@redhat.com \
    --to=david@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=dmiller423@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=farman@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).