* [PATCH 0/2] tests/docker: tests/tcg/ppc64le: Newer toolchain to build tests for PowerISA v3.1 instructions
@ 2021-04-20 1:33 matheus.ferst
2021-04-20 1:33 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests matheus.ferst
2021-04-20 1:33 ` [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd matheus.ferst
0 siblings, 2 replies; 13+ messages in thread
From: matheus.ferst @ 2021-04-20 1:33 UTC (permalink / raw)
To: qemu-devel
Cc: Matheus Ferst, gustavo.romero, f4bug, qemu-ppc, bruno.larsen,
alex.bennee, david
From: Matheus Ferst <matheus.ferst@eldorado.org.br>
This series adds gcc-10 based images to enable the build of tests with Power10
instructions. Then, to put it to good use, a tests for the byte-reverse
instructions (implemented in 9d69cfa2faa7) is introduced.
Matheus Ferst (2):
tests/docker: gcc-10 based images for ppc64{,le} tests
tests/tcg/ppc64le: tests for brh/brw/brd
tests/docker/Makefile.include | 2 ++
.../debian-powerpc-test-cross.docker | 17 ++++++++++++++
tests/tcg/configure.sh | 12 ++++++----
tests/tcg/ppc64/Makefile.target | 7 ++++++
tests/tcg/ppc64le/Makefile.target | 7 ++++++
tests/tcg/ppc64le/byte_reverse.c | 22 +++++++++++++++++++
6 files changed, 63 insertions(+), 4 deletions(-)
create mode 100644 tests/docker/dockerfiles/debian-powerpc-test-cross.docker
create mode 100644 tests/tcg/ppc64le/byte_reverse.c
--
2.25.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests
2021-04-20 1:33 [PATCH 0/2] tests/docker: tests/tcg/ppc64le: Newer toolchain to build tests for PowerISA v3.1 instructions matheus.ferst
@ 2021-04-20 1:33 ` matheus.ferst
2021-04-20 3:59 ` David Gibson
2021-04-20 1:33 ` [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd matheus.ferst
1 sibling, 1 reply; 13+ messages in thread
From: matheus.ferst @ 2021-04-20 1:33 UTC (permalink / raw)
To: qemu-devel
Cc: Matheus Ferst, gustavo.romero, f4bug, qemu-ppc, bruno.larsen,
alex.bennee, david
From: Matheus Ferst <matheus.ferst@eldorado.org.br>
A newer compiler is needed to build tests for Power10 instructions. As
done for arm64 on c729a99d2701, a new '-test-cross' image is created for
ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support
is added to verify that the toolchain in use has '-mpower10'.
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
tests/docker/Makefile.include | 2 ++
.../debian-powerpc-test-cross.docker | 17 +++++++++++++++++
tests/tcg/configure.sh | 12 ++++++++----
3 files changed, 27 insertions(+), 4 deletions(-)
create mode 100644 tests/docker/dockerfiles/debian-powerpc-test-cross.docker
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 9f464cb92c..f1dbcc639f 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -152,10 +152,12 @@ docker-image-debian-sparc64-cross: docker-image-debian10
docker-image-debian-tricore-cross: docker-image-debian10
docker-image-debian-all-test-cross: docker-image-debian10
docker-image-debian-arm64-test-cross: docker-image-debian11
+docker-image-debian-power-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
DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross
+DOCKER_PARTIAL_IMAGES += debian-power-test-cross
DOCKER_PARTIAL_IMAGES += debian-hppa-cross
DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
new file mode 100644
index 0000000000..36b336f709
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
@@ -0,0 +1,17 @@
+#
+# Docker powerpc/ppc64/ppc64le cross-compiler target
+#
+# This docker target builds on the debian Bullseye base image.
+#
+FROM qemu/debian11
+
+RUN apt update && \
+ DEBIAN_FRONTEND=noninteractive eatmydata \
+ apt install -y --no-install-recommends \
+ gcc-powerpc-linux-gnu \
+ libc6-dev-powerpc-cross \
+ gcc-10-powerpc64-linux-gnu \
+ libc6-dev-ppc64-cross \
+ gcc-10-powerpc64le-linux-gnu \
+ libc6-dev-ppc64el-cross
+
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index fa1a4261a4..a0be066499 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -170,13 +170,13 @@ for target in $target_list; do
;;
ppc64-*)
container_hosts=x86_64
- container_image=debian-ppc64-cross
- container_cross_cc=powerpc64-linux-gnu-gcc
+ container_image=debian-powerpc-test-cross
+ container_cross_cc=powerpc64-linux-gnu-gcc-10
;;
ppc64le-*)
container_hosts=x86_64
- container_image=debian-ppc64el-cross
- container_cross_cc=powerpc64le-linux-gnu-gcc
+ container_image=debian-powerpc-test-cross
+ container_cross_cc=powerpc64le-linux-gnu-gcc-10
;;
riscv64-*)
container_hosts=x86_64
@@ -280,6 +280,10 @@ for target in $target_list; do
-mpower8-vector -o $TMPE $TMPC; then
echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
fi
+ if do_compiler "$target_compiler" $target_compiler_cflags \
+ -mpower10 -o $TMPE $TMPC; then
+ echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
+ fi
;;
i386-linux-user)
if do_compiler "$target_compiler" $target_compiler_cflags \
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd
2021-04-20 1:33 [PATCH 0/2] tests/docker: tests/tcg/ppc64le: Newer toolchain to build tests for PowerISA v3.1 instructions matheus.ferst
2021-04-20 1:33 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests matheus.ferst
@ 2021-04-20 1:33 ` matheus.ferst
2021-04-20 14:58 ` Richard Henderson
2021-04-20 14:58 ` Richard Henderson
1 sibling, 2 replies; 13+ messages in thread
From: matheus.ferst @ 2021-04-20 1:33 UTC (permalink / raw)
To: qemu-devel
Cc: Matheus Ferst, gustavo.romero, f4bug, qemu-ppc, bruno.larsen,
alex.bennee, david
From: Matheus Ferst <matheus.ferst@eldorado.org.br>
Tests for Byte-Reverse Halfword, Word and Doubleword
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
tests/tcg/ppc64/Makefile.target | 7 +++++++
tests/tcg/ppc64le/Makefile.target | 7 +++++++
tests/tcg/ppc64le/byte_reverse.c | 22 ++++++++++++++++++++++
3 files changed, 36 insertions(+)
create mode 100644 tests/tcg/ppc64le/byte_reverse.c
diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.target
index 0c6a4585fc..55c690c8ad 100644
--- a/tests/tcg/ppc64/Makefile.target
+++ b/tests/tcg/ppc64/Makefile.target
@@ -10,4 +10,11 @@ PPC64_TESTS=bcdsub
endif
bcdsub: CFLAGS += -mpower8-vector
+ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),)
+POWER10_TESTS=byte_reverse
+RUN_POWER10_TESTS=$(patsubst %, run-%, $(POWER10_TESTS))
+$(RUN_POWER10_TESTS): QEMU_OPTS+=-cpu POWER10
+PPC64_TESTS += $(POWER10_TESTS)
+endif
+
TESTS += $(PPC64_TESTS)
diff --git a/tests/tcg/ppc64le/Makefile.target b/tests/tcg/ppc64le/Makefile.target
index 1acfcff94a..517d290b1a 100644
--- a/tests/tcg/ppc64le/Makefile.target
+++ b/tests/tcg/ppc64le/Makefile.target
@@ -9,4 +9,11 @@ PPC64LE_TESTS=bcdsub
endif
bcdsub: CFLAGS += -mpower8-vector
+ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),)
+POWER10_TESTS=byte_reverse
+RUN_POWER10_TESTS=$(patsubst %, run-%, $(POWER10_TESTS))
+$(RUN_POWER10_TESTS): QEMU_OPTS+=-cpu POWER10
+PPC64LE_TESTS += $(POWER10_TESTS)
+endif
+
TESTS += $(PPC64LE_TESTS)
diff --git a/tests/tcg/ppc64le/byte_reverse.c b/tests/tcg/ppc64le/byte_reverse.c
new file mode 100644
index 0000000000..553b9870ae
--- /dev/null
+++ b/tests/tcg/ppc64le/byte_reverse.c
@@ -0,0 +1,22 @@
+#include <stdio.h>
+#include <assert.h>
+
+int main(void)
+{
+ unsigned long var;
+
+ var = 0xFEDCBA9876543210;
+ asm("brh %0, %0" : "=r"(var));
+ assert(var == 0xDCFE98BA54761032);
+
+ var = 0xFEDCBA9876543210;
+ asm("brw %0, %0" : "=r"(var));
+ assert(var == 0x98BADCFE10325476);
+
+ var = 0xFEDCBA9876543210;
+ asm("brd %0, %0" : "=r"(var));
+ assert(var == 0x1032547698BADCFE);
+
+ return 0;
+}
+
--
2.25.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests
2021-04-20 1:33 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests matheus.ferst
@ 2021-04-20 3:59 ` David Gibson
2021-04-20 12:20 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests Alex Bennée
0 siblings, 1 reply; 13+ messages in thread
From: David Gibson @ 2021-04-20 3:59 UTC (permalink / raw)
To: matheus.ferst
Cc: gustavo.romero, qemu-devel, f4bug, qemu-ppc, bruno.larsen, alex.bennee
[-- Attachment #1: Type: text/plain, Size: 4610 bytes --]
On Mon, Apr 19, 2021 at 10:33:07PM -0300, matheus.ferst@eldorado.org.br wrote:
> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>
> A newer compiler is needed to build tests for Power10 instructions. As
> done for arm64 on c729a99d2701, a new '-test-cross' image is created for
> ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support
> is added to verify that the toolchain in use has '-mpower10'.
>
> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
> ---
> tests/docker/Makefile.include | 2 ++
> .../debian-powerpc-test-cross.docker | 17 +++++++++++++++++
> tests/tcg/configure.sh | 12 ++++++++----
> 3 files changed, 27 insertions(+), 4 deletions(-)
> create mode 100644 tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 9f464cb92c..f1dbcc639f 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -152,10 +152,12 @@ docker-image-debian-sparc64-cross: docker-image-debian10
> docker-image-debian-tricore-cross: docker-image-debian10
> docker-image-debian-all-test-cross: docker-image-debian10
> docker-image-debian-arm64-test-cross: docker-image-debian11
> +docker-image-debian-power-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
> DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross
> +DOCKER_PARTIAL_IMAGES += debian-power-test-cross
You add these "power" (as opposed to "powerpc" or "ppc64" or whatever)
images here, but they don't seem to be referenced anywhere else.
> DOCKER_PARTIAL_IMAGES += debian-hppa-cross
> DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
> DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
> diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
> new file mode 100644
> index 0000000000..36b336f709
> --- /dev/null
> +++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
> @@ -0,0 +1,17 @@
> +#
> +# Docker powerpc/ppc64/ppc64le cross-compiler target
> +#
> +# This docker target builds on the debian Bullseye base image.
> +#
> +FROM qemu/debian11
> +
> +RUN apt update && \
> + DEBIAN_FRONTEND=noninteractive eatmydata \
> + apt install -y --no-install-recommends \
> + gcc-powerpc-linux-gnu \
> + libc6-dev-powerpc-cross \
> + gcc-10-powerpc64-linux-gnu \
> + libc6-dev-ppc64-cross \
> + gcc-10-powerpc64le-linux-gnu \
> + libc6-dev-ppc64el-cross
I'm not really clear on what distinguishes a -cross.docker image and a
-test-cross.docker image.
> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
> index fa1a4261a4..a0be066499 100755
> --- a/tests/tcg/configure.sh
> +++ b/tests/tcg/configure.sh
> @@ -170,13 +170,13 @@ for target in $target_list; do
> ;;
> ppc64-*)
> container_hosts=x86_64
> - container_image=debian-ppc64-cross
> - container_cross_cc=powerpc64-linux-gnu-gcc
> + container_image=debian-powerpc-test-cross
> + container_cross_cc=powerpc64-linux-gnu-gcc-10
> ;;
> ppc64le-*)
> container_hosts=x86_64
> - container_image=debian-ppc64el-cross
> - container_cross_cc=powerpc64le-linux-gnu-gcc
> + container_image=debian-powerpc-test-cross
> + container_cross_cc=powerpc64le-linux-gnu-gcc-10
Doesn't this remove all uses of the debian-pp64-cross and
debian-ppc64el-cross images, in which case you could remove the
matching docker files and so forth too, no?
> ;;
> riscv64-*)
> container_hosts=x86_64
> @@ -280,6 +280,10 @@ for target in $target_list; do
> -mpower8-vector -o $TMPE $TMPC; then
> echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
> fi
> + if do_compiler "$target_compiler" $target_compiler_cflags \
> + -mpower10 -o $TMPE $TMPC; then
> + echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
> + fi
> ;;
> i386-linux-user)
> if do_compiler "$target_compiler" $target_compiler_cflags \
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests
2021-04-20 3:59 ` David Gibson
@ 2021-04-20 12:20 ` Alex Bennée
2021-04-20 12:35 ` Philippe Mathieu-Daudé
2021-04-20 14:31 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests Matheus K. Ferst
0 siblings, 2 replies; 13+ messages in thread
From: Alex Bennée @ 2021-04-20 12:20 UTC (permalink / raw)
To: David Gibson
Cc: gustavo.romero, qemu-devel, f4bug, qemu-ppc, bruno.larsen, matheus.ferst
David Gibson <david@gibson.dropbear.id.au> writes:
> On Mon, Apr 19, 2021 at 10:33:07PM -0300, matheus.ferst@eldorado.org.br wrote:
>> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>
>> A newer compiler is needed to build tests for Power10 instructions. As
>> done for arm64 on c729a99d2701, a new '-test-cross' image is created for
>> ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support
>> is added to verify that the toolchain in use has '-mpower10'.
>>
>> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
>> ---
>> tests/docker/Makefile.include | 2 ++
>> .../debian-powerpc-test-cross.docker | 17 +++++++++++++++++
>> tests/tcg/configure.sh | 12 ++++++++----
>> 3 files changed, 27 insertions(+), 4 deletions(-)
>> create mode 100644 tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>
>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>> index 9f464cb92c..f1dbcc639f 100644
>> --- a/tests/docker/Makefile.include
>> +++ b/tests/docker/Makefile.include
>> @@ -152,10 +152,12 @@ docker-image-debian-sparc64-cross: docker-image-debian10
>> docker-image-debian-tricore-cross: docker-image-debian10
>> docker-image-debian-all-test-cross: docker-image-debian10
>> docker-image-debian-arm64-test-cross: docker-image-debian11
>> +docker-image-debian-power-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
>> DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross
>> +DOCKER_PARTIAL_IMAGES += debian-power-test-cross
>
> You add these "power" (as opposed to "powerpc" or "ppc64" or whatever)
> images here, but they don't seem to be referenced anywhere else.
>
>> DOCKER_PARTIAL_IMAGES += debian-hppa-cross
>> DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
>> DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
I was expecting the new debian-power-test-cross to replace both
debian-powerpc-cross and debian-ppc64-cross.
>> diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>> new file mode 100644
>> index 0000000000..36b336f709
>> --- /dev/null
>> +++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>> @@ -0,0 +1,17 @@
>> +#
>> +# Docker powerpc/ppc64/ppc64le cross-compiler target
>> +#
>> +# This docker target builds on the debian Bullseye base image.
>> +#
>> +FROM qemu/debian11
>> +
>> +RUN apt update && \
>> + DEBIAN_FRONTEND=noninteractive eatmydata \
>> + apt install -y --no-install-recommends \
>> + gcc-powerpc-linux-gnu \
>> + libc6-dev-powerpc-cross \
>> + gcc-10-powerpc64-linux-gnu \
>> + libc6-dev-ppc64-cross \
>> + gcc-10-powerpc64le-linux-gnu \
>> + libc6-dev-ppc64el-cross
>
> I'm not really clear on what distinguishes a -cross.docker image and a
> -test-cross.docker image.
The normal cross image (debian-ppc64le-cross) can cross build QEMU. The
-test-cross images are just used for building check-tcg test cases.
>
>> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
>> index fa1a4261a4..a0be066499 100755
>> --- a/tests/tcg/configure.sh
>> +++ b/tests/tcg/configure.sh
>> @@ -170,13 +170,13 @@ for target in $target_list; do
>> ;;
>> ppc64-*)
>> container_hosts=x86_64
>> - container_image=debian-ppc64-cross
>> - container_cross_cc=powerpc64-linux-gnu-gcc
>> + container_image=debian-powerpc-test-cross
>> + container_cross_cc=powerpc64-linux-gnu-gcc-10
>> ;;
>> ppc64le-*)
>> container_hosts=x86_64
>> - container_image=debian-ppc64el-cross
>> - container_cross_cc=powerpc64le-linux-gnu-gcc
>> + container_image=debian-powerpc-test-cross
>> + container_cross_cc=powerpc64le-linux-gnu-gcc-10
>
> Doesn't this remove all uses of the debian-pp64-cross and
Yes this should be removed.
> debian-ppc64el-cross images, in which case you could remove the
> matching docker files and so forth too, no?
Well I assume you still want to check cross building of QEMU. Arguably
we could still use that for the test cases as well.
>
>> ;;
>> riscv64-*)
>> container_hosts=x86_64
>> @@ -280,6 +280,10 @@ for target in $target_list; do
>> -mpower8-vector -o $TMPE $TMPC; then
>> echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
>> fi
>> + if do_compiler "$target_compiler" $target_compiler_cflags \
>> + -mpower10 -o $TMPE $TMPC; then
>> + echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
>> + fi
>> ;;
>> i386-linux-user)
>> if do_compiler "$target_compiler" $target_compiler_cflags \
--
Alex Bennée
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests
2021-04-20 12:20 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests Alex Bennée
@ 2021-04-20 12:35 ` Philippe Mathieu-Daudé
2021-04-20 15:06 ` Matheus K. Ferst
2021-04-20 14:31 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests Matheus K. Ferst
1 sibling, 1 reply; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-20 12:35 UTC (permalink / raw)
To: Alex Bennée, David Gibson
Cc: bruno.larsen, gustavo.romero, qemu-ppc, qemu-devel, matheus.ferst
On 4/20/21 2:20 PM, Alex Bennée wrote:
> David Gibson <david@gibson.dropbear.id.au> writes:
>> On Mon, Apr 19, 2021 at 10:33:07PM -0300, matheus.ferst@eldorado.org.br wrote:
>>> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>>
>>> A newer compiler is needed to build tests for Power10 instructions. As
>>> done for arm64 on c729a99d2701, a new '-test-cross' image is created for
>>> ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support
>>> is added to verify that the toolchain in use has '-mpower10'.
>>>
>>> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>> ---
>>> tests/docker/Makefile.include | 2 ++
>>> .../debian-powerpc-test-cross.docker | 17 +++++++++++++++++
>>> tests/tcg/configure.sh | 12 ++++++++----
>>> 3 files changed, 27 insertions(+), 4 deletions(-)
>>> create mode 100644 tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>>
>>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>>> index 9f464cb92c..f1dbcc639f 100644
>>> --- a/tests/docker/Makefile.include
>>> +++ b/tests/docker/Makefile.include
>>> @@ -152,10 +152,12 @@ docker-image-debian-sparc64-cross: docker-image-debian10
>>> docker-image-debian-tricore-cross: docker-image-debian10
>>> docker-image-debian-all-test-cross: docker-image-debian10
>>> docker-image-debian-arm64-test-cross: docker-image-debian11
>>> +docker-image-debian-power-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
>>> DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross
>>> +DOCKER_PARTIAL_IMAGES += debian-power-test-cross
>>
>> You add these "power" (as opposed to "powerpc" or "ppc64" or whatever)
>> images here, but they don't seem to be referenced anywhere else.
>>
>>> DOCKER_PARTIAL_IMAGES += debian-hppa-cross
>>> DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
>>> DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
>
> I was expecting the new debian-power-test-cross to replace both
> debian-powerpc-cross and debian-ppc64-cross.
Maybe rename the images as:
DISTRIB-TARGET-crossbuild and DISTRIB-TARGET-crosstest-tcg?
(as it is not obvious for every contributor than 'cross' imply
emulation and not virtualization).
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests
2021-04-20 12:20 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests Alex Bennée
2021-04-20 12:35 ` Philippe Mathieu-Daudé
@ 2021-04-20 14:31 ` Matheus K. Ferst
2021-04-20 16:53 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests Alex Bennée
1 sibling, 1 reply; 13+ messages in thread
From: Matheus K. Ferst @ 2021-04-20 14:31 UTC (permalink / raw)
To: Alex Bennée, David Gibson
Cc: bruno.larsen, gustavo.romero, qemu-ppc, qemu-devel, f4bug
On 20/04/2021 09:20, Alex Bennée wrote:
>
> David Gibson <david@gibson.dropbear.id.au> writes:
>
>> On Mon, Apr 19, 2021 at 10:33:07PM -0300, matheus.ferst@eldorado.org.br wrote:
>>> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>>
>>> A newer compiler is needed to build tests for Power10 instructions. As
>>> done for arm64 on c729a99d2701, a new '-test-cross' image is created for
>>> ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support
>>> is added to verify that the toolchain in use has '-mpower10'.
>>>
>>> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>> ---
>>> tests/docker/Makefile.include | 2 ++
>>> .../debian-powerpc-test-cross.docker | 17 +++++++++++++++++
>>> tests/tcg/configure.sh | 12 ++++++++----
>>> 3 files changed, 27 insertions(+), 4 deletions(-)
>>> create mode 100644 tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>>
>>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>>> index 9f464cb92c..f1dbcc639f 100644
>>> --- a/tests/docker/Makefile.include
>>> +++ b/tests/docker/Makefile.include
>>> @@ -152,10 +152,12 @@ docker-image-debian-sparc64-cross: docker-image-debian10
>>> docker-image-debian-tricore-cross: docker-image-debian10
>>> docker-image-debian-all-test-cross: docker-image-debian10
>>> docker-image-debian-arm64-test-cross: docker-image-debian11
>>> +docker-image-debian-power-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
>>> DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross
>>> +DOCKER_PARTIAL_IMAGES += debian-power-test-cross
>>
>> You add these "power" (as opposed to "powerpc" or "ppc64" or whatever)
>> images here, but they don't seem to be referenced anywhere else.
>>
It's a typo. Probably worked on my machine because a correctly named image
was created outside qemu build before. I'll nuke docker and test again.
>>> DOCKER_PARTIAL_IMAGES += debian-hppa-cross
>>> DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
>>> DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
>
> I was expecting the new debian-power-test-cross to replace both
> debian-powerpc-cross and debian-ppc64-cross.
>
OK, I'll change for powerpc too.
>>> diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>> new file mode 100644
>>> index 0000000000..36b336f709
>>> --- /dev/null
>>> +++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>> @@ -0,0 +1,17 @@
>>> +#
>>> +# Docker powerpc/ppc64/ppc64le cross-compiler target
>>> +#
>>> +# This docker target builds on the debian Bullseye base image.
>>> +#
>>> +FROM qemu/debian11
>>> +
>>> +RUN apt update && \
>>> + DEBIAN_FRONTEND=noninteractive eatmydata \
>>> + apt install -y --no-install-recommends \
>>> + gcc-powerpc-linux-gnu \
>>> + libc6-dev-powerpc-cross \
>>> + gcc-10-powerpc64-linux-gnu \
>>> + libc6-dev-ppc64-cross \
>>> + gcc-10-powerpc64le-linux-gnu \
>>> + libc6-dev-ppc64el-cross
>>
>> I'm not really clear on what distinguishes a -cross.docker image and a
>> -test-cross.docker image.
>
> The normal cross image (debian-ppc64le-cross) can cross build QEMU. The
> -test-cross images are just used for building check-tcg test cases.
>
>>
>>> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
>>> index fa1a4261a4..a0be066499 100755
>>> --- a/tests/tcg/configure.sh
>>> +++ b/tests/tcg/configure.sh
>>> @@ -170,13 +170,13 @@ for target in $target_list; do
>>> ;;
>>> ppc64-*)
>>> container_hosts=x86_64
>>> - container_image=debian-ppc64-cross
>>> - container_cross_cc=powerpc64-linux-gnu-gcc
>>> + container_image=debian-powerpc-test-cross
>>> + container_cross_cc=powerpc64-linux-gnu-gcc-10
>>> ;;
>>> ppc64le-*)
>>> container_hosts=x86_64
>>> - container_image=debian-ppc64el-cross
>>> - container_cross_cc=powerpc64le-linux-gnu-gcc
>>> + container_image=debian-powerpc-test-cross
>>> + container_cross_cc=powerpc64le-linux-gnu-gcc-10
>>
>> Doesn't this remove all uses of the debian-pp64-cross and
>
> Yes this should be removed.
>
Done.
>> debian-ppc64el-cross images, in which case you could remove the
>> matching docker files and so forth too, no?
>
> Well I assume you still want to check cross building of QEMU. Arguably
> we could still use that for the test cases as well.
>
But then we have the old gcc that can't handle the new instructions, which
is why I started the series :)
>>
>>> ;;
>>> riscv64-*)
>>> container_hosts=x86_64
>>> @@ -280,6 +280,10 @@ for target in $target_list; do
>>> -mpower8-vector -o $TMPE $TMPC; then
>>> echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
>>> fi
>>> + if do_compiler "$target_compiler" $target_compiler_cflags \
>>> + -mpower10 -o $TMPE $TMPC; then
>>> + echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
>>> + fi
>>> ;;
>>> i386-linux-user)
>>> if do_compiler "$target_compiler" $target_compiler_cflags \
>
>
Oh, about nesting "ppc64-*" and "ppc64le-*" in tests/tcg/configure.sh:
>>> +# Specify the cross prefix for this image (see tests/docker/common.rc)
>>> +#ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
>>> +#ENV DEF_TARGET_LIST
ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
>>> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
>>> index fa1a4261a4..5f5db91a01 100755
>>> --- a/tests/tcg/configure.sh
>>> +++ b/tests/tcg/configure.sh
>>> @@ -170,13 +170,13 @@ for target in $target_list; do
>>> ;;
>>> ppc64-*)
>>> container_hosts=x86_64
>>> - container_image=debian-ppc64-cross
>>> - container_cross_cc=powerpc64-linux-gnu-gcc
>>> + container_image=debian-ppc64-test-cross
>>> + container_cross_cc=powerpc64-linux-gnu-gcc-10
>>> ;;
>>> ppc64le-*)
>>> container_hosts=x86_64
>>> - container_image=debian-ppc64el-cross
>>> - container_cross_cc=powerpc64le-linux-gnu-gcc
>>> + container_image=debian-ppc64el-test-cross
>>> + container_cross_cc=powerpc64le-linux-gnu-gcc-10
>>> ;;
>>
> I don't know if it's possible to nest the cases but if it's not too
> ugly bringing all the cases into one place and just differentiating the
> container_cross_cc would be nice.
We could do something like:
> ppc64*-|ppc64le-*)
> container_hosts=x86_64
> container_image=debian-powerpc-test-cross
> container_cross_cc=${target%%-*}-linux-gnu-gcc-10
> container_cross_cc=powerpc${container_cross_cc#ppc}
But I think it's kind of ugly to repeat container_cross_cc line. If we do
that, we can bring ppc-* too, but another line would be needed to handle
ppc64abi32-*...
--
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software Júnior
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd
2021-04-20 1:33 ` [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd matheus.ferst
@ 2021-04-20 14:58 ` Richard Henderson
2021-04-20 15:12 ` Matheus K. Ferst
2021-04-20 14:58 ` Richard Henderson
1 sibling, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2021-04-20 14:58 UTC (permalink / raw)
To: matheus.ferst, qemu-devel
Cc: gustavo.romero, f4bug, qemu-ppc, bruno.larsen, alex.bennee, david
On 4/19/21 6:33 PM, matheus.ferst@eldorado.org.br wrote:
> + var = 0xFEDCBA9876543210;
> + asm("brh %0, %0" : "=r"(var));
> + assert(var == 0xDCFE98BA54761032);
Incorrect inline assembly, you are not declaring an input.
Use "+r" for in/out argument.
r~
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd
2021-04-20 1:33 ` [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd matheus.ferst
2021-04-20 14:58 ` Richard Henderson
@ 2021-04-20 14:58 ` Richard Henderson
2021-04-20 15:12 ` Matheus K. Ferst
1 sibling, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2021-04-20 14:58 UTC (permalink / raw)
To: matheus.ferst, qemu-devel
Cc: gustavo.romero, f4bug, qemu-ppc, bruno.larsen, alex.bennee, david
On 4/19/21 6:33 PM, matheus.ferst@eldorado.org.br wrote:
> +#include <stdio.h>
> +#include <assert.h>
> +
> +int main(void)
> +{
Oh, also, there's nothing in here that requires stdio.h.
r~
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests
2021-04-20 12:35 ` Philippe Mathieu-Daudé
@ 2021-04-20 15:06 ` Matheus K. Ferst
0 siblings, 0 replies; 13+ messages in thread
From: Matheus K. Ferst @ 2021-04-20 15:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Alex Bennée, David Gibson
Cc: bruno.larsen, gustavo.romero, qemu-ppc, qemu-devel
On 20/04/2021 09:35, Philippe Mathieu-Daudé wrote:
> On 4/20/21 2:20 PM, Alex Bennée wrote:
>> David Gibson <david@gibson.dropbear.id.au> writes:
>>> On Mon, Apr 19, 2021 at 10:33:07PM -0300, matheus.ferst@eldorado.org.br wrote:
>>>> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>>>
>>>> A newer compiler is needed to build tests for Power10 instructions. As
>>>> done for arm64 on c729a99d2701, a new '-test-cross' image is created for
>>>> ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support
>>>> is added to verify that the toolchain in use has '-mpower10'.
>>>>
>>>> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>>> ---
>>>> tests/docker/Makefile.include | 2 ++
>>>> .../debian-powerpc-test-cross.docker | 17 +++++++++++++++++
>>>> tests/tcg/configure.sh | 12 ++++++++----
>>>> 3 files changed, 27 insertions(+), 4 deletions(-)
>>>> create mode 100644 tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>>>
>>>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>>>> index 9f464cb92c..f1dbcc639f 100644
>>>> --- a/tests/docker/Makefile.include
>>>> +++ b/tests/docker/Makefile.include
>>>> @@ -152,10 +152,12 @@ docker-image-debian-sparc64-cross: docker-image-debian10
>>>> docker-image-debian-tricore-cross: docker-image-debian10
>>>> docker-image-debian-all-test-cross: docker-image-debian10
>>>> docker-image-debian-arm64-test-cross: docker-image-debian11
>>>> +docker-image-debian-power-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
>>>> DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross
>>>> +DOCKER_PARTIAL_IMAGES += debian-power-test-cross
>>>
>>> You add these "power" (as opposed to "powerpc" or "ppc64" or whatever)
>>> images here, but they don't seem to be referenced anywhere else.
>>>
>>>> DOCKER_PARTIAL_IMAGES += debian-hppa-cross
>>>> DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
>>>> DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
>>
>> I was expecting the new debian-power-test-cross to replace both
>> debian-powerpc-cross and debian-ppc64-cross.
>
> Maybe rename the images as:
>
> DISTRIB-TARGET-crossbuild and DISTRIB-TARGET-crosstest-tcg?
> (as it is not obvious for every contributor than 'cross' imply
> emulation and not virtualization).
>
If I grep'ed it correctly, in a separate patch we'd mv:
debian-alpha-cross{,test-tcg}.docker
debian-arm64-{test-cross,crosstest-tcg}.docker
debian-hppa-cross{,test-tcg}.docker
debian-m68k-cross{,test-tcg}.docker
debian-mips64-cross{,test-tcg}.docker
debian-powerpc-cross{,test-tcg}.docker
debian-riscv64-cross{,test-tcg}.docker
debian-sh4-cross{,test-tcg}.docker
debian-sparc64-cross{,test-tcg}.docker
debian-tricore-cross{,test-tcg}.docker
debian-xtensa-cross{,test-tcg}.docker
debian-amd64-cross{,build}.docker
debian-arm64-cross{,build}.docker
debian-armel-cross{,build}.docker
debian-armhf-cross{,build}.docker
debian-mips64el-cross{,build}.docker
debian-mips-cross{,build}.docker
debian-mipsel-cross{,build}.docker
debian-ppc64{el-cross,le-crossbuild}.docker
debian-s390x-cross{,build}.docker
--
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software Júnior
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd
2021-04-20 14:58 ` Richard Henderson
@ 2021-04-20 15:12 ` Matheus K. Ferst
0 siblings, 0 replies; 13+ messages in thread
From: Matheus K. Ferst @ 2021-04-20 15:12 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: gustavo.romero, f4bug, qemu-ppc, bruno.larsen, alex.bennee, david
On 20/04/2021 11:58, Richard Henderson wrote:
> On 4/19/21 6:33 PM, matheus.ferst@eldorado.org.br wrote:
>> + var = 0xFEDCBA9876543210;
>> + asm("brh %0, %0" : "=r"(var));
>> + assert(var == 0xDCFE98BA54761032);
>
> Incorrect inline assembly, you are not declaring an input.
> Use "+r" for in/out argument.
>
>
> r~
Fixed, thanks!
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software Júnior
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd
2021-04-20 14:58 ` Richard Henderson
@ 2021-04-20 15:12 ` Matheus K. Ferst
0 siblings, 0 replies; 13+ messages in thread
From: Matheus K. Ferst @ 2021-04-20 15:12 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: gustavo.romero, f4bug, qemu-ppc, bruno.larsen, alex.bennee, david
On 20/04/2021 11:58, Richard Henderson wrote:
> On 4/19/21 6:33 PM, matheus.ferst@eldorado.org.br wrote:
>> +#include <stdio.h>
>> +#include <assert.h>
>> +
>> +int main(void)
>> +{
>
> Oh, also, there's nothing in here that requires stdio.h.
>
>
> r~
Forgot to remove. Will be fixed in the next version.
Thanks,
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software Júnior
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests
2021-04-20 14:31 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests Matheus K. Ferst
@ 2021-04-20 16:53 ` Alex Bennée
0 siblings, 0 replies; 13+ messages in thread
From: Alex Bennée @ 2021-04-20 16:53 UTC (permalink / raw)
To: Matheus K. Ferst
Cc: gustavo.romero, f4bug, qemu-devel, qemu-ppc, bruno.larsen, David Gibson
"Matheus K. Ferst" <matheus.ferst@eldorado.org.br> writes:
> On 20/04/2021 09:20, Alex Bennée wrote:
>> David Gibson <david@gibson.dropbear.id.au> writes:
>>
>>> On Mon, Apr 19, 2021 at 10:33:07PM -0300, matheus.ferst@eldorado.org.br wrote:
>>>> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>>>
>>>> A newer compiler is needed to build tests for Power10 instructions. As
>>>> done for arm64 on c729a99d2701, a new '-test-cross' image is created for
>>>> ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support
>>>> is added to verify that the toolchain in use has '-mpower10'.
>>>>
>>>> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
>>>> ---
>>>> tests/docker/Makefile.include | 2 ++
>>>> .../debian-powerpc-test-cross.docker | 17 +++++++++++++++++
>>>> tests/tcg/configure.sh | 12 ++++++++----
>>>> 3 files changed, 27 insertions(+), 4 deletions(-)
>>>> create mode 100644 tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>>>
>>>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>>>> index 9f464cb92c..f1dbcc639f 100644
>>>> --- a/tests/docker/Makefile.include
>>>> +++ b/tests/docker/Makefile.include
>>>> @@ -152,10 +152,12 @@ docker-image-debian-sparc64-cross: docker-image-debian10
>>>> docker-image-debian-tricore-cross: docker-image-debian10
>>>> docker-image-debian-all-test-cross: docker-image-debian10
>>>> docker-image-debian-arm64-test-cross: docker-image-debian11
>>>> +docker-image-debian-power-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
>>>> DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross
>>>> +DOCKER_PARTIAL_IMAGES += debian-power-test-cross
>>>
>>> You add these "power" (as opposed to "powerpc" or "ppc64" or whatever)
>>> images here, but they don't seem to be referenced anywhere else.
>>>
>
> It's a typo. Probably worked on my machine because a correctly named image
> was created outside qemu build before. I'll nuke docker and test again.
>
>>>> DOCKER_PARTIAL_IMAGES += debian-hppa-cross
>>>> DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
>>>> DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
>> I was expecting the new debian-power-test-cross to replace both
>> debian-powerpc-cross and debian-ppc64-cross.
>>
>
> OK, I'll change for powerpc too.
>
>>>> diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>>> new file mode 100644
>>>> index 0000000000..36b336f709
>>>> --- /dev/null
>>>> +++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
>>>> @@ -0,0 +1,17 @@
>>>> +#
>>>> +# Docker powerpc/ppc64/ppc64le cross-compiler target
>>>> +#
>>>> +# This docker target builds on the debian Bullseye base image.
>>>> +#
>>>> +FROM qemu/debian11
>>>> +
>>>> +RUN apt update && \
>>>> + DEBIAN_FRONTEND=noninteractive eatmydata \
>>>> + apt install -y --no-install-recommends \
>>>> + gcc-powerpc-linux-gnu \
>>>> + libc6-dev-powerpc-cross \
>>>> + gcc-10-powerpc64-linux-gnu \
>>>> + libc6-dev-ppc64-cross \
>>>> + gcc-10-powerpc64le-linux-gnu \
>>>> + libc6-dev-ppc64el-cross
>>>
>>> I'm not really clear on what distinguishes a -cross.docker image and a
>>> -test-cross.docker image.
>> The normal cross image (debian-ppc64le-cross) can cross build QEMU.
>> The
>> -test-cross images are just used for building check-tcg test cases.
>>
>>>
>>>> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
>>>> index fa1a4261a4..a0be066499 100755
>>>> --- a/tests/tcg/configure.sh
>>>> +++ b/tests/tcg/configure.sh
>>>> @@ -170,13 +170,13 @@ for target in $target_list; do
>>>> ;;
>>>> ppc64-*)
>>>> container_hosts=x86_64
>>>> - container_image=debian-ppc64-cross
>>>> - container_cross_cc=powerpc64-linux-gnu-gcc
>>>> + container_image=debian-powerpc-test-cross
>>>> + container_cross_cc=powerpc64-linux-gnu-gcc-10
>>>> ;;
>>>> ppc64le-*)
>>>> container_hosts=x86_64
>>>> - container_image=debian-ppc64el-cross
>>>> - container_cross_cc=powerpc64le-linux-gnu-gcc
>>>> + container_image=debian-powerpc-test-cross
>>>> + container_cross_cc=powerpc64le-linux-gnu-gcc-10
>>>
>>> Doesn't this remove all uses of the debian-pp64-cross and
>> Yes this should be removed.
>>
>
> Done.
>
>>> debian-ppc64el-cross images, in which case you could remove the
>>> matching docker files and so forth too, no?
>> Well I assume you still want to check cross building of QEMU.
>> Arguably
>> we could still use that for the test cases as well.
>>
>
> But then we have the old gcc that can't handle the new instructions, which
> is why I started the series :)
Oh right - yes switch to the test-cross... ;-)
>
>>>
>>>> ;;
>>>> riscv64-*)
>>>> container_hosts=x86_64
>>>> @@ -280,6 +280,10 @@ for target in $target_list; do
>>>> -mpower8-vector -o $TMPE $TMPC; then
>>>> echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
>>>> fi
>>>> + if do_compiler "$target_compiler" $target_compiler_cflags \
>>>> + -mpower10 -o $TMPE $TMPC; then
>>>> + echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
>>>> + fi
>>>> ;;
>>>> i386-linux-user)
>>>> if do_compiler "$target_compiler" $target_compiler_cflags \
>>
>
> Oh, about nesting "ppc64-*" and "ppc64le-*" in tests/tcg/configure.sh:
>
>>>> +# Specify the cross prefix for this image (see tests/docker/common.rc)
>>>> +#ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
>>>> +#ENV DEF_TARGET_LIST
> ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
>>>> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
>>>> index fa1a4261a4..5f5db91a01 100755
>>>> --- a/tests/tcg/configure.sh
>>>> +++ b/tests/tcg/configure.sh
>>>> @@ -170,13 +170,13 @@ for target in $target_list; do
>>>> ;;
>>>> ppc64-*)
>>>> container_hosts=x86_64
>>>> - container_image=debian-ppc64-cross
>>>> - container_cross_cc=powerpc64-linux-gnu-gcc
>>>> + container_image=debian-ppc64-test-cross
>>>> + container_cross_cc=powerpc64-linux-gnu-gcc-10
>>>> ;;
>>>> ppc64le-*)
>>>> container_hosts=x86_64
>>>> - container_image=debian-ppc64el-cross
>>>> - container_cross_cc=powerpc64le-linux-gnu-gcc
>>>> + container_image=debian-ppc64el-test-cross
>>>> + container_cross_cc=powerpc64le-linux-gnu-gcc-10
>>>> ;;
>>>
>> I don't know if it's possible to nest the cases but if it's not too
>> ugly bringing all the cases into one place and just differentiating the
>> container_cross_cc would be nice.
>
> We could do something like:
>> ppc64*-|ppc64le-*)
>> container_hosts=x86_64
>> container_image=debian-powerpc-test-cross
>> container_cross_cc=${target%%-*}-linux-gnu-gcc-10
>> container_cross_cc=powerpc${container_cross_cc#ppc}
> But I think it's kind of ugly to repeat container_cross_cc line. If we do
> that, we can bring ppc-* too, but another line would be needed to handle
> ppc64abi32-*...
Lets not over complicate it - but the ppc64/ppc64le in the same
container looks fair enough doesn't it?
--
Alex Bennée
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-04-20 16:57 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 1:33 [PATCH 0/2] tests/docker: tests/tcg/ppc64le: Newer toolchain to build tests for PowerISA v3.1 instructions matheus.ferst
2021-04-20 1:33 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests matheus.ferst
2021-04-20 3:59 ` David Gibson
2021-04-20 12:20 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests Alex Bennée
2021-04-20 12:35 ` Philippe Mathieu-Daudé
2021-04-20 15:06 ` Matheus K. Ferst
2021-04-20 14:31 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{,le} tests Matheus K. Ferst
2021-04-20 16:53 ` [PATCH 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests Alex Bennée
2021-04-20 1:33 ` [PATCH 2/2] tests/tcg/ppc64le: tests for brh/brw/brd matheus.ferst
2021-04-20 14:58 ` Richard Henderson
2021-04-20 15:12 ` Matheus K. Ferst
2021-04-20 14:58 ` Richard Henderson
2021-04-20 15:12 ` Matheus K. Ferst
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.