Skip to contentSkip to conversation

fix building of tests/tcg

PATCH Superseded Alex Bennée 9 participants 93 messages Apr 19, 2018 – Apr 23, 2018 Kbuild

v2 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v2 cover fix building of tests/tcg

Hi,

This is the second revision of my attempt to revive the tests/tcg directory. You can find the first iteration here:

https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg01361.html

Changes:

I've slightly re-jigged the Makefile inclusion to make tests/tcg/Makefile very simple. All the TESTS are added by the various sub-makes. I've also included tests/tcg/$(TARGET_BASE_ARCH)/Makefile.target so common base architectures can include tests. See MIPS for an example.

Missing Targets:

We still have quite a bit of test code that is not built. These are:

* tests/tcg/mips/mip[32|64]-dsp[r]

A bunch of system tests. Also we have no mips64 BE support.

* tests/tcg/alpha

Need a cross-compiler

* tests/tcg/cris

Needs a cross-compiler

* tests/tcg/lm32

Needs a cross-compiler

* tests/tcg/openrisc

Needs a cross-compiler

* tests/tcg/xtensa

Needs a cross-compiler

We should be able to build basic multiarch tests for a bunch of additional linux-user targets. A bunch of our LE target compilers should be able to build BE but I ran into troubles of an incomplete glibc-dev assuming it's not needed. Apparently a newlib based cross-compiler would fix this as it has both LE and BE headers available.

I did start playing with crosstool-ng and Linaro's own ABE scripts but realised this could end up a massive time sync. What would be really helpful is if the respective maintainers could encode their EXACT STEPS for building their cross compilers into some docker recipes.

Missing Cross Compilers:

aarch64_be alpha armeb cris hppa m68k microblaze microblazeel mips64 mipsn32 mipsn32el nios2 or1k ppc ppc64abi32 riscv32 riscv64 sh4 sh4eb sparc sparc32plus sparc64 tilegx xtensa xtensaeb

Finally the end of the series has me adding Emilio's fp-test to the per-target builds. Unfortunately although some osdep.h and softfloat.c fiddling allows us to build in most cases I still can't build for example an i386 fp-test on an x86_64 host using the cross compiler as it triggers incompatibilities with config-host.h - in this case Int128 support. Currently I just hackily disable fp-test for non-64 bit platforms.

While the later patches in the series are a bit of a WIP the earlier patches are certainly deserving of review. Currently the un-reviewed patches are:

patch 0001/docker add probe command for configure.patch needs review patch 0002/configure add test for docker availability.patch needs review patch 0003/configure add support for cross cc FOO.patch needs review patch 0004/configure move i386_cc to cross_cc_i386.patch needs review patch 0005/configure allow user to specify cross cc cflags f.patch needs review patch 0006/configure set cross_cc_FOO for host compiler.patch needs review patch 0009/docker extend cc command to accept compiler.patch needs review patch 0014/tests tcg multiarch enable additional linux test .patch needs review patch 0016/docker Add fedora i386 cross image.patch needs review patch 0017/tests tcg enable building for i386.patch needs review patch 0020/tests tcg i386 fix test i386 fprem.patch needs review patch 0021/tests tcg i386 disable i386 version of test i386 .patch needs review patch 0022/tests tcg x86_64 add Makefile.target.patch needs review patch 0023/tests tcg i386 test i386 use modern vector_size a.patch needs review patch 0024/tests tcg i386 test i386 fix printf format.patch needs review patch 0026/tests tcg arm fix up test arm iwmmxt test.patch needs review patch 0027/tests tcg aarch64 add Makefile.target.patch needs review patch 0028/tests tcg aarch64 add fcvt test cases for AArch64.patch needs review patch 0029/tests tcg aarch64 userspace system register test.patch needs review patch 0031/tests tcg enable building for MIPS.patch needs review patch 0032/tests tcg mips include common mips hello mips.patch needs review patch 0035/tests tcg Makefile update to be called from Makef.patch needs review patch 0036/Makefile.target add clean guest tests targets.patch needs review patch 0038/osdep disable glib compat.h include with QEMU_NO_.patch needs review patch 0039/softfloat do not include glib headers.patch needs review patch 0040/tests add fp test a floating point test suite.patch needs review patch 0041/tests tcg multiarch add fp test into multiarch se.patch needs review

I've merged a few patches but I've kept the review tags so far. As usual there are comments bellow the --- for any changes.

Alex Bennée (35):
configure: add test for docker availability
configure: add support for --cross-cc-FOO
configure: move i386_cc to cross_cc_i386
configure: allow user to specify --cross-cc-cflags-foo=
configure: set cross_cc_FOO for host compiler
docker: Add "cc" subcommand
docker: extend "cc" command to accept compiler
docker: allow "cc" command to run in user context
docker: Makefile.include introduce DOCKER_SCRIPT tests/tcg: move architecture independent tests into subdir tests/tcg/multiarch: enable additional linux-test tests tests/tcg: move i386 specific tests into subdir tests/tcg: enable building for i386 tests/tcg/i386: fix test-i386
tests/tcg/i386: fix test-i386-fprem tests/tcg/i386: disable i386 version of test-i386-ssse tests/tcg/x86_64: add Makefile.target tests/tcg/i386/test-i386: use modern vector_size attributes tests/tcg/i386/test-i386: fix printf format tests/tcg: move ARM specific tests into subdir tests/tcg/arm: fix up test-arm-iwmmxt test tests/tcg/aarch64: add Makefile.target tests/tcg/aarch64: add fcvt test cases for AArch64 tests/tcg/aarch64: userspace system register test tests/tcg: move MIPS specific tests into subdir tests/tcg: enable building for MIPS tests/tcg/mips: include common mips hello-mips tests/tcg: enable building for s390x
tests/tcg: enable building for ppc64 tests/tcg/Makefile: update to be called from Makefile.target Makefile.target: add (clean-)guest-tests targets tests/Makefile.include: add (clean-)check-tcg targets tests/tcg/multiarch: add fp-test into multiarch set tests/tcg: disable fp-test for 32 bit (HACK!)
tests: fp-test add fcvt support (!INCOMPLETE WIP)

Emilio G. Cota (3):
osdep: disable glib-compat.h include with QEMU_NO_GLIB
softfloat: do not include glib headers
tests: add fp-test, a floating point test suite

Fam Zheng (4):
Makefile: Rename TARGET_DIRS to TARGET_LIST
tests/tcg/multiarch: Build fix for linux-test
docker: Add fedora-i386-cross image
tests/tcg/i386: Build fix for hello-i386

Peter Maydell (1):
docker: add "probe" command for configure

 Makefile                                      |   20 +-
 Makefile.target                               |    5 +
 configure                                     |  111 +-
 fpu/softfloat.c                               |    4 +
 include/qemu/osdep.h                          |    2 +
 scripts/create_config                         |    2 +-
 tests/Makefile.include                        |   24 +-
 tests/docker/Makefile.include                 |   10 +-
 tests/docker/docker.py                        |   49 +
 .../dockerfiles/fedora-i386-cross.docker      |   14 +
 tests/fp/.gitignore                           |    3 +
 tests/fp/Makefile                             |   34 +
 tests/fp/fp-test.c                            | 1582 +++++++++++++++++
 tests/fp/qemu/regression-tests.fptest         |    7 +
 tests/tcg/Makefile                            |  184 +-
 tests/tcg/Makefile.include                    |   76 +
 tests/tcg/README                              |   69 +-
 tests/tcg/aarch64/Makefile.target             |   13 +
 tests/tcg/aarch64/fcvt.c                      |  260 +++
 tests/tcg/aarch64/fcvt.out                    | 1305 ++++++++++++++
 tests/tcg/aarch64/sysregs.c                   |   14 +
 tests/tcg/arm/Makefile.target                 |   20 +
 tests/tcg/arm/README                          |   11 +
 tests/tcg/{ => arm}/hello-arm.c               |    0
 .../test-arm-iwmmxt.S}                        |    0
 tests/tcg/i386/Makefile.include               |    9 +
 tests/tcg/i386/Makefile.target                |   30 +
 tests/tcg/i386/README                         |   38 +
 tests/tcg/{ => i386}/hello-i386.c             |    1 +
 tests/tcg/{ => i386}/pi_10.com                |  Bin
 tests/tcg/{ => i386}/runcom.c                 |    0
 tests/tcg/{ => i386}/test-i386-code16.S       |    0
 tests/tcg/{ => i386}/test-i386-fprem.c        |   12 +-
 tests/tcg/{ => i386}/test-i386-muldiv.h       |    0
 tests/tcg/{ => i386}/test-i386-shift.h        |    0
 tests/tcg/{ => i386}/test-i386-ssse3.c        |    0
 tests/tcg/{ => i386}/test-i386-vm86.S         |    0
 tests/tcg/{ => i386}/test-i386.c              |    7 +-
 tests/tcg/{ => i386}/test-i386.h              |    0
 tests/tcg/mips/Makefile.include               |   17 +
 tests/tcg/mips/Makefile.target                |   19 +
 tests/tcg/mips/README                         |    7 +
 tests/tcg/{ => mips}/hello-mips.c             |    0
 tests/tcg/multiarch/Makefile.target           |   50 +
 tests/tcg/multiarch/README                    |    1 +
 tests/tcg/{ => multiarch}/linux-test.c        |   82 +-
 tests/tcg/{ => multiarch}/sha1.c              |    0
 tests/tcg/{ => multiarch}/test-mmap.c         |    0
 tests/tcg/{ => multiarch}/testthread.c        |    0
 tests/tcg/ppc64le/Makefile.include            |    2 +
 tests/tcg/s390x/Makefile.include              |    2 +
 tests/tcg/test_path.c                         |  157 --
 tests/tcg/x86_64/Makefile.target              |   15 +
 53 files changed, 3814 insertions(+), 454 deletions(-)
 create mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker
 create mode 100644 tests/fp/.gitignore
 create mode 100644 tests/fp/Makefile
 create mode 100644 tests/fp/fp-test.c
 create mode 100644 tests/fp/qemu/regression-tests.fptest
 create mode 100644 tests/tcg/Makefile.include
 create mode 100644 tests/tcg/aarch64/Makefile.target
 create mode 100644 tests/tcg/aarch64/fcvt.c
 create mode 100644 tests/tcg/aarch64/fcvt.out
 create mode 100644 tests/tcg/aarch64/sysregs.c
 create mode 100644 tests/tcg/arm/Makefile.target
 create mode 100644 tests/tcg/arm/README
 rename tests/tcg/{ => arm}/hello-arm.c (100%)
 rename tests/tcg/{test-arm-iwmmxt.s => arm/test-arm-iwmmxt.S} (100%)
 create mode 100644 tests/tcg/i386/Makefile.include
 create mode 100644 tests/tcg/i386/Makefile.target
 create mode 100644 tests/tcg/i386/README
 rename tests/tcg/{ => i386}/hello-i386.c (96%)
 rename tests/tcg/{ => i386}/pi_10.com (100%)
 rename tests/tcg/{ => i386}/runcom.c (100%)
 rename tests/tcg/{ => i386}/test-i386-code16.S (100%)
 rename tests/tcg/{ => i386}/test-i386-fprem.c (97%)
 rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%)
 rename tests/tcg/{ => i386}/test-i386-shift.h (100%)
 rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%)
 rename tests/tcg/{ => i386}/test-i386-vm86.S (100%)
 rename tests/tcg/{ => i386}/test-i386.c (99%)
 rename tests/tcg/{ => i386}/test-i386.h (100%)
 create mode 100644 tests/tcg/mips/Makefile.include
 create mode 100644 tests/tcg/mips/Makefile.target
 create mode 100644 tests/tcg/mips/README
 rename tests/tcg/{ => mips}/hello-mips.c (100%)
 create mode 100644 tests/tcg/multiarch/Makefile.target
 create mode 100644 tests/tcg/multiarch/README
 rename tests/tcg/{ => multiarch}/linux-test.c (89%)
 rename tests/tcg/{ => multiarch}/sha1.c (100%)
 rename tests/tcg/{ => multiarch}/test-mmap.c (100%)
 rename tests/tcg/{ => multiarch}/testthread.c (100%)
 create mode 100644 tests/tcg/ppc64le/Makefile.include
 create mode 100644 tests/tcg/s390x/Makefile.include
 delete mode 100644 tests/tcg/test_path.c
 create mode 100644 tests/tcg/x86_64/Makefile.target
Signature · 1 line
2.17.0
#1 lore raw

PATCH v2 1/43 docker: add "probe" command for configure

From: Peter Maydell <[email protected]>

This is a helper function for the configure script. It replies yes, sudo or no to inform the user if non-interactive docker support is available. We trap the Exception to fail gracefully.

---
 tests/docker/docker.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
tests/docker/docker.py +18 -0
index 1246ba9578..f8267586eb 100755
@@ -390,6 +390,24 @@ class ImagesCommand(SubCommand):
     def run(self, args, argv):
         return Docker().command("images", argv, args.quiet)
 
+
+class ProbeCommand(SubCommand):
+    """Probe if we can run docker automatically"""
+    name = "probe"
+
+    def run(self, args, argv):
+        try:
+            docker = Docker()
+            if docker._command[0] == "docker":
+                print "yes"
+            elif docker._command[0] == "sudo":
+                print "sudo"
+        except Exception:
+            print "no"
+
+        return
+
+
 def main():
     parser = argparse.ArgumentParser(description="A Docker helper",
             usage="%s <subcommand> ..." % os.path.basename(sys.argv[0]))
Signature · 1 line
2.17.0
Reviewed-by on v2 1/43
#2 lore raw

Re: [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure

Quoted 23 lines · Alex Bennée

From: Peter Maydell <[email protected]>

This is a helper function for the configure script. It replies yes, sudo or no to inform the user if non-interactive docker support is available. We trap the Exception to fail gracefully.

---
 tests/docker/docker.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
tests/docker/docker.py +4 -0
index 1246ba9578..f8267586eb 100755
@@ -390,6 +390,24 @@ class ImagesCommand(SubCommand):
     def run(self, args, argv):
         return Docker().command("images", argv, args.quiet)
 
+
+class ProbeCommand(SubCommand):
+    """Probe if we can run docker automatically"""
+    name = "probe"

tests/docker/docker.py class ImagesCommand(SubCommand): · line 406

Quoted 10 lines
tests/docker/docker.py +10 -0
+
+    def run(self, args, argv):
+        try:
+            docker = Docker()
+            if docker._command[0] == "docker":
+                print "yes"
+            elif docker._command[0] == "sudo":
+                print "sudo"
+        except Exception:
+            print "no"

Non-zero exit code is better in 'no' case, but I guess it's not required by configure. Either way:

Quoted 10 lines
tests/docker/docker.py +4 -0
+
+        return
+
+
 def main():
     parser = argparse.ArgumentParser(description="A Docker helper",
             usage="%s <subcommand> ..." % os.path.basename(sys.argv[0]))
Signature · 1 line
2.17.0
#3 lore raw

PATCH v2 2/43 configure: add test for docker availability

In reply to Alex Bennée

This tests for a working docker installation without sudo and sets up config-host.mak accordingly. This will be useful from cross compiling things in the future.

---
 configure | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
configure +17 -0
index 0a19b033bc..b0ae632ee4 100755
@@ -451,6 +451,7 @@ jemalloc="no"
 replication="yes"
 vxhs=""
 libxml2=""
+docker="no"
 
 supported_cpu="no"
 supported_os="no"
@@ -5413,6 +5414,17 @@ EOF
   fi
 fi
 
+##########################################
+# Docker and cross-compiler support
+#
+# This is specifically for building test
+# cases for foreign architectures, not
+# cross-compiling QEMU itself.
+
+if has "docker"; then
+    docker=$($python $source_path/tests/docker/docker.py probe)
+fi
+
 ##########################################
 # End of CC checks
 # After here, no more $cc or $ld runs
@@ -5874,6 +5886,7 @@ echo "avx2 optimization $avx2_opt"
 echo "replication support $replication"
 echo "VxHS block device $vxhs"
 echo "capstone          $capstone"
+echo "docker            $docker"
 
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -6697,6 +6710,10 @@ if test "$gcov" = "yes" ; then
   echo "GCOV=$gcov_tool" >> $config_host_mak
 fi
 
+if test "$docker" != "no"; then
+    echo "HAVE_USER_DOCKER=y" >> $config_host_mak
+fi
+
 # use included Linux headers
 if test "$linux" = "yes" ; then
   mkdir -p linux-headers
Signature · 1 line
2.17.0
Reviewed-by on v2 2/43
#4 lore raw

Re: [Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability

Quoted 8 lines · Alex Bennée

This tests for a working docker installation without sudo and sets up config-host.mak accordingly. This will be useful from cross compiling things in the future.

---
 configure | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

r~

#5 lore raw

PATCH v2 3/43 configure: add support for --cross-cc-FOO

In reply to Alex Bennée

This allows us to specify cross compilers for our guests. This is useful for building test images/programs. Currently we re-run the compile test for each target. I couldn't think of a way to cache the value for a given arch without getting messier configure code.

The cross compiler for the guest is visible to each target as CROSS_CC_GUEST in config-target.mak.

---
 configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
configure +50 -0
index b0ae632ee4..0dca341f2a 100755
@@ -453,6 +453,13 @@ vxhs=""
 libxml2=""
 docker="no"
 
+# cross compilers defaults, can be overridden with --cross-cc-ARCH
+cross_cc_aarch64="aarch64-linux-gnu-gcc"
+cross_cc_arm="arm-linux-gnueabihf-gcc"
+cross_cc_powerpc="powerpc-linux-gnu-gcc"
+
+enabled_cross_compilers=""
+
 supported_cpu="no"
 supported_os="no"
 bogus_os="no"
@@ -483,6 +490,11 @@ for opt do
   ;;
   --disable-debug-info) debug_info="no"
   ;;
+  --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option"
+  ;;
+  --cross-cc-*) cc_arch=${opt#--cross-cc-}
+                eval "cross_cc_${cc_arch}=\$optarg"
+  ;;
   esac
 done
 # OS specific
@@ -675,10 +687,12 @@ case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
+    cross_cc_i386=gcc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
+    cross_cc_x86_64=gcc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
@@ -912,6 +926,8 @@ for opt do
   ;;
   --disable-debug-info)
   ;;
+  --cross-cc-*)
+  ;;
   --enable-modules)
       modules="yes"
   ;;
@@ -6777,6 +6793,8 @@ case "$target" in
     ;;
 esac
 
+target_compiler=""
+
 mkdir -p $target_dir
 echo "# Automatically generated by configure - do not modify" > $config_target_mak
 
@@ -6805,6 +6823,7 @@ case "$target_name" in
     bflt="yes"
     mttcg="yes"
     gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
+    target_compiler=$cross_cc_arm
   ;;
   aarch64|aarch64_be)
     TARGET_ARCH=aarch64
@@ -6812,6 +6831,7 @@ case "$target_name" in
     bflt="yes"
     mttcg="yes"
     gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
+    target_compiler=$cross_cc_aarch64
   ;;
   cris)
   ;;
@@ -6853,6 +6873,7 @@ case "$target_name" in
   ;;
   ppc)
     gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
+    target_compiler=$cross_cc_powerpc
   ;;
   ppcemb)
     TARGET_BASE_ARCH=ppc
@@ -6927,6 +6948,25 @@ if [ "$TARGET_BASE_ARCH" = "" ]; then
   TARGET_BASE_ARCH=$TARGET_ARCH
 fi
 
+# Do we have a cross compiler for this target?
+if has $target_compiler; then
+
+    cat > $TMPC << EOF
+#include <stdio.h>
+int main(void) {
+    printf("Hello World!\n");
+}
+EOF
+
+    if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then
+        target_compiler=""
+    else
+        enabled_cross_compilers="${enabled_cross_compilers} ${target_compiler}"
+    fi
+else
+    target_compiler=""
+fi
+
 symlink "$source_path/Makefile.target" "$target_dir/Makefile"
 
 upper() {
@@ -7000,6 +7040,10 @@ if test "$target_bsd_user" = "yes" ; then
   echo "CONFIG_BSD_USER=y" >> $config_target_mak
 fi
 
+if test -n "$target_compiler"; then
+  echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak
+fi
+
 # generate QEMU_CFLAGS/LDFLAGS for targets
 
 cflags=""
@@ -7122,6 +7166,12 @@ echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
 
 done # for target in $targets
 
+if test -n "$enabled_cross_compilers"; then
+    echo
+    echo "NOTE: cross-compilers enabled:"
+    printf '%s\n' $enabled_cross_compilers | sort -u
+fi
+
 if [ "$dtc_internal" = "yes" ]; then
   echo "config-host.h: subdir-dtc" >> $config_host_mak
 fi
Signature · 1 line
2.17.0
#6 lore raw

Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO

Quoted 9 lines · Alex Bennée
configure +1 -0
@@ -6805,6 +6823,7 @@ case "$target_name" in
     bflt="yes"
     mttcg="yes"
     gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
+    target_compiler=$cross_cc_arm
   ;;
   aarch64|aarch64_be)
     TARGET_ARCH=aarch64

configure case "$target_name" in · line 6837

Quoted 7 lines
configure +1 -0
@@ -6812,6 +6831,7 @@ case "$target_name" in
     bflt="yes"
     mttcg="yes"
     gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
+    target_compiler=$cross_cc_aarch64
   ;;
   cris)
   ;;

Is there any reason not to fill in the reset of the cases within the switch at the same time?

r~

#7 lore raw

Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO

In reply to Alex Bennée

configure for opt do · line 496

Quoted 2 lines · Alex Bennée
configure +2 -0
+  --cross-cc-*) cc_arch=${opt#--cross-cc-}
+                eval "cross_cc_${cc_arch}=\$optarg"

This doesn't work as intended.

Given e.g. --cross-cc-aarch64=aarch64-linux-gcc

+ cc_arch=aarch64=aarch64-linux-gcc
+ eval 'cross_cc_aarch64=aarch64-linux-gcc=$optarg' ++ cross_cc_aarch64=aarch64-linux-gcc=aarch64-linux-gcc

Which sets the variable "cross_cc_aarch64"
to "aarch64-linux-gcc=aarch64-linux-gcc".
Which of course won't exist to execute.

r~

#8 lore raw

Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO

Quoted 8 lines · Richard Henderson

configure for opt do · line 496

Quoted 2 lines · Alex Bennée
configure +2 -0
+  --cross-cc-*) cc_arch=${opt#--cross-cc-}
+                eval "cross_cc_${cc_arch}=\$optarg"

This doesn't work as intended.

Given e.g. --cross-cc-aarch64=aarch64-linux-gcc

Quoted 7 lines

+ cc_arch=aarch64=aarch64-linux-gcc
+ eval 'cross_cc_aarch64=aarch64-linux-gcc=$optarg' ++ cross_cc_aarch64=aarch64-linux-gcc=aarch64-linux-gcc

Which sets the variable "cross_cc_aarch64"
to "aarch64-linux-gcc=aarch64-linux-gcc".
Which of course won't exist to execute.

- --cross-cc-*) cc_arch=${opt#--cross-cc-}
+ --cross-cc-*) cc_arch=$(expr "$opt" : '--cross-cc-\([^=]*\)')

seems to do the trick. Obviously a similar change will be needed for --cross-cc-flags-*.

r~

#9 lore raw

Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO

Quoted 17 lines · Richard Henderson
Quoted 15 lines · Richard Henderson

configure for opt do · line 496

Quoted 2 lines · Alex Bennée
configure +2 -0
+  --cross-cc-*) cc_arch=${opt#--cross-cc-}
+                eval "cross_cc_${cc_arch}=\$optarg"

This doesn't work as intended.

Given e.g. --cross-cc-aarch64=aarch64-linux-gcc

+ cc_arch=aarch64=aarch64-linux-gcc
+ eval 'cross_cc_aarch64=aarch64-linux-gcc=$optarg' ++ cross_cc_aarch64=aarch64-linux-gcc=aarch64-linux-gcc

Which sets the variable "cross_cc_aarch64"
to "aarch64-linux-gcc=aarch64-linux-gcc".
Which of course won't exist to execute.

Review

Quoted 2 lines
(quoted diff) +1 -1
-  --cross-cc-*) cc_arch=${opt#--cross-cc-}
+  --cross-cc-*) cc_arch=$(expr "$opt" : '--cross-cc-\([^=]*\)')

Forking an expr subshell may not be needed; how about:

--cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}

to strip both the --cross-cc- prefix, and any suffix starting at the first =.

Quoted 8 lines

seems to do the trick. Obviously a similar change will be needed for --cross-cc-flags-*.

r~

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#10 lore raw

Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO

In reply to Alex Bennée
Quoted 15 lines · Alex Bennée

This allows us to specify cross compilers for our guests. This is useful for building test images/programs. Currently we re-run the compile test for each target. I couldn't think of a way to cache the value for a given arch without getting messier configure code.

The cross compiler for the guest is visible to each target as CROSS_CC_GUEST in config-target.mak.

---
 configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

configure for opt do · line 493

Quoted 4 lines
configure +1 -0
@@ -483,6 +490,11 @@ for opt do
   ;;
   --disable-debug-info) debug_info="no"
   ;;
+  --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option"

Not quite right; it looks like you intended to have a trailing - instead of 0; and if you are trying to filter out bad characters, then you need
* on both sides of the [!...] list:

--cross-cc-*[!a-zA-Z0-9_-]*=*)

otherwise you are only filtering out bad characters immediately before the first =. There's also the question of whether I can spell both '--cross-cc-FOO=BAR' as one argument and '--cross-cc-FOO BAR' as two arguments; this is filtering out only the one-argument case.

Quoted 4 lines
configure +4 -0
+  ;;
+  --cross-cc-*) cc_arch=${opt#--cross-cc-}
+                eval "cross_cc_${cc_arch}=\$optarg"
+  ;;
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#11 lore raw

PATCH v2 4/43 configure: move i386_cc to cross_cc_i386

In reply to Alex Bennée

Also dont assume x86_64 compiler can build i386 binaries.

---
v2
- drop using system x86_64 compiler for i386 compiles

---
 configure | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)
configure +16 -8
index 0dca341f2a..038fb9db7b 100755
@@ -284,7 +284,6 @@ libs_softmmu=""
 libs_tools=""
 audio_pt_int=""
 audio_win_int=""
-cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 stack_protector=""
@@ -457,6 +456,8 @@ docker="no"
 cross_cc_aarch64="aarch64-linux-gnu-gcc"
 cross_cc_arm="arm-linux-gnueabihf-gcc"
 cross_cc_powerpc="powerpc-linux-gnu-gcc"
+cross_cc_i386="i386-pc-linux-gnu-gcc"
+cross_cc_cflags_i386=""
 
 enabled_cross_compilers=""
 
@@ -687,12 +688,10 @@ case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
-    cross_cc_i386=gcc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
-    cross_cc_x86_64=gcc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
@@ -1435,7 +1434,6 @@ case "$cpu" in
     i386)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
-           cc_i386='$(CC) -m32'
            ;;
     x86_64)
            # ??? Only extremely old AMD cpus do not have cmpxchg16b.
@@ -1443,12 +1441,14 @@ case "$cpu" in
            # runtime and generate the fallback to serial emulation.
            CPU_CFLAGS="-m64 -mcx16"
            LDFLAGS="-m64 $LDFLAGS"
-           cc_i386='$(CC) -m32'
+           cross_cc_x86_64=$cc
+           cross_cc_cflags_x86_64=$CPU_CFLAGS
            ;;
     x32)
            CPU_CFLAGS="-mx32"
            LDFLAGS="-mx32 $LDFLAGS"
-           cc_i386='$(CC) -m32'
+           cross_cc_i386=$cc
+           cross_cc_cflags_i386="-m32"
            ;;
     # No special flags required for other host CPUs
 esac
@@ -6675,7 +6675,6 @@ echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
   echo "IASL=$iasl" >> $config_host_mak
 fi
-echo "CC_I386=$cc_i386" >> $config_host_mak
 echo "HOST_CC=$host_cc" >> $config_host_mak
 echo "CXX=$cxx" >> $config_host_mak
 echo "OBJCC=$objcc" >> $config_host_mak
@@ -6794,6 +6793,7 @@ case "$target" in
 esac
 
 target_compiler=""
+target_compiler_cflags=""
 
 mkdir -p $target_dir
 echo "# Automatically generated by configure - do not modify" > $config_target_mak
@@ -6810,10 +6810,13 @@ TARGET_ABI_DIR=""
 case "$target_name" in
   i386)
     gdb_xml_files="i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml"
+    target_compiler=$cross_cc_i386
+    target_compiler_cflags=$cross_cc_cflags_i386
   ;;
   x86_64)
     TARGET_BASE_ARCH=i386
     gdb_xml_files="i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml"
+    target_compiler=$cross_cc_x86_64
   ;;
   alpha)
     mttcg="yes"
@@ -6958,7 +6961,7 @@ int main(void) {
 }
 EOF
 
-    if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then
+    if ! do_compiler $target_compiler $target_compiler_cflags -o $TMPE $TMPC -static ; then
         target_compiler=""
     else
         enabled_cross_compilers="${enabled_cross_compilers} ${target_compiler}"
@@ -7042,8 +7045,13 @@ fi
 
 if test -n "$target_compiler"; then
   echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak
+
+  if test -n "$target_compiler_cflags"; then
+      echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
+  fi
 fi
 
+
 # generate QEMU_CFLAGS/LDFLAGS for targets
 
 cflags=""
Signature · 1 line
2.17.0
#12 lore raw

Re: [Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386

Quoted 10 lines · Alex Bennée
configure +2 -1
-cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 stack_protector=""
@@ -457,6 +456,8 @@ docker="no"
 cross_cc_aarch64="aarch64-linux-gnu-gcc"
 cross_cc_arm="arm-linux-gnueabihf-gcc"
 cross_cc_powerpc="powerpc-linux-gnu-gcc"
+cross_cc_i386="i386-pc-linux-gnu-gcc"
+cross_cc_cflags_i386=""

...

Quoted 17 lines

enabled_cross_compilers=""

configure +0 -2
@@ -687,12 +688,10 @@ case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
-    cross_cc_i386=gcc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
-    cross_cc_x86_64=gcc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"

configure case "$cpu" in · line 1438

Quoted 4 lines
configure +0 -1
@@ -1435,7 +1434,6 @@ case "$cpu" in
     i386)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
-           cc_i386='$(CC) -m32'

Why is the i386 case not handled like...

configure case "$cpu" in · line 1445

Quoted 10 lines
configure +2 -1
            ;;
     x86_64)
            # ??? Only extremely old AMD cpus do not have cmpxchg16b.
@@ -1443,12 +1441,14 @@ case "$cpu" in
            # runtime and generate the fallback to serial emulation.
            CPU_CFLAGS="-m64 -mcx16"
            LDFLAGS="-m64 $LDFLAGS"
-           cc_i386='$(CC) -m32'
+           cross_cc_x86_64=$cc
+           cross_cc_cflags_x86_64=$CPU_CFLAGS

... the x86_64 case?

Also, does cross_cc_cflags_foo really have value over including the flags directly in the cross_cc_foo variable?

r~

#13 lore raw

PATCH v2 5/43 configure: allow user to specify --cross-cc-cflags-foo=

In reply to Alex Bennée

As an individual compiler may be able to support several targets with the appropriate flags we need to expose this to the user as well.

---
 configure | 8 ++++++++
 1 file changed, 8 insertions(+)
configure +8 -0
index 038fb9db7b..29af33716d 100755
@@ -454,7 +454,10 @@ docker="no"
 
 # cross compilers defaults, can be overridden with --cross-cc-ARCH
 cross_cc_aarch64="aarch64-linux-gnu-gcc"
+cross_cc_aarch64_be="$cross_cc_aarch64"
+cross_cc_cflags_aarch64_be="-mbig-endian"
 cross_cc_arm="arm-linux-gnueabihf-gcc"
+cross_cc_cflags_armeb="-mbig-endian"
 cross_cc_powerpc="powerpc-linux-gnu-gcc"
 cross_cc_i386="i386-pc-linux-gnu-gcc"
 cross_cc_cflags_i386=""
@@ -493,6 +496,9 @@ for opt do
   ;;
   --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option"
   ;;
+  --cross-cc-cflags*) cc_arch=${opt#--cross-cc-flags}
+                      eval "cross_cc_cflags_${cc_arch}=\$optarg"
+  ;;
   --cross-cc-*) cc_arch=${opt#--cross-cc-}
                 eval "cross_cc_${cc_arch}=\$optarg"
   ;;
@@ -6827,6 +6833,7 @@ case "$target_name" in
     mttcg="yes"
     gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
     target_compiler=$cross_cc_arm
+    eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
   ;;
   aarch64|aarch64_be)
     TARGET_ARCH=aarch64
@@ -6835,6 +6842,7 @@ case "$target_name" in
     mttcg="yes"
     gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
     target_compiler=$cross_cc_aarch64
+    eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
   ;;
   cris)
   ;;
Signature · 1 line
2.17.0
#14 lore raw

PATCH v2 6/43 configure: set cross_cc_FOO for host compiler

In reply to Alex Bennée

We can build tests for the host system with the compiler that we have selected.

---
 configure | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
configure +15 -1
index 29af33716d..44d310a692 100755
@@ -1416,30 +1416,44 @@ case "$cpu" in
     ppc)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
+           cross_cc_powerpc=$cc
+           cross_cc_cflags_powerpc=$CPU_CFLAGS
            ;;
     ppc64)
            CPU_CFLAGS="-m64"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_ppc64=$cc
+           cross_cc_cflags_ppc64=$CPU_CFLAGS
            ;;
     sparc)
            CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
            LDFLAGS="-m32 -mv8plus $LDFLAGS"
+           cross_cc_sparc=$cc
+           cross_cc_cflags_sparc=$CPU_CFLAGS
            ;;
     sparc64)
            CPU_CFLAGS="-m64 -mcpu=ultrasparc"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_sparc64=$cc
+           cross_cc_cflags_sparc64=$CPU_CFLAGS
            ;;
     s390)
            CPU_CFLAGS="-m31"
            LDFLAGS="-m31 $LDFLAGS"
+           cross_cc_s390=$cc
+           cross_cc_cflags_s390=$CPU_CFLAGS
            ;;
     s390x)
            CPU_CFLAGS="-m64"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_s390x=$cc
+           cross_cc_cflags_s390x=$CPU_CFLAGS
            ;;
     i386)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
+           cross_cc_i386=$cc
+           cross_cc_cflags_i386=$CPU_CFLAGS
            ;;
     x86_64)
            # ??? Only extremely old AMD cpus do not have cmpxchg16b.
@@ -1454,7 +1468,7 @@ case "$cpu" in
            CPU_CFLAGS="-mx32"
            LDFLAGS="-mx32 $LDFLAGS"
            cross_cc_i386=$cc
-           cross_cc_cflags_i386="-m32"
+           cross_cc_cflags_i386=$CPU_CFLAGS
            ;;
     # No special flags required for other host CPUs
 esac
Signature · 1 line
2.17.0
Reviewed-by on v2 6/43
#15 lore raw

Re: [Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler

Quoted 9 lines · Alex Bennée
     i386)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
configure +2 -0
+           cross_cc_i386=$cc
+           cross_cc_cflags_i386=$CPU_CFLAGS
            ;;
     x86_64)
            # ??? Only extremely old AMD cpus do not have cmpxchg16b.

configure case "$cpu" in · line 1472

Quoted 6 lines
configure +1 -1
@@ -1454,7 +1468,7 @@ case "$cpu" in
            CPU_CFLAGS="-mx32"
            LDFLAGS="-mx32 $LDFLAGS"
            cross_cc_i386=$cc
-           cross_cc_cflags_i386="-m32"
+           cross_cc_cflags_i386=$CPU_CFLAGS
            ;;

Partially redundant with patch 4? Anyway, this is what I was expecting to see there.

r~

#16 lore raw

PATCH v2 7/43 Makefile: Rename TARGET_DIRS to TARGET_LIST

In reply to Alex Bennée

From: Fam Zheng <[email protected]>

To be more accurate on its purpose and make code that looks for a certain target out of this variable more readable.

---
 Makefile               | 20 ++++++++++----------
 configure              |  2 +-
 scripts/create_config  |  2 +-
 tests/Makefile.include |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)
Makefile +10 -10
index d71dd5bea4..e894431a89 100644
@@ -62,8 +62,8 @@ seems to have been used for an in-tree build. You can fix this by running \
 endif
 endif
 
-CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y)
-CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y)
+CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_LIST)),y)
+CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_LIST)),y)
 CONFIG_XEN := $(CONFIG_XEN_BACKEND)
 CONFIG_ALL=y
 -include config-all-devices.mak
@@ -362,8 +362,8 @@ DOCS=
 endif
 
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR)
-SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
-SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS))
+SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_LIST))
+SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_LIST))
 
 ifeq ($(SUBDIR_DEVICES_MAK),)
 config-all-devices.mak:
@@ -466,7 +466,7 @@ config-host.h-timestamp: config-host.mak
 qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
 
-SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
+SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_LIST))
 SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))
 
 $(SOFTMMU_SUBDIR_RULES): $(block-obj-y)
@@ -510,7 +510,7 @@ ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
 romsubdir-%:
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/" CFLAGS="$(filter -O% -g%,$(CFLAGS))",)
 
-ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
+ALL_SUBDIRS=$(TARGET_LIST) $(patsubst %,pc-bios/%, $(ROMS))
 
 recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
 
@@ -763,7 +763,7 @@ distclean: clean
 	rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
 	rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
 	rm -f docs/qemu-block-drivers.7
-	for d in $(TARGET_DIRS); do \
+	for d in $(TARGET_LIST); do \
 	rm -rf $$d || exit 1 ; \
         done
 	rm -Rf .sdk
@@ -864,7 +864,7 @@ endif
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
 	done
 	$(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all"
-	for d in $(TARGET_DIRS); do \
+	for d in $(TARGET_LIST); do \
 	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
         done
 
@@ -1062,9 +1062,9 @@ endif
 	@echo  '  ctags/TAGS      - Generate tags file for editors'
 	@echo  '  cscope          - Generate cscope index'
 	@echo  ''
-	@$(if $(TARGET_DIRS), \
+	@$(if $(TARGET_LIST), \
 		echo 'Architecture specific targets:'; \
-		$(foreach t, $(TARGET_DIRS), \
+		$(foreach t, $(TARGET_LIST), \
 		printf "  %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \
 		echo '')
 	@echo  'Cleaning targets:'
configure +1 -1
index 44d310a692..0988c88d9f 100755
@@ -6125,7 +6125,7 @@ qemu_version=$(head $source_path/VERSION)
 echo "VERSION=$qemu_version" >>$config_host_mak
 echo "PKGVERSION=$pkgversion" >>$config_host_mak
 echo "SRC_PATH=$source_path" >> $config_host_mak
-echo "TARGET_DIRS=$target_list" >> $config_host_mak
+echo "TARGET_LIST=$target_list" >> $config_host_mak
 if [ "$docs" = "yes" ] ; then
   echo "BUILD_DOCS=yes" >> $config_host_mak
 fi
scripts/create_config +1 -1
index d727e5e36e..58948a67a4 100755
@@ -107,7 +107,7 @@ case $line in
     target_name=${line#*=}
     echo "#define TARGET_NAME \"$target_name\""
     ;;
- TARGET_DIRS=*)
+ TARGET_LIST=*)
     # do nothing
     ;;
  TARGET_*=y) # configuration
tests/Makefile.include +1 -1
index 3b9a5e31a2..3d2f0458ab 100644
@@ -854,7 +854,7 @@ endif
 
 # QTest rules
 
-TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
+TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_LIST)))
 ifeq ($(CONFIG_POSIX),y)
 QTEST_TARGETS = $(TARGETS)
 check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
Signature · 1 line
2.17.0
Reviewed-by on v2 7/43
#17 lore raw

Re: [Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST

Quoted 8 lines · Alex Bennée

From: Fam Zheng <[email protected]>

To be more accurate on its purpose and make code that looks for a certain target out of this variable more readable.

Quoted 6 lines
---
 Makefile               | 20 ++++++++++----------
 configure              |  2 +-
 scripts/create_config  |  2 +-
 tests/Makefile.include |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

r~

#18 lore raw

PATCH v2 8/43 docker: Add "cc" subcommand

In reply to Alex Bennée

---
v2
- add if args.paths check to avoid iterating null argument

---
 tests/docker/docker.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
tests/docker/docker.py +25 -0
index f8267586eb..bcc3ee2dee 100755
@@ -408,6 +408,31 @@ class ProbeCommand(SubCommand):
         return
 
 
+class CcCommand(SubCommand):
+    """Compile sources with cc in images"""
+    name = "cc"
+
+    def args(self, parser):
+        parser.add_argument("--image", "-i", required=True,
+                            help="The docker image in which to run cc")
+        parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
+                            help="""Extra paths to (ro) mount into container for
+                            reading sources""")
+
+    def run(self, args, argv):
+        if argv and argv[0] == "--":
+            argv = argv[1:]
+        cwd = os.getcwd()
+        cmd = ["--rm", "-w", cwd,
+               "-v", "%s:%s:rw" % (cwd, cwd)]
+        if args.paths:
+            for p in args.paths:
+                cmd += ["-v", "%s:%s:ro,z" % (p, p)]
+        cmd += [args.image, "cc"]
+        cmd += argv
+        return Docker().command("run", cmd, args.quiet)
+
+
 def main():
     parser = argparse.ArgumentParser(description="A Docker helper",
             usage="%s <subcommand> ..." % os.path.basename(sys.argv[0]))
Signature · 1 line
2.17.0
#19 lore raw

PATCH v2 9/43 docker: extend "cc" command to accept compiler

In reply to Alex Bennée

When calling our cross-compilation images we want to call something other than the default cc.

---
v2
- use arg.cc default to simplify logic

---
 tests/docker/docker.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/docker.py +3 -1
index bcc3ee2dee..59bce9f19a 100755
@@ -415,6 +415,8 @@ class CcCommand(SubCommand):
     def args(self, parser):
         parser.add_argument("--image", "-i", required=True,
                             help="The docker image in which to run cc")
+        parser.add_argument("--cc", default="cc",
+                            help="The compiler executable to call")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container for
                             reading sources""")
@@ -428,7 +430,7 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
-        cmd += [args.image, "cc"]
+        cmd += [args.image, args.cc]
         cmd += argv
         return Docker().command("run", cmd, args.quiet)
 
Signature · 1 line
2.17.0
Reviewed-by on v2 9/43
#21 lore raw

Re: [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler

In reply to Alex Bennée
Quoted 4 lines · Alex Bennée

When calling our cross-compilation images we want to call something other than the default cc.

Quoted 31 lines

---
v2
- use arg.cc default to simplify logic

---
 tests/docker/docker.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/docker.py +3 -1
index bcc3ee2dee..59bce9f19a 100755
@@ -415,6 +415,8 @@ class CcCommand(SubCommand):
     def args(self, parser):
         parser.add_argument("--image", "-i", required=True,
                             help="The docker image in which to run cc")
+        parser.add_argument("--cc", default="cc",
+                            help="The compiler executable to call")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container for
                             reading sources""")
@@ -428,7 +430,7 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
-        cmd += [args.image, "cc"]
+        cmd += [args.image, args.cc]
         cmd += argv
         return Docker().command("run", cmd, args.quiet)
 
#22 lore raw

PATCH v2 10/43 docker: allow "cc" command to run in user context

In reply to Alex Bennée
---
 tests/docker/docker.py | 4 ++++
 1 file changed, 4 insertions(+)
tests/docker/docker.py +4 -0
index 59bce9f19a..37bfa98005 100755
@@ -417,6 +417,8 @@ class CcCommand(SubCommand):
                             help="The docker image in which to run cc")
         parser.add_argument("--cc", default="cc",
                             help="The compiler executable to call")
+        parser.add_argument("--user",
+                            help="The user-id to run under")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container for
                             reading sources""")
@@ -430,6 +432,8 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
+        if args.user:
+            cmd += ["-u", args.user]
         cmd += [args.image, args.cc]
         cmd += argv
         return Docker().command("run", cmd, args.quiet)
Signature · 1 line
2.17.0
#23 lore raw

PATCH v2 11/43 docker: Makefile.include introduce DOCKER_SCRIPT

In reply to Alex Bennée

Define this in one place to make it easy to re-use.

---
 tests/docker/Makefile.include | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
tests/docker/Makefile.include +6 -4
index de87341528..6a5aa9ec71 100644
@@ -14,6 +14,8 @@ DOCKER_TESTS := $(notdir $(shell \
 
 DOCKER_TOOLS := travis
 
+DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py
+
 TESTS ?= %
 IMAGES ?= %
 
@@ -37,7 +39,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 		echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \
 	fi
 	$(call quiet-command,\
-		$(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \
+		$(DOCKER_SCRIPT) build qemu:$* $< \
 		$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
 		$(if $(NOUSER),,--add-current-user) \
 		$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\
@@ -129,11 +131,11 @@ docker-run: docker-qemu-src
 	fi
 	$(if $(EXECUTABLE),						\
 		$(call quiet-command,					\
-			$(SRC_PATH)/tests/docker/docker.py update 	\
+			$(DOCKER_SCRIPT) update 			\
 			$(IMAGE) $(EXECUTABLE),				\
 			"  COPYING $(EXECUTABLE) to $(IMAGE)"))
 	$(call quiet-command,						\
-		$(SRC_PATH)/tests/docker/docker.py run 			\
+		$(DOCKER_SCRIPT) run 					\
 			$(if $(NOUSER),,-u $(shell id -u)) 		\
 			--security-opt seccomp=unconfined		\
 			$(if $V,,--rm) 					\
@@ -163,4 +165,4 @@ docker-run-%:
 	@$(MAKE) docker-run TEST=$(CMD) IMAGE=qemu:$(IMAGE)
 
 docker-clean:
-	$(call quiet-command, $(SRC_PATH)/tests/docker/docker.py clean)
+	$(call quiet-command, $(DOCKER_SCRIPT) clean)
Signature · 1 line
2.17.0
#25 lore raw

PATCH v2 12/43 tests/tcg: move architecture independent tests into subdir

In reply to Alex Bennée

We will want to build these for all supported guest architectures so lets move them all into one place. We also drop test_path at this point because it needs qemu utils and glib bits which is hard to support for cross compiling.

---
v2
- move VPATH and TESTs setup into multiarch/Makefile.target
- remove moved bits from tests/tcg/Makefile

---
 tests/tcg/Makefile                     |  31 -----
 tests/tcg/README                       |  10 +-
 tests/tcg/multiarch/Makefile.target    |  30 +++++
 tests/tcg/multiarch/README             |   1 +
 tests/tcg/{ => multiarch}/linux-test.c |   0
 tests/tcg/{ => multiarch}/sha1.c       |   0
 tests/tcg/{ => multiarch}/test-mmap.c  |   0
 tests/tcg/{ => multiarch}/testthread.c |   0
 tests/tcg/test_path.c                  | 157 -------------------------
 9 files changed, 35 insertions(+), 194 deletions(-)
 create mode 100644 tests/tcg/multiarch/Makefile.target
 create mode 100644 tests/tcg/multiarch/README
 rename tests/tcg/{ => multiarch}/linux-test.c (100%)
 rename tests/tcg/{ => multiarch}/sha1.c (100%)
 rename tests/tcg/{ => multiarch}/test-mmap.c (100%)
 rename tests/tcg/{ => multiarch}/testthread.c (100%)
 delete mode 100644 tests/tcg/test_path.c
tests/tcg/Makefile +0 -31
index 89e3342f3d..e12395117a 100644
@@ -18,12 +18,9 @@ LDFLAGS=
 # also, pi_10.com runs indefinitely
 
 I386_TESTS=hello-i386 \
-	   linux-test \
-	   testthread \
 	   sha1-i386 \
 	   test-i386 \
 	   test-i386-fprem \
-	   test-mmap \
 	   # runcom
 
 # native i386 compilers sometimes are not biarch.  assume cross-compilers are
@@ -47,8 +44,6 @@ run-%: %
 	-$(QEMU) ./$*
 
 run-hello-i386: hello-i386
-run-linux-test: linux-test
-run-testthread: testthread
 run-sha1-i386: sha1-i386
 
 run-test-i386: test-i386
@@ -66,11 +61,6 @@ run-test-x86_64: test-x86_64
 	-$(QEMU_X86_64) test-x86_64 > test-x86_64.out
 	@if diff -u test-x86_64.ref test-x86_64.out ; then echo "Auto Test OK"; fi
 
-run-test-mmap: test-mmap
-	-$(QEMU) ./test-mmap
-	-$(QEMU) -p 8192 ./test-mmap 8192
-	-$(QEMU) -p 16384 ./test-mmap 16384
-	-$(QEMU) -p 32768 ./test-mmap 32768
 
 run-runcom: runcom
 	-$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com
@@ -80,17 +70,10 @@ run-test_path: test_path
 
 # rules to compile tests
 
-test_path: test_path.o
-
-test_path.o: test_path.c
-
 hello-i386: hello-i386.c
 	$(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
 	strip $@
 
-testthread: testthread.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread
-
 # i386/x86_64 emulation test (test various opcodes) */
 test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
            test-i386.h test-i386-shift.h test-i386-muldiv.h
@@ -104,28 +87,14 @@ test-x86_64: test-i386.c \
            test-i386.h test-i386-shift.h test-i386-muldiv.h
 	$(CC_X86_64) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $(<D)/test-i386.c -lm
 
-# generic Linux and CPU test
-linux-test: linux-test.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm
-
 # vm86 test
 runcom: runcom.c
 	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
 
-test-mmap: test-mmap.c
-	$(CC_I386) -m32 $(CFLAGS) -Wall -O2 $(LDFLAGS) -o $@ $<
-
 # speed test
 sha1-i386: sha1.c
 	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
 
-sha1: sha1.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-speed: sha1 sha1-i386
-	time ./sha1
-	time $(QEMU) ./sha1-i386
-
 # arm test
 hello-arm: hello-arm.o
 	arm-linux-ld -o $@ $<
tests/tcg/README +4 -6
index 5dcfb4852b..0890044cf0 100644
@@ -1,9 +1,7 @@
-This directory contains various interesting programs for
-regression testing.
-
-The target "make test" runs the programs and, if applicable,
-runs "diff" to detect mismatches between output on the host and
-output on QEMU.
+This directory contains various interesting guest programs for
+regression testing. Tests are either multi-arch, meaning they can be
+built for all guest architectures that support linux-user executable,
+or they are architecture specific.
 
 i386
 ====
tests/tcg/multiarch/Makefile.target new file +30 -0
new file mode 100644
index 0000000000..a691fd59d3
@@ -0,0 +1,30 @@
+# -*- Mode: makefile -*-
+#
+# Multiarch Tests - included from tests/tcg/Makefile.target
+#
+# These tests are plain C and built without any architecture specific code.
+#
+
+MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
+
+# Set search path for all sources
+VPATH 		+= $(MULTIARCH_SRC)
+MULTIARCH_SRCS   =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
+MULTIARCH_TESTS  =$(MULTIARCH_SRCS:.c=)
+
+# Update TESTS
+TESTS		+=$(MULTIARCH_TESTS)
+
+#
+# The following are any additional rules needed to build things
+#
+
+testthread: LDFLAGS=-lpthread
+
+# Specialist Runners
+run-test-mmap: test-mmap
+	-$(QEMU) ./test-mmap
+	-$(QEMU) -p 8192 ./test-mmap 8192
+	-$(QEMU) -p 16384 ./test-mmap 16384
+	-$(QEMU) -p 32768 ./test-mmap 32768
+
tests/tcg/multiarch/README new file +1 -0
new file mode 100644
index 0000000000..522c9d2ea3
@@ -0,0 +1 @@
+Multi-architecture linux-user tests
tests/tcg/multiarch/linux-test.c renamed from tests/tcg/linux-test.c +0 -0
similarity index 100%
rename from tests/tcg/linux-test.c
rename to tests/tcg/multiarch/linux-test.c
tests/tcg/multiarch/sha1.c renamed from tests/tcg/sha1.c +0 -0
similarity index 100%
rename from tests/tcg/sha1.c
rename to tests/tcg/multiarch/sha1.c
tests/tcg/multiarch/test-mmap.c renamed from tests/tcg/test-mmap.c +0 -0
similarity index 100%
rename from tests/tcg/test-mmap.c
rename to tests/tcg/multiarch/test-mmap.c
tests/tcg/multiarch/testthread.c renamed from tests/tcg/testthread.c +0 -0
similarity index 100%
rename from tests/tcg/testthread.c
rename to tests/tcg/multiarch/testthread.c
tests/tcg/test_path.c deleted +0 -157

157 lines not on this page · raw message

Signature · 1 line
2.17.0
Reviewed-by on v2 12/43
#26 lore raw

Re: [Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir

Quoted 5 lines · Alex Bennée

We will want to build these for all supported guest architectures so lets move them all into one place. We also drop test_path at this point because it needs qemu utils and glib bits which is hard to support for cross compiling.

Quoted 8 lines

---
v2
- move VPATH and TESTs setup into multiarch/Makefile.target
- remove moved bits from tests/tcg/Makefile
---

r~

#27 lore raw

PATCH v2 13/43 tests/tcg/multiarch: Build fix for linux-test

In reply to Alex Bennée

From: Fam Zheng <[email protected]>

To keep the compiler happy, and to fit in our buildsys flags:

- Make local functions "static"
- #ifdef out unused functions
- drop cutils/osdep dependencies

[AJB: drop cutils/osdep dependencies]
---
 tests/tcg/multiarch/linux-test.c | 68 ++++++++++----------------------
 1 file changed, 21 insertions(+), 47 deletions(-)
tests/tcg/multiarch/linux-test.c +21 -47
index 5070d31446..4457bd04ba 100644
@@ -16,7 +16,6 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-#define _GNU_SOURCE
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -31,6 +30,7 @@
 #include <utime.h>
 #include <time.h>
 #include <sys/time.h>
+#include <sys/resource.h>
 #include <sys/uio.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -39,13 +39,12 @@
 #include <dirent.h>
 #include <setjmp.h>
 #include <sys/shm.h>
-#include "qemu/cutils.h"
 
 #define TESTPATH "/tmp/linux-test.tmp"
 #define TESTPORT 7654
 #define STACK_SIZE 16384
 
-void error1(const char *filename, int line, const char *fmt, ...)
+static void error1(const char *filename, int line, const char *fmt, ...)
 {
     va_list ap;
     va_start(ap, fmt);
@@ -56,7 +55,7 @@ void error1(const char *filename, int line, const char *fmt, ...)
     exit(1);
 }
 
-int __chk_error(const char *filename, int line, int ret)
+static int __chk_error(const char *filename, int line, int ret)
 {
     if (ret < 0) {
         error1(filename, line, "%m (ret=%d, errno=%d)",
@@ -73,7 +72,7 @@ int __chk_error(const char *filename, int line, int ret)
 
 #define FILE_BUF_SIZE 300
 
-void test_file(void)
+static void test_file(void)
 {
     int fd, i, len, ret;
     uint8_t buf[FILE_BUF_SIZE];
@@ -210,7 +209,7 @@ void test_file(void)
     chk_error(rmdir(TESTPATH));
 }
 
-void test_fork(void)
+static void test_fork(void)
 {
     int pid, status;
 
@@ -224,7 +223,7 @@ void test_fork(void)
         error("waitpid status=0x%x", status);
 }
 
-void test_time(void)
+static void test_time(void)
 {
     struct timeval tv, tv2;
     struct timespec ts, rem;
@@ -251,34 +250,7 @@ void test_time(void)
         error("getrusage");
 }
 
-void pstrcpy(char *buf, int buf_size, const char *str)
-{
-    int c;
-    char *q = buf;
-
-    if (buf_size <= 0)
-        return;
-
-    for(;;) {
-        c = *str++;
-        if (c == 0 || q >= buf + buf_size - 1)
-            break;
-        *q++ = c;
-    }
-    *q = '\0';
-}
-
-/* strcat and truncate. */
-char *pstrcat(char *buf, int buf_size, const char *s)
-{
-    int len;
-    len = strlen(buf);
-    if (len < buf_size)
-        pstrcpy(buf + len, buf_size - len, s);
-    return buf;
-}
-
-int server_socket(void)
+static int server_socket(void)
 {
     int val, fd;
     struct sockaddr_in sockaddr;
@@ -298,7 +270,7 @@ int server_socket(void)
 
 }
 
-int client_socket(void)
+static int client_socket(void)
 {
     int fd;
     struct sockaddr_in sockaddr;
@@ -312,9 +284,9 @@ int client_socket(void)
     return fd;
 }
 
-const char socket_msg[] = "hello socket\n";
+static const char socket_msg[] = "hello socket\n";
 
-void test_socket(void)
+static void test_socket(void)
 {
     int server_fd, client_fd, fd, pid, ret, val;
     struct sockaddr_in sockaddr;
@@ -348,9 +320,10 @@ void test_socket(void)
     chk_error(close(server_fd));
 }
 
+#if 0
 #define WCOUNT_MAX 512
 
-void test_pipe(void)
+static void test_pipe(void)
 {
     fd_set rfds, wfds;
     int fds[2], fd_max, ret;
@@ -391,10 +364,10 @@ void test_pipe(void)
     chk_error(close(fds[1]));
 }
 
-int thread1_res;
-int thread2_res;
+static int thread1_res;
+static int thread2_res;
 
-int thread1_func(void *arg)
+static int thread1_func(void *arg)
 {
     int i;
     for(i=0;i<5;i++) {
@@ -404,7 +377,7 @@ int thread1_func(void *arg)
     return 0;
 }
 
-int thread2_func(void *arg)
+static int thread2_func(void *arg)
 {
     int i;
     for(i=0;i<6;i++) {
@@ -435,27 +408,28 @@ void test_clone(void)
         thread2_res != 6)
         error("clone");
 }
+#endif
 
 /***********************************/
 
 volatile int alarm_count;
 jmp_buf jmp_env;
 
-void sig_alarm(int sig)
+static void sig_alarm(int sig)
 {
     if (sig != SIGALRM)
         error("signal");
     alarm_count++;
 }
 
-void sig_segv(int sig, siginfo_t *info, void *puc)
+static void sig_segv(int sig, siginfo_t *info, void *puc)
 {
     if (sig != SIGSEGV)
         error("signal");
     longjmp(jmp_env, 1);
 }
 
-void test_signal(void)
+static void test_signal(void)
 {
     struct sigaction act;
     struct itimerval it, oit;
@@ -510,7 +484,7 @@ void test_signal(void)
 
 #define SHM_SIZE 32768
 
-void test_shm(void)
+static void test_shm(void)
 {
     void *ptr;
     int shmid;
Signature · 1 line
2.17.0
Reviewed-by on v2 13/43
#28 lore raw

Re: [Qemu-devel] [PATCH v2 13/43] tests/tcg/multiarch: Build fix for linux-test

Quoted 8 lines · Alex Bennée

From: Fam Zheng <[email protected]>

To keep the compiler happy, and to fit in our buildsys flags:

- Make local functions "static"
- #ifdef out unused functions
- drop cutils/osdep dependencies

Quoted 7 lines
[AJB: drop cutils/osdep dependencies]
---
 tests/tcg/multiarch/linux-test.c | 68 ++++++++++----------------------
 1 file changed, 21 insertions(+), 47 deletions(-)

r~

#29 lore raw

PATCH v2 14/43 tests/tcg/multiarch: enable additional linux-test tests

In reply to Alex Bennée

Un-comment the remaining tests. I removed the itimer value tests because I'm fairly sure a re-arming timer will always have a different value in it when you grab it.

---
 tests/tcg/multiarch/linux-test.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
tests/tcg/multiarch/linux-test.c +8 -12
index 4457bd04ba..519b0ac653 100644
@@ -16,6 +16,7 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
+#define _GNU_SOURCE
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -39,6 +40,7 @@
 #include <dirent.h>
 #include <setjmp.h>
 #include <sys/shm.h>
+#include <sched.h>
 
 #define TESTPATH "/tmp/linux-test.tmp"
 #define TESTPORT 7654
@@ -58,8 +60,8 @@ static void error1(const char *filename, int line, const char *fmt, ...)
 static int __chk_error(const char *filename, int line, int ret)
 {
     if (ret < 0) {
-        error1(filename, line, "%m (ret=%d, errno=%d)",
-               ret, errno);
+        error1(filename, line, "%m (ret=%d, errno=%d/%s)",
+               ret, errno, strerror(errno));
     }
     return ret;
 }
@@ -320,7 +322,6 @@ static void test_socket(void)
     chk_error(close(server_fd));
 }
 
-#if 0
 #define WCOUNT_MAX 512
 
 static void test_pipe(void)
@@ -355,7 +356,7 @@ static void test_pipe(void)
             }
             if (FD_ISSET(fds[1], &wfds)) {
                 ch = 'a';
-                chk_error(write(fds[0], &ch, 1));
+                chk_error(write(fds[1], &ch, 1));
                 wcount++;
             }
         }
@@ -408,7 +409,6 @@ void test_clone(void)
         thread2_res != 6)
         error("clone");
 }
-#endif
 
 /***********************************/
 
@@ -449,12 +449,10 @@ static void test_signal(void)
     it.it_value.tv_usec = 10 * 1000;
     chk_error(setitimer(ITIMER_REAL, &it, NULL));
     chk_error(getitimer(ITIMER_REAL, &oit));
-    if (oit.it_value.tv_sec != it.it_value.tv_sec ||
-        oit.it_value.tv_usec != it.it_value.tv_usec)
-        error("itimer");
 
     while (alarm_count < 5) {
         usleep(10 * 1000);
+        getitimer(ITIMER_REAL, &oit);
     }
 
     it.it_interval.tv_sec = 0;
@@ -463,9 +461,6 @@ static void test_signal(void)
     it.it_value.tv_usec = 0;
     memset(&oit, 0xff, sizeof(oit));
     chk_error(setitimer(ITIMER_REAL, &it, &oit));
-    if (oit.it_value.tv_sec != 0 ||
-        oit.it_value.tv_usec != 10 * 1000)
-        error("setitimer");
 
     /* SIGSEGV test */
     act.sa_sigaction = sig_segv;
@@ -503,10 +498,11 @@ static void test_shm(void)
 int main(int argc, char **argv)
 {
     test_file();
+    test_pipe();
     test_fork();
     test_time();
     test_socket();
-    //    test_clone();
+    test_clone();
     test_signal();
     test_shm();
     return 0;
Signature · 1 line
2.17.0
Reviewed-by on v2 14/43
#30 lore raw

Re: [Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests

Quoted 8 lines · Alex Bennée

Un-comment the remaining tests. I removed the itimer value tests because I'm fairly sure a re-arming timer will always have a different value in it when you grab it.

---
 tests/tcg/multiarch/linux-test.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

r~

#31 lore raw

PATCH v2 15/43 tests/tcg: move i386 specific tests into subdir

In reply to Alex Bennée

These only need to be built for i386 guests. This includes a stub tests/tcg/i386/Makfile.target which absorbs some of what was in tests/tcg/Makefile.

---
v2
- move VPATH and TESTs setup into i386/Makefile.target
- set CFLAGS+=-m32 for cross building

---
 tests/tcg/README                        |  39 ------------------------
 tests/tcg/i386/Makefile.target          |  30 ++++++++++++++++++
 tests/tcg/i386/README                   |  38 +++++++++++++++++++++++
 tests/tcg/{ => i386}/hello-i386.c       |   0
 tests/tcg/{ => i386}/pi_10.com          | Bin
 tests/tcg/{ => i386}/runcom.c           |   0
 tests/tcg/{ => i386}/test-i386-code16.S |   0
 tests/tcg/{ => i386}/test-i386-fprem.c  |   0
 tests/tcg/{ => i386}/test-i386-muldiv.h |   0
 tests/tcg/{ => i386}/test-i386-shift.h  |   0
 tests/tcg/{ => i386}/test-i386-ssse3.c  |   0
 tests/tcg/{ => i386}/test-i386-vm86.S   |   0
 tests/tcg/{ => i386}/test-i386.c        |   0
 tests/tcg/{ => i386}/test-i386.h        |   0
 14 files changed, 68 insertions(+), 39 deletions(-)
 create mode 100644 tests/tcg/i386/Makefile.target
 create mode 100644 tests/tcg/i386/README
 rename tests/tcg/{ => i386}/hello-i386.c (100%)
 rename tests/tcg/{ => i386}/pi_10.com (100%)
 rename tests/tcg/{ => i386}/runcom.c (100%)
 rename tests/tcg/{ => i386}/test-i386-code16.S (100%)
 rename tests/tcg/{ => i386}/test-i386-fprem.c (100%)
 rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%)
 rename tests/tcg/{ => i386}/test-i386-shift.h (100%)
 rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%)
 rename tests/tcg/{ => i386}/test-i386-vm86.S (100%)
 rename tests/tcg/{ => i386}/test-i386.c (100%)
 rename tests/tcg/{ => i386}/test-i386.h (100%)
tests/tcg/README +0 -39
index 0890044cf0..469504c4cb 100644
@@ -3,45 +3,6 @@ regression testing. Tests are either multi-arch, meaning they can be
 built for all guest architectures that support linux-user executable,
 or they are architecture specific.
 
-i386
-====
-
-test-i386
----------
-
-This program executes most of the 16 bit and 32 bit x86 instructions and
-generates a text output, for comparison with the output obtained with
-a real CPU or another emulator.
-
-The Linux system call modify_ldt() is used to create x86 selectors
-to test some 16 bit addressing and 32 bit with segmentation cases.
-
-The Linux system call vm86() is used to test vm86 emulation.
-
-Various exceptions are raised to test most of the x86 user space
-exception reporting.
-
-linux-test
-----------
-
-This program tests various Linux system calls. It is used to verify
-that the system call parameters are correctly converted between target
-and host CPUs.
-
-test-i386-fprem
----------------
-
-runcom
-------
-
-test-mmap
----------
-
-sha1
-----
-
-hello-i386
-----------
 
 
 ARM
tests/tcg/i386/Makefile.target new file +30 -0
new file mode 100644
index 0000000000..2f27b65e2d
@@ -0,0 +1,30 @@
+# i386 cross compile notes
+
+I386_SRC=$(SRC_PATH)/tests/tcg/i386
+
+# Set search path for all sources
+VPATH 		+= $(I386_SRC)
+
+I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
+I386_TESTS=$(I386_SRCS:.c=)
+
+# Update TESTS
+TESTS+=$(I386_TESTS)
+
+ifneq ($(TARGET_NAME),x86_64)
+CFLAGS+=-m32
+endif
+
+#
+# hello-i386 is a barebones app
+#
+hello-i386: CFLAGS+=-ffreestanding
+hello-i386: LDFLAGS+=-nostdlib
+
+#
+# test-386 includes a couple of additional objects that need to be linked together
+#
+
+test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ \
+	   $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
tests/tcg/i386/README new file +38 -0
new file mode 100644
index 0000000000..7a0a47bf27
@@ -0,0 +1,38 @@
+These are i386 specific guest programs
+
+test-i386
+---------
+
+This program executes most of the 16 bit and 32 bit x86 instructions and
+generates a text output, for comparison with the output obtained with
+a real CPU or another emulator.
+
+The Linux system call modify_ldt() is used to create x86 selectors
+to test some 16 bit addressing and 32 bit with segmentation cases.
+
+The Linux system call vm86() is used to test vm86 emulation.
+
+Various exceptions are raised to test most of the x86 user space
+exception reporting.
+
+linux-test
+----------
+
+This program tests various Linux system calls. It is used to verify
+that the system call parameters are correctly converted between target
+and host CPUs.
+
+test-i386-fprem
+---------------
+
+runcom
+------
+
+test-mmap
+---------
+
+sha1
+----
+
+hello-i386
+----------
tests/tcg/i386/hello-i386.c renamed from tests/tcg/hello-i386.c +0 -0
similarity index 100%
rename from tests/tcg/hello-i386.c
rename to tests/tcg/i386/hello-i386.c
tests/tcg/i386/pi_10.com renamed from tests/tcg/pi_10.com +0 -0
similarity index 100%
rename from tests/tcg/pi_10.com
rename to tests/tcg/i386/pi_10.com
tests/tcg/i386/runcom.c renamed from tests/tcg/runcom.c +0 -0
similarity index 100%
rename from tests/tcg/runcom.c
rename to tests/tcg/i386/runcom.c
tests/tcg/i386/test-i386-code16.S renamed from tests/tcg/test-i386-code16.S +0 -0
similarity index 100%
rename from tests/tcg/test-i386-code16.S
rename to tests/tcg/i386/test-i386-code16.S
tests/tcg/i386/test-i386-fprem.c renamed from tests/tcg/test-i386-fprem.c +0 -0
similarity index 100%
rename from tests/tcg/test-i386-fprem.c
rename to tests/tcg/i386/test-i386-fprem.c
tests/tcg/i386/test-i386-muldiv.h renamed from tests/tcg/test-i386-muldiv.h +0 -0
similarity index 100%
rename from tests/tcg/test-i386-muldiv.h
rename to tests/tcg/i386/test-i386-muldiv.h
tests/tcg/i386/test-i386-shift.h renamed from tests/tcg/test-i386-shift.h +0 -0
similarity index 100%
rename from tests/tcg/test-i386-shift.h
rename to tests/tcg/i386/test-i386-shift.h
tests/tcg/i386/test-i386-ssse3.c renamed from tests/tcg/test-i386-ssse3.c +0 -0
similarity index 100%
rename from tests/tcg/test-i386-ssse3.c
rename to tests/tcg/i386/test-i386-ssse3.c
tests/tcg/i386/test-i386-vm86.S renamed from tests/tcg/test-i386-vm86.S +0 -0
similarity index 100%
rename from tests/tcg/test-i386-vm86.S
rename to tests/tcg/i386/test-i386-vm86.S
tests/tcg/i386/test-i386.c renamed from tests/tcg/test-i386.c +0 -0
similarity index 100%
rename from tests/tcg/test-i386.c
rename to tests/tcg/i386/test-i386.c
tests/tcg/i386/test-i386.h renamed from tests/tcg/test-i386.h +0 -0
similarity index 100%
rename from tests/tcg/test-i386.h
rename to tests/tcg/i386/test-i386.h
Signature · 1 line
2.17.0
#32 lore raw

PATCH v2 16/43 docker: Add fedora-i386-cross image

In reply to Alex Bennée

From: Fam Zheng <[email protected]>

It has some basic *-devel.i686 packages to be used with "gcc -m32" as a 32 bit cross build environment.

[AJB: add glibc-static]

---
v2
- include static glibc package as well

---
 tests/docker/dockerfiles/fedora-i386-cross.docker | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker
tests/docker/dockerfiles/fedora-i386-cross.docker new file +14 -0
new file mode 100644
index 0000000000..8fbef2fa53
@@ -0,0 +1,14 @@
+FROM fedora:latest
+ENV PACKAGES \
+    gcc \
+    glibc-static.i686 \
+    glibc-devel.i686 \
+    glib2-devel.i686 \
+    zlib-devel.i686 \
+    glib2-devel.i686 \
+    nettle-devel.i686 \
+    pixman-devel.i686 \
+    gnutls-devel.i686
+
+RUN dnf install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
Signature · 1 line
2.17.0
#33 lore raw

PATCH v2 17/43 tests/tcg: enable building for i386

In reply to Alex Bennée

While you can construct a compile command that does work using the x86_64 host compiler that most people use this is flakey. Different distros handle this is different ways so we default to using a known good i386 compiler via docker.

---
 tests/tcg/i386/Makefile.include | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 tests/tcg/i386/Makefile.include
tests/tcg/i386/Makefile.include new file +9 -0
new file mode 100644
index 0000000000..be1c3008dd
@@ -0,0 +1,9 @@
+#
+# Makefile.include for all i386
+#
+# There is enough brokeness in x86_64 compilers that we don't default
+# to using the x86_64 system compiler for i386 binaries.
+#
+
+DOCKER_IMAGE=fedora-i386-cross
+DOCKER_CROSS_COMPILER=gcc
Signature · 1 line
2.17.0
#34 lore raw

PATCH v2 18/43 tests/tcg/i386: Build fix for hello-i386

In reply to Alex Bennée

From: Fam Zheng <[email protected]>

We have -Werror=missing-prototype, add a dummy prototype to avoid that warning.

---
 tests/tcg/i386/hello-i386.c | 1 +
 1 file changed, 1 insertion(+)
tests/tcg/i386/hello-i386.c +1 -0
index fa00380de2..cfeb24b2f5 100644
@@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len)
   return status;
 }
 
+void _start(void);
 void _start(void)
 {
     write(1, "Hello World\n", 12);
Signature · 1 line
2.17.0
Reviewed-by on v2 18/43
#35 lore raw

Re: [Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386

Quoted 10 lines · Alex Bennée

From: Fam Zheng <[email protected]>

We have -Werror=missing-prototype, add a dummy prototype to avoid that warning.

---
 tests/tcg/i386/hello-i386.c | 1 +
 1 file changed, 1 insertion(+)

r~

#36 lore raw

PATCH v2 19/43 tests/tcg/i386: fix test-i386

In reply to Alex Bennée

The test-i386 test case is a little special as it includes assembler files. Add the additional compile magic to assemble these bits and link them to the final binary.

---
 tests/tcg/i386/test-i386.c | 1 -
 1 file changed, 1 deletion(-)
tests/tcg/i386/test-i386.c +0 -1
index 9599204895..cae6a7773a 100644
@@ -17,7 +17,6 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #define _GNU_SOURCE
-#include "qemu/compiler.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
Signature · 1 line
2.17.0
Reviewed-by on v2 19/43
#37 lore raw

Re: [Qemu-devel] [PATCH v2 19/43] tests/tcg/i386: fix test-i386

Quoted 11 lines · Alex Bennée

The test-i386 test case is a little special as it includes assembler files. Add the additional compile magic to assemble these bits and link them to the final binary.

---
 tests/tcg/i386/test-i386.c | 1 -
 1 file changed, 1 deletion(-)

r~

#38 lore raw

PATCH v2 20/43 tests/tcg/i386: fix test-i386-fprem

In reply to Alex Bennée

Remove dependencies on QEMU's source tree and build directly.

---
 tests/tcg/i386/test-i386-fprem.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
tests/tcg/i386/test-i386-fprem.c +9 -3
index 1a71623204..66f5a9657d 100644
@@ -23,7 +23,10 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "qemu/osdep.h"
+#include <stdio.h>
+#include <stdint.h>
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
 /*
  * Inspired by <ieee754.h>'s union ieee854_long_double, but with single
@@ -39,7 +42,7 @@ union float80u {
         unsigned int exponent:15;
         unsigned int negative:1;
         unsigned int empty:16;
-    } QEMU_PACKED ieee;
+    } __attribute__((packed)) ieee;
 
     /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
     struct {
@@ -49,7 +52,7 @@ union float80u {
         unsigned int exponent:15;
         unsigned int negative:1;
         unsigned int empty:16;
-    } QEMU_PACKED ieee_nan;
+    } __attribute__((packed)) ieee_nan;
 };
 
 #define IEEE854_LONG_DOUBLE_BIAS 0x3fff
@@ -229,6 +232,7 @@ static void test_fprem_cases(void)
     do_fprem_stack_underflow();
 
     printf("= invalid operation =\n");
+    do_fprem(q_nan.d, 1.0);
     do_fprem(s_nan.d, 1.0);
     do_fprem(1.0, 0.0);
     do_fprem(pos_inf.d, 1.0);
@@ -238,6 +242,8 @@ static void test_fprem_cases(void)
     do_fprem(pos_denorm.d, 1.0);
     do_fprem(1.0, pos_denorm.d);
 
+    do_fprem(smallest_positive_norm.d, smallest_positive_norm.d);
+
     /* printf("= underflow =\n"); */
     /* TODO: Is there a case where FPREM raises underflow? */
 }
Signature · 1 line
2.17.0
#39 lore raw

PATCH v2 21/43 tests/tcg/i386: disable i386 version of test-i386-ssse

In reply to Alex Bennée

It doesn't build for i386 easily and we probably need a better more methodical test for SSE et all in QEMU.

---
 tests/tcg/i386/Makefile.target | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tcg/i386/Makefile.target +1 -1
index 2f27b65e2d..a6cc76664c 100644
@@ -9,7 +9,7 @@ I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
 I386_TESTS=$(I386_SRCS:.c=)
 
 # Update TESTS
-TESTS+=$(I386_TESTS)
+TESTS+=$(I386_ONLY_TESTS)
 
 ifneq ($(TARGET_NAME),x86_64)
 CFLAGS+=-m32
Signature · 1 line
2.17.0
#40 lore raw

PATCH v2 22/43 tests/tcg/x86_64: add Makefile.target

In reply to Alex Bennée

The sources for x86_64 are shared in the i386 directory which will be included thanks to TARGET_BASE_ARCH. However not all sources build so we need to filter out the ones we can't build in the 64 bit world.

---
 tests/tcg/i386/Makefile.target   |  2 +-
 tests/tcg/x86_64/Makefile.target | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 tests/tcg/x86_64/Makefile.target
tests/tcg/i386/Makefile.target +1 -1
index a6cc76664c..3a2736616c 100644
@@ -7,7 +7,7 @@ VPATH 		+= $(I386_SRC)
 
 I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
 I386_TESTS=$(I386_SRCS:.c=)
-
+I386_ONLY_TESTS=$(filter-out test-i386-ssse3, $(I386_TESTS))
 # Update TESTS
 TESTS+=$(I386_ONLY_TESTS)
 
tests/tcg/x86_64/Makefile.target new file +15 -0
new file mode 100644
index 0000000000..74f170b9ed
@@ -0,0 +1,15 @@
+# -*- Mode: makefile -*-
+#
+# x86_64 tests - included from tests/tcg/Makefile.target
+#
+# Currently we only build test-x86_64 and test-i386-ssse3 from
+# $(SRC)/tests/tcg/i386/
+#
+
+X86_64_TESTS=$(filter-out $(I386_ONLY_TESTS), $(TESTS))
+X86_64_TESTS+=test-x86_64
+TESTS:=$(X86_64_TESTS)
+
+test-x86_64: LDFLAGS+=-lm -lc
+test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h
+	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
Signature · 1 line
2.17.0
#41 lore raw

PATCH v2 23/43 tests/tcg/i386/test-i386: use modern vector_size attributes

In reply to Alex Bennée

The compiler complains about the old __mode__ style attributes.

---
 tests/tcg/i386/test-i386.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/tcg/i386/test-i386.c +2 -2
index cae6a7773a..caef4da176 100644
@@ -2106,8 +2106,8 @@ static void test_enter(void)
 
 #ifdef TEST_SSE
 
-typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
-typedef float __m128 __attribute__ ((__mode__(__V4SF__)));
+typedef int __m64 __attribute__ ((vector_size(8)));
+typedef float __m128 __attribute__ ((vector_size(16)));
 
 typedef union {
     double d[2];
Signature · 1 line
2.17.0
#43 lore raw

PATCH v2 24/43 tests/tcg/i386/test-i386: fix printf format

In reply to Alex Bennée
---
 tests/tcg/i386/test-i386.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tcg/i386/test-i386.c +1 -1
index caef4da176..a29b41e764 100644
@@ -2258,7 +2258,7 @@ SSE_OP(a ## sd);
         "pop %0\n"\
         : "=rm" (eflags)\
         : "x" (a.dq), "x" (b.dq));\
-    printf("%-9s: a=%f b=%f cc=%04x\n",\
+    printf("%-9s: a=%f b=%f cc=%04lx\n",\
            #op, a1, b1,\
            eflags & (CC_C | CC_P | CC_Z | CC_S | CC_O | CC_A));\
 }
Signature · 1 line
2.17.0
#45 lore raw

PATCH v2 25/43 tests/tcg: move ARM specific tests into subdir

In reply to Alex Bennée

These only need to be built for ARM guests.

---
v2
- do VPATH manipulation in tests/tcg/arm/Makefile.target
- merge with fix hello-arm test

---
 tests/tcg/README                      |  9 ---------
 tests/tcg/arm/Makefile.target         | 13 +++++++++++++
 tests/tcg/arm/README                  | 11 +++++++++++
 tests/tcg/{ => arm}/hello-arm.c       |  0
 tests/tcg/{ => arm}/test-arm-iwmmxt.s |  0
 5 files changed, 24 insertions(+), 9 deletions(-)
 create mode 100644 tests/tcg/arm/Makefile.target
 create mode 100644 tests/tcg/arm/README
 rename tests/tcg/{ => arm}/hello-arm.c (100%)
 rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%)
tests/tcg/README +0 -9
index 469504c4cb..625f2326e6 100644
@@ -5,15 +5,6 @@ or they are architecture specific.
 
 
 
-ARM
-===
-
-hello-arm
----------
-
-test-arm-iwmmxt
----------------
-
 MIPS
 ====
 
tests/tcg/arm/Makefile.target new file +13 -0
new file mode 100644
index 0000000000..bc6962ecc6
@@ -0,0 +1,13 @@
+# -*- Mode: makefile -*-
+#
+# ARM - included from tests/tcg/Makefile.target
+#
+
+ARM_SRC=$(SRC_PATH)/tests/tcg/arm
+
+# Set search path for all sources
+VPATH 		+= $(ARM_SRC)
+
+
+hello-arm: CFLAGS+=-marm -ffreestanding
+hello-arm: LDFLAGS+=-nostdlib
tests/tcg/arm/README new file +11 -0
new file mode 100644
index 0000000000..e6307116e2
@@ -0,0 +1,11 @@
+These are ARM specific guest programs
+
+hello-arm
+---------
+
+A very simple inline assembly, write syscall based hello world
+
+test-arm-iwmmxt
+---------------
+
+A simple test case for older iwmmxt extended ARMs
tests/tcg/arm/hello-arm.c renamed from tests/tcg/hello-arm.c +0 -0
similarity index 100%
rename from tests/tcg/hello-arm.c
rename to tests/tcg/arm/hello-arm.c
tests/tcg/arm/test-arm-iwmmxt.s renamed from tests/tcg/test-arm-iwmmxt.s +0 -0
similarity index 100%
rename from tests/tcg/test-arm-iwmmxt.s
rename to tests/tcg/arm/test-arm-iwmmxt.s
Signature · 1 line
2.17.0
Reviewed-by on v2 25/43
#46 lore raw

Re: [Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir

Quoted 11 lines · Alex Bennée

These only need to be built for ARM guests.

---
v2
- do VPATH manipulation in tests/tcg/arm/Makefile.target
- merge with fix hello-arm test
---

r~

#47 lore raw

PATCH v2 26/43 tests/tcg/arm: fix up test-arm-iwmmxt test

In reply to Alex Bennée

We need to rename the source file to a .S so we can do a single-line assemble and link invocation. We also specify the additional CFLAGS for the compile as it's a non-standard ARM binary.

---
 tests/tcg/arm/Makefile.target                          | 5 +++++
 tests/tcg/arm/{test-arm-iwmmxt.s => test-arm-iwmmxt.S} | 0
 2 files changed, 5 insertions(+)
 rename tests/tcg/arm/{test-arm-iwmmxt.s => test-arm-iwmmxt.S} (100%)
tests/tcg/arm/Makefile.target +5 -0
index bc6962ecc6..be9d3fb4a1 100644
@@ -8,6 +8,11 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm
 # Set search path for all sources
 VPATH 		+= $(ARM_SRC)
 
+TESTS += hello-arm test-arm-iwmmxt
 
 hello-arm: CFLAGS+=-marm -ffreestanding
 hello-arm: LDFLAGS+=-nostdlib
+
+test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs
+test-arm-iwmmxt: test-arm-iwmmxt.S
+	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
tests/tcg/arm/test-arm-iwmmxt.S renamed from tests/tcg/arm/test-arm-iwmmxt.s +0 -0
similarity index 100%
rename from tests/tcg/arm/test-arm-iwmmxt.s
rename to tests/tcg/arm/test-arm-iwmmxt.S
Signature · 1 line
2.17.0
#48 lore raw

Re: [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test

tests/tcg/arm/Makefile.target ARM_SRC=$(SRC_PATH)/tests/tcg/arm · line 17

Quoted 2 lines · Alex Bennée
tests/tcg/arm/Makefile.target +2 -0
+test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs
+test-arm-iwmmxt: test-arm-iwmmxt.S

This appears to be insufficient.
If I begin with armv7l-linux-gnueabihf-gcc, then I get

CROSS-BUILD arm guest-tests with armv7l-linux-gnueabihf-gcc
cc1: error: iWMMXt and NEON are incompatible

r~

#49 lore raw

Re: [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test

Quoted 9 lines · Richard Henderson

tests/tcg/arm/Makefile.target ARM_SRC=$(SRC_PATH)/tests/tcg/arm · line 17

Quoted 2 lines · Alex Bennée
tests/tcg/arm/Makefile.target +2 -0
+test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs
+test-arm-iwmmxt: test-arm-iwmmxt.S

This appears to be insufficient.
If I begin with armv7l-linux-gnueabihf-gcc, then I get

CROSS-BUILD arm guest-tests with armv7l-linux-gnueabihf-gcc
cc1: error: iWMMXt and NEON are incompatible

Was this with the docker fall-back?

It worked with my local:

07:37:25 [alex@zen:~/l/q/qemu.git] softmmu/demacro-cputlb-rfc + arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Quoted 4 lines

r~

--
Alex Bennée

#50 lore raw

Re: [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test

Quoted 10 lines · Alex Bennée
Quoted 7 lines · Richard Henderson

tests/tcg/arm/Makefile.target ARM_SRC=$(SRC_PATH)/tests/tcg/arm · line 17

Quoted 2 lines · Alex Bennée
tests/tcg/arm/Makefile.target +2 -0
+test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs
+test-arm-iwmmxt: test-arm-iwmmxt.S

This appears to be insufficient.
If I begin with armv7l-linux-gnueabihf-gcc, then I get

Quoted 4 lines
Quoted 2 lines

CROSS-BUILD arm guest-tests with armv7l-linux-gnueabihf-gcc
cc1: error: iWMMXt and NEON are incompatible

Was this with the docker fall-back?

No, apparently my docker install is "sudo", and so is unused.

Quoted 7 lines

It worked with my local:

07:37:25 [alex@zen:~/l/q/qemu.git] softmmu/demacro-cputlb-rfc + arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

My arm cross is self-built, with configure options mirroring a native fedora arm gcc:

Target: armv7l-linux-gnueabihf
Configured with: ../comb/configure --with-sysroot --prefix=/home/rth/work/gcc/run-cross --enable-languages=c,c++,lto --target=armv7l-linux-gnueabihf --with-system-zlib --enable-__cxa_atexit --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-initfini-array --with-cpu=cortex-a15 --with-float=hard --with-fpu=neon-vfpv4 --with-abi=aapcs-linux Thread model: posix
gcc version 7.0.0 20161220 (experimental) [master revision f7619de:63fb493:269ead384b0fdd3dd4f7030be44e54e5a19c4e8c] (GCC)

r~

#51 lore raw

PATCH v2 27/43 tests/tcg/aarch64: add Makefile.target

In reply to Alex Bennée

Nothing much here yet.

---
 tests/tcg/aarch64/Makefile.target | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 tests/tcg/aarch64/Makefile.target
tests/tcg/aarch64/Makefile.target new file +5 -0
new file mode 100644
index 0000000000..4ac8fbe73f
@@ -0,0 +1,5 @@
+# -*- Mode: makefile -*-
+#
+# AArch64 specific tweaks
+
+fcvt: LDFLAGS+=-lm
Signature · 1 line
2.17.0
#52 lore raw

PATCH v2 28/43 tests/tcg/aarch64: add fcvt test cases for AArch64

In reply to Alex Bennée

This runs through the usual float to float conversions and crucially also runs with ARM Alternative Half Precision Format.

---
 tests/tcg/aarch64/Makefile.target |    8 +
 tests/tcg/aarch64/fcvt.c          |  260 ++++++
 tests/tcg/aarch64/fcvt.out        | 1305 +++++++++++++++++++++++++++++
 tests/tcg/arm/Makefile.target     |    4 +-
 4 files changed, 1576 insertions(+), 1 deletion(-)
 create mode 100644 tests/tcg/aarch64/fcvt.c
 create mode 100644 tests/tcg/aarch64/fcvt.out
tests/tcg/aarch64/Makefile.target +8 -0
index 4ac8fbe73f..26be1c58ef 100644
@@ -2,4 +2,12 @@
 #
 # AArch64 specific tweaks
 
+AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64
+VPATH 		+= $(AARCH64_SRC)
+
+# we don't build any of the ARM tests
+AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS))
+AARCH64_TESTS+=fcvt
+TESTS:=$(AARCH64_TESTS)
+
 fcvt: LDFLAGS+=-lm
tests/tcg/aarch64/fcvt.c new file +260 -0

260 lines not on this page · raw message

tests/tcg/aarch64/fcvt.out new file +1305 -0

1,305 lines not on this page · raw message

tests/tcg/arm/Makefile.target +3 -1
index be9d3fb4a1..f1c7ec46b5 100644
@@ -8,7 +8,9 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm
 # Set search path for all sources
 VPATH 		+= $(ARM_SRC)
 
-TESTS += hello-arm test-arm-iwmmxt
+ARM_TESTS=hello-arm test-arm-iwmmxt
+
+TESTS += $(ARM_TESTS)
 
 hello-arm: CFLAGS+=-marm -ffreestanding
 hello-arm: LDFLAGS+=-nostdlib
Signature · 1 line
2.17.0
#53 lore raw

PATCH v2 29/43 tests/tcg/aarch64: userspace system register test

In reply to Alex Bennée
---
 tests/tcg/aarch64/Makefile.target |  2 +-
 tests/tcg/aarch64/sysregs.c       | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 tests/tcg/aarch64/sysregs.c
tests/tcg/aarch64/Makefile.target +1 -1
index 26be1c58ef..0727bd3bd2 100644
@@ -7,7 +7,7 @@ VPATH 		+= $(AARCH64_SRC)
 
 # we don't build any of the ARM tests
 AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS))
-AARCH64_TESTS+=fcvt
+AARCH64_TESTS+=fcvt sysregs
 TESTS:=$(AARCH64_TESTS)
 
 fcvt: LDFLAGS+=-lm
tests/tcg/aarch64/sysregs.c new file +14 -0
new file mode 100644
index 0000000000..0cd0c42d8c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+#define get_cpu_reg(id) ({                                      \
+                unsigned long __val;                            \
+                asm("mrs %0, "#id : "=r" (__val));              \
+                printf("%-20s: 0x%016lx\n", #id, __val);        \
+        })
+
+int main(void)
+{
+    get_cpu_reg(cntvct_el0);
+    get_cpu_reg(cntfrq_el0);
+    return 0;
+}
Signature · 1 line
2.17.0
#54 lore raw

PATCH v2 30/43 tests/tcg: move MIPS specific tests into subdir

In reply to Alex Bennée

These only need to be built for MIPS guests.

---
 tests/tcg/README                  | 11 -----------
 tests/tcg/mips/README             |  7 +++++++
 tests/tcg/{ => mips}/hello-mips.c |  0
 3 files changed, 7 insertions(+), 11 deletions(-)
 create mode 100644 tests/tcg/mips/README
 rename tests/tcg/{ => mips}/hello-mips.c (100%)
tests/tcg/README +0 -11
index 625f2326e6..a5643d33e7 100644
@@ -3,17 +3,6 @@ regression testing. Tests are either multi-arch, meaning they can be
 built for all guest architectures that support linux-user executable,
 or they are architecture specific.
 
-
-
-MIPS
-====
-
-hello-mips
-----------
-
-hello-mipsel
-------------
-
 CRIS
 ====
 The testsuite for CRIS is in tests/tcg/cris.  You can run it
tests/tcg/mips/README new file +7 -0
new file mode 100644
index 0000000000..e5bbc58ec5
@@ -0,0 +1,7 @@
+MIPS
+====
+
+hello-mips
+----------
+
+A very simple inline assembly, write syscall based hello world
tests/tcg/mips/hello-mips.c renamed from tests/tcg/hello-mips.c +0 -0
similarity index 100%
rename from tests/tcg/hello-mips.c
rename to tests/tcg/mips/hello-mips.c
Signature · 1 line
2.17.0
#55 lore raw

PATCH v2 31/43 tests/tcg: enable building for MIPS

In reply to Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though.

---
 tests/tcg/mips/Makefile.include | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tests/tcg/mips/Makefile.include
tests/tcg/mips/Makefile.include new file +17 -0
new file mode 100644
index 0000000000..a9beceb623
@@ -0,0 +1,17 @@
+#
+# Makefile.include for all MIPs targets
+#
+# As Debian doesn't support mip64 in big endian mode the only way to
+# build BE is to pass a working cross compiler to ./configure
+#
+
+ifeq ($(TARGET_NAME),mips64el)
+DOCKER_IMAGE=debian-mips64el-cross
+DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
+else ifeq ($(TARGET_NAME),mipsel)
+DOCKER_IMAGE=debian-mipsel-cross
+DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
+else ifeq ($(TARGET_NAME),mips)
+DOCKER_IMAGE=debian-mips-cross
+DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
+endif
Signature · 1 line
2.17.0
#56 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

Quoted 3 lines · Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though.

Oh we have one, using CFLAGS+=-EB

we don't have cross libraries although.

Quoted 30 lines
---
 tests/tcg/mips/Makefile.include | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tests/tcg/mips/Makefile.include
tests/tcg/mips/Makefile.include new file +17 -0
new file mode 100644
index 0000000000..a9beceb623
@@ -0,0 +1,17 @@
+#
+# Makefile.include for all MIPs targets
+#
+# As Debian doesn't support mip64 in big endian mode the only way to
+# build BE is to pass a working cross compiler to ./configure
+#
+
+ifeq ($(TARGET_NAME),mips64el)
+DOCKER_IMAGE=debian-mips64el-cross
+DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
+else ifeq ($(TARGET_NAME),mipsel)
+DOCKER_IMAGE=debian-mipsel-cross
+DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
+else ifeq ($(TARGET_NAME),mips)
+DOCKER_IMAGE=debian-mips-cross
+DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
+endif
#57 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though.

Oh we have one, using CFLAGS+=-EB

we don't have cross libraries although.

Yeah I thought the same with the ARM compilers (-mbig-endian) but it's the libraries that let us down. If, as you say, newlib gets this right I suspect we should use that to build the compilers not supported out of the box by Debian.

Quoted 23 lines
Quoted 23 lines
---
 tests/tcg/mips/Makefile.include | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tests/tcg/mips/Makefile.include
tests/tcg/mips/Makefile.include new file +10 -0
new file mode 100644
index 0000000000..a9beceb623
@@ -0,0 +1,17 @@
+#
+# Makefile.include for all MIPs targets
+#
+# As Debian doesn't support mip64 in big endian mode the only way to
+# build BE is to pass a working cross compiler to ./configure
+#
+
+ifeq ($(TARGET_NAME),mips64el)
+DOCKER_IMAGE=debian-mips64el-cross
+DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
Quoted 8 lines

tests/tcg/mips/Makefile.include line 17

Quoted 8 lines
tests/tcg/mips/Makefile.include new file +7 -0
+else ifeq ($(TARGET_NAME),mipsel)
+DOCKER_IMAGE=debian-mipsel-cross
+DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
+else ifeq ($(TARGET_NAME),mips)
+DOCKER_IMAGE=debian-mips-cross
+DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
+endif

--
Alex Bennée

#58 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

Quoted 8 lines · Alex Bennée
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though.

Quoted 8 lines
Quoted 3 lines

Oh we have one, using CFLAGS+=-EB

we don't have cross libraries although.

Yeah I thought the same with the ARM compilers (-mbig-endian) but it's the libraries that let us down. If, as you say, newlib gets this right I suspect we should use that to build the compilers not supported out of the box by Debian.

I don't think we really want to get into the business of building our own cross compilers if we can avoid it...it's harder than it looks and we would be essentially reinventing the wheel.

thanks
-- PMM

#59 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though.

Oh we have one, using CFLAGS+=-EB

we don't have cross libraries although.

Quoted 8 lines
Quoted 4 lines

Yeah I thought the same with the ARM compilers (-mbig-endian) but it's the libraries that let us down. If, as you say, newlib gets this right I suspect we should use that to build the compilers not supported out of the box by Debian.

I don't think we really want to get into the business of building our own cross compilers if we can avoid it...it's harder than it looks and we would be essentially reinventing the wheel.

I totally agree.

I'v been looking at existing maintained images we can use to cross-build, so we only have to pull (download) and image and use it, not wasting cpu time building it.

However some images might be huge, full of things we don't need. But I prefer that rather than having to maintain cross toolchains.

An example I like to use is the coreboot-sdk, designed to build i386/amd64 binaries, it fulfills our needs. But takes 2GB...

$ docker pull coreboot/coreboot-sdk:1.47
1.47: Pulling from coreboot/coreboot-sdk
3d6aedfc3e47: Downloading [>              ]  538.2kB/1.201GB
d23c9a72f1e5: Waiting

Another candidate is crossbuild, ~1GB

$ docker pull multiarch/crossbuild
#60 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

Quoted 33 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though.

Oh we have one, using CFLAGS+=-EB

we don't have cross libraries although.

Quoted 8 lines
Quoted 4 lines

Yeah I thought the same with the ARM compilers (-mbig-endian) but it's the libraries that let us down. If, as you say, newlib gets this right I suspect we should use that to build the compilers not supported out of the box by Debian.

I don't think we really want to get into the business of building our own cross compilers if we can avoid it...it's harder than it looks and we would be essentially reinventing the wheel.

I totally agree.

I'v been looking at existing maintained images we can use to cross-build, so we only have to pull (download) and image and use it, not wasting cpu time building it.

However some images might be huge, full of things we don't need. But I prefer that rather than having to maintain cross toolchains.

An example I like to use is the coreboot-sdk, designed to build i386/amd64 binaries, it fulfills our needs. But takes 2GB...

Quoted 7 lines
$ docker pull coreboot/coreboot-sdk:1.47
1.47: Pulling from coreboot/coreboot-sdk
3d6aedfc3e47: Downloading [>              ]  538.2kB/1.201GB
d23c9a72f1e5: Waiting

Another candidate is crossbuild, ~1GB

$ docker pull multiarch/crossbuild

Makes sense to me. It is not insanely big. It might take some time to download depending on the network but it's more likely a one-off thing compared to building one from a handcraft dockerfile we make, which probably will involve even more downloading time and disk usage.

Fam

#61 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

In reply to Philippe Mathieu-Daudé
Quoted 33 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though.

Oh we have one, using CFLAGS+=-EB

we don't have cross libraries although.

Quoted 8 lines
Quoted 4 lines

Yeah I thought the same with the ARM compilers (-mbig-endian) but it's the libraries that let us down. If, as you say, newlib gets this right I suspect we should use that to build the compilers not supported out of the box by Debian.

I don't think we really want to get into the business of building our own cross compilers if we can avoid it...it's harder than it looks and we would be essentially reinventing the wheel.

I totally agree.

I'v been looking at existing maintained images we can use to cross-build, so we only have to pull (download) and image and use it, not wasting cpu time building it.

However some images might be huge, full of things we don't need. But I prefer that rather than having to maintain cross toolchains.

An example I like to use is the coreboot-sdk, designed to build i386/amd64 binaries, it fulfills our needs. But takes 2GB...

Quoted 7 lines
$ docker pull coreboot/coreboot-sdk:1.47
1.47: Pulling from coreboot/coreboot-sdk
3d6aedfc3e47: Downloading [>              ]  538.2kB/1.201GB
d23c9a72f1e5: Waiting

Another candidate is crossbuild, ~1GB

$ docker pull multiarch/crossbuild

I agree to a point. Our current images are all based off "official" docker hub images. I'm probably giving the state of officialness too much credit but I'm at least reasonably certain the Debian images can be re-created ourselves if we wanted to and have publicly available recipes.

As a bonus, being Debian based, we meet our GPL compliance because everything on the image can have its source pulled with apt.

I'm unsure about how the coreboot image was built or indeed if it is an official image. From my point of view it is just a bunch of binaries in a set of docker layers.

So personally I would put "build our own compiler from source inside docker" slightly above "unpack a random binary tarball into docker". That said with some of our funkier supported guests we may end up having to do just that :-/

--
Alex Bennée

#62 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

In reply to Philippe Mathieu-Daudé
Quoted 30 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Alex Bennée
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though.

Oh we have one, using CFLAGS+=-EB

we don't have cross libraries although.

Quoted 8 lines
Quoted 4 lines

Yeah I thought the same with the ARM compilers (-mbig-endian) but it's the libraries that let us down. If, as you say, newlib gets this right I suspect we should use that to build the compilers not supported out of the box by Debian.

I don't think we really want to get into the business of building our own cross compilers if we can avoid it...it's harder than it looks and we would be essentially reinventing the wheel.

I totally agree.

I'v been looking at existing maintained images we can use to cross-build, so we only have to pull (download) and image and use it, not wasting cpu time building it.

However some images might be huge, full of things we don't need. But I prefer that rather than having to maintain cross toolchains.

Quoted 7 lines

An example I like to use is the coreboot-sdk, designed to build i386/amd64 binaries, it fulfills our needs. But takes 2GB...

$ docker pull coreboot/coreboot-sdk:1.47
1.47: Pulling from coreboot/coreboot-sdk
3d6aedfc3e47: Downloading [>              ]  538.2kB/1.201GB
d23c9a72f1e5: Waiting

Found the dockerfile:

https://github.com/MattDevo/coreboot/blob/master/util/docker/coreboot-sdk/Dockerfile

Quoted 3 lines

Another candidate is crossbuild, ~1GB

$ docker pull multiarch/crossbuild

This looks like it is just a multiarch debian setup much like our own.

--
Alex Bennée

#63 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

In reply to Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Peter Maydell

I don't think we really want to get into the business of building our own cross compilers if we can avoid it...it's harder than it looks and we would be essentially reinventing the wheel.

I totally agree.

I'v been looking at existing maintained images we can use to cross-build, so we only have to pull (download) and image and use it, not wasting cpu time building it.

Projects that are in the "maintain cross toolchains" business:
* buildroot
* https://github.com/richfelker/musl-cross-make

But really my feeling is that we should for the moment stick to getting a reliable test setup for the architectures that Debian does provide cross toolchains for. That will give us:
* much more coverage than we have at the moment
* coverage for the guests that people actually care about

We can always come back and think about filling in the gaps later.

thanks
-- PMM

#64 lore raw

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

Quoted 8 lines · Peter Maydell
Quoted 7 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Peter Maydell

I don't think we really want to get into the business of building our own cross compilers if we can avoid it...it's harder than it looks and we would be essentially reinventing the wheel.

I totally agree.

Quoted 7 lines
Quoted 3 lines

I'v been looking at existing maintained images we can use to cross-build, so we only have to pull (download) and image and use it, not wasting cpu time building it.

Projects that are in the "maintain cross toolchains" business:
* buildroot
* https://github.com/richfelker/musl-cross-make

I'll have a look at those. My previous attempts were using:

https://wiki.linaro.org/ABE
https://crosstool-ng.github.io/

I certainly don't want to be in the business of inventing yet another set of scripts to build cross compilers!

Quoted 8 lines

But really my feeling is that we should for the moment stick to getting a reliable test setup for the architectures that Debian does provide cross toolchains for. That will give us:
* much more coverage than we have at the moment
* coverage for the guests that people actually care about

We can always come back and think about filling in the gaps later.

Don't worry - not having every single architecture done isn't going to stop the eventual submission. However it would be nice to have at least one non-Debian cross-compiler setup as an example and to validate the compiler-in-docker approach.

Quoted 3 lines

thanks
-- PMM

--
Alex Bennée

#65 lore raw

PATCH v2 32/43 tests/tcg/mips: include common mips hello-mips

In reply to Alex Bennée
---
 tests/tcg/mips/Makefile.target | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 tests/tcg/mips/Makefile.target
tests/tcg/mips/Makefile.target new file +19 -0
new file mode 100644
index 0000000000..71f0c2dd53
@@ -0,0 +1,19 @@
+# -*- Mode: makefile -*-
+#
+# MIPS - included from tests/tcg/Makefile.target
+#
+
+MIPS_SRC=$(SRC_PATH)/tests/tcg/mips
+
+# Set search path for all sources
+VPATH 		+= $(MIPS_SRC)
+
+MIPS_TESTS=hello-mips
+
+TESTS += $(MIPS_TESTS)
+
+hello-mips: CFLAGS+=-ffreestanding
+hello-mips: LDFLAGS+=-nostdlib
+
+# For MIPS32 and 64 we have a bunch of extra tests in sub-directories
+# however they are intended for system tests.
Signature · 1 line
2.17.0
#66 lore raw

PATCH v2 33/43 tests/tcg: enable building for s390x

In reply to Alex Bennée

This doesn't add any additional tests but enables building the multiarch tests for s390x.

---
 tests/tcg/s390x/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 tests/tcg/s390x/Makefile.include
tests/tcg/s390x/Makefile.include new file +2 -0
new file mode 100644
index 0000000000..1f58115d96
@@ -0,0 +1,2 @@
+DOCKER_IMAGE=debian-s390x-cross
+DOCKER_CROSS_COMPILER=s390x-linux-gnu-gcc
Signature · 1 line
2.17.0
#67 lore raw

PATCH v2 34/43 tests/tcg: enable building for ppc64

In reply to Alex Bennée

Currently this just enables building the multiarch tests.

---
 tests/tcg/ppc64le/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 tests/tcg/ppc64le/Makefile.include
tests/tcg/ppc64le/Makefile.include new file +2 -0
new file mode 100644
index 0000000000..d71cfc9aa7
@@ -0,0 +1,2 @@
+DOCKER_IMAGE=debian-ppc64el-cross
+DOCKER_CROSS_COMPILER=powerpc64le-linux-gnu-gcc
Signature · 1 line
2.17.0
#68 lore raw

PATCH v2 35/43 tests/tcg/Makefile: update to be called from Makefile.target

In reply to Alex Bennée

This make is now invoked from each individual target make with the appropriate CC and EXTRA_CFLAGS set for each guest. It then includes additional Makefile.targets from:

- tests/tcg/multiarch (always)
- tests/tcg/$(TARGET_BASE_ARCH) (if available)
- tests/tcg/$(TARGET_NAME)

The order is important as the later Makefile's may want to suppress TESTS from it's base arch profile. Each included Makefile.target is responsible for adding TESTS as well as defining any special build instructions for individual tests.

---
v2
- cleaner approach to include sub makefiles
- move TESTS/VPATH manipulation into sub-makefile
- avoid double inclusion when TARGET_BASE_ARCH==TARGET_NAME

---
 tests/tcg/Makefile | 153 +++++++++++----------------------------------
 1 file changed, 38 insertions(+), 115 deletions(-)
tests/tcg/Makefile +38 -115
index e12395117a..b9291acc89 100644
@@ -1,125 +1,48 @@
--include ../../config-host.mak
--include $(SRC_PATH)/rules.mak
+# -*- Mode: makefile -*-
+#
+# TCG tests
+#
+# These are complicated by the fact we want to build them for guest
+# systems. This requires knowing what guests we are building and which
+# ones we have cross-compilers for or docker images with
+# cross-compilers.
+#
+# The tests themselves should be as minimal as possible as
+# cross-compilers don't always have a large amount of libraries
+# available.
+#
+# We only include the host build system for SRC_PATH and we don't
+# bother with the common rules.mk. We expect CC/LD to have been set for
+# us from the parent make as well as being passed EXTRA_CFLAGS.
+#
+# We also expect to be in the tests build dir for the FOO-linux-user.
+#
 
-$(call set-vpath, $(SRC_PATH)/tests/tcg)
+-include ../../config-host.mak
+-include ../config-target.mak
 
-QEMU=../../i386-linux-user/qemu-i386
-QEMU_X86_64=../../x86_64-linux-user/qemu-x86_64
-CC_X86_64=$(CC_I386) -m64
+# Tests we are building
+TESTS=
 
-QEMU_INCLUDES += -I../..
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
-#CFLAGS+=-msse2
+# Start with a blank slate, the build targets get to add stuff first
+CFLAGS=
+QEMU_CFLAGS=
 LDFLAGS=
 
-# TODO: automatically detect ARM and MIPS compilers, and run those too
-
-# runcom maps page 0, so it requires root privileges
-# also, pi_10.com runs indefinitely
-
-I386_TESTS=hello-i386 \
-	   sha1-i386 \
-	   test-i386 \
-	   test-i386-fprem \
-	   # runcom
-
-# native i386 compilers sometimes are not biarch.  assume cross-compilers are
-ifneq ($(ARCH),i386)
-I386_TESTS+=run-test-x86_64
-endif
-
-TESTS = test_path
-ifneq ($(call find-in-path, $(CC_I386)),)
-TESTS += $(I386_TESTS)
+# The order we include is important. We include multiarch, base arch and finally arch
+-include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
+-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.target
+ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
+-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target
 endif
 
-all: $(patsubst %,run-%,$(TESTS))
-test: all
-
-# rules to run tests
-
-.PHONY: $(patsubst %,run-%,$(TESTS))
-
-run-%: %
-	-$(QEMU) ./$*
-
-run-hello-i386: hello-i386
-run-sha1-i386: sha1-i386
-
-run-test-i386: test-i386
-	./test-i386 > test-i386.ref
-	-$(QEMU) test-i386 > test-i386.out
-	@if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi
-
-run-test-i386-fprem: test-i386-fprem
-	./test-i386-fprem > test-i386-fprem.ref
-	-$(QEMU) test-i386-fprem > test-i386-fprem.out
-	@if diff -u test-i386-fprem.ref test-i386-fprem.out ; then echo "Auto Test OK"; fi
-
-run-test-x86_64: test-x86_64
-	./test-x86_64 > test-x86_64.ref
-	-$(QEMU_X86_64) test-x86_64 > test-x86_64.out
-	@if diff -u test-x86_64.ref test-x86_64.out ; then echo "Auto Test OK"; fi
-
-
-run-runcom: runcom
-	-$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com
-
-run-test_path: test_path
-	./test_path
-
-# rules to compile tests
-
-hello-i386: hello-i386.c
-	$(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
-	strip $@
-
-# i386/x86_64 emulation test (test various opcodes) */
-test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
-           test-i386.h test-i386-shift.h test-i386-muldiv.h
-	$(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \
-              $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
-
-test-i386-fprem: test-i386-fprem.c
-	$(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $^
-
-test-x86_64: test-i386.c \
-           test-i386.h test-i386-shift.h test-i386-muldiv.h
-	$(CC_X86_64) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $(<D)/test-i386.c -lm
-
-# vm86 test
-runcom: runcom.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-# speed test
-sha1-i386: sha1.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-# arm test
-hello-arm: hello-arm.o
-	arm-linux-ld -o $@ $<
-
-hello-arm.o: hello-arm.c
-	arm-linux-gcc -Wall -g -O2 -c -o $@ $<
-
-test-arm-iwmmxt: test-arm-iwmmxt.s
-	cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
-
-# MIPS test
-hello-mips: hello-mips.c
-	mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
-
-hello-mipsel: hello-mips.c
-	mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
+# Add the common build options
+CFLAGS+=-Wall -O0 -g -fno-strict-aliasing
+LDFLAGS+=-static
 
-# testsuite for the CRIS port.
-test-cris:
-	$(MAKE) -C cris check
+%: %.c
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
 
-# testsuite for the LM32 port.
-test-lm32:
-	$(MAKE) -C lm32 check
+all: $(TESTS)
 
-clean:
-	rm -f *~ *.o test-i386.out test-i386.ref \
-           test-x86_64.log test-x86_64.ref qruncom $(TESTS)
+# There is no clean target, the calling make just rm's the tests build dir
Signature · 1 line
2.17.0
#69 lore raw

PATCH v2 36/43 Makefile.target: add (clean-)guest-tests targets

In reply to Alex Bennée

Now all the build infrastructure is in place we can build tests for each guest that we support. That support mainly depends on having cross compilers installed or docker setup. To keep all the logic for that together we put the rules in tests/tcg/Makefile.include and include it from the main Makefile.target.

---
 Makefile.target            |  5 +++
 tests/tcg/Makefile.include | 79 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 tests/tcg/Makefile.include
Makefile.target +5 -0
index d0ec77a307..a30fd40257 100644
@@ -36,6 +36,11 @@ endif
 PROGS=$(QEMU_PROG) $(QEMU_PROGW)
 STPFILES=
 
+# Makefile Tests
+ifdef CONFIG_USER_ONLY
+include $(SRC_PATH)/tests/tcg/Makefile.include
+endif
+
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
tests/tcg/Makefile.include new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
2.17.0
#70 lore raw

PATCH v2 37/43 tests/Makefile.include: add (clean-)check-tcg targets

In reply to Alex Bennée

This will ensure all linux-user targets build their guest test programs.

---
v2
- use -include instead of complex macro stuff
- also include TARGET_BASE_ARCH/Makefile

---
 tests/Makefile.include     | 19 ++++++++++++++++++-
 tests/tcg/Makefile.include | 33 +++++++++++++++------------------
 2 files changed, 33 insertions(+), 19 deletions(-)
tests/Makefile.include +18 -1
index 3d2f0458ab..c402de901e 100644
@@ -10,6 +10,7 @@ check-help:
 	@echo " $(MAKE) check-speed          Run qobject speed tests"
 	@echo " $(MAKE) check-qapi-schema    Run QAPI schema tests"
 	@echo " $(MAKE) check-block          Run block tests"
+	@echo " $(MAKE) check-tcg            Run TCG tests"
 	@echo " $(MAKE) check-report.html    Generates an HTML test report"
 	@echo " $(MAKE) check-clean          Clean the tests"
 	@echo
@@ -916,6 +917,23 @@ check-report.xml: $(patsubst %,check-report-qtest-%.xml, $(QTEST_TARGETS)) check
 check-report.html: check-report.xml
 	$(call quiet-command,gtester-report $< > $@,"GEN","$@")
 
+# Per guest TCG tests
+
+LINUX_USER_TARGETS=$(filter %-linux-user,$(TARGET_LIST))
+BUILD_TCG_TARGET_RULES=$(patsubst %,tcg-tests-%, $(LINUX_USER_TARGETS))
+CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(LINUX_USER_TARGETS))
+
+tcg-tests-%:
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" guest-tests,)
+
+clean-tcg-tests-%:
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" clean-guest-tests,)
+
+.PHONY: check-tcg
+check-tcg: $(BUILD_TCG_TARGET_RULES)
+
+.PHONY: clean-tcg
+clean-tcg: $(CLEAN_TCG_TARGET_RULES)
 
 # Other tests
 
@@ -958,7 +976,6 @@ check-speed: $(patsubst %,check-%, $(check-speed-y))
 check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest check-decodetree
 check-clean:
-	$(MAKE) -C tests/tcg clean
 	rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 	rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
 	rm -f tests/test-qapi-gen-timestamp
tests/tcg/Makefile.include +15 -18
index cb8bb36026..d82f4d32fb 100644
@@ -8,19 +8,14 @@
 # guest compiler or calling one of our docker images to do it for us.
 #
 
-# The per ARCH makefile, if it exists holds extra information about
-# useful docker images or alternative compiler flags. Include it if it
-# exists
+# The per ARCH makefile, if it exists, holds extra information about
+# useful docker images or alternative compiler flags.
 
-ARCH_MAKEFILE=$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
-CHECK_INCLUDE=$(wildcard $(ARCH_MAKEFILE))
-
-ifeq ($(ARCH_MAKEFILE),$(CHECK_INCLUDE))
-include $(ARCH_MAKEFILE)
-endif
+-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
+-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
 
 GUEST_BUILD=
-
+TCG_MAKE=$(SRC_PATH)/tests/tcg/Makefile
 # Support installed Cross Compilers
 
 ifdef CROSS_CC_GUEST
@@ -28,10 +23,10 @@ ifdef CROSS_CC_GUEST
 .PHONY: cross-build-guest-tests
 cross-build-guest-tests:
 	$(call quiet-command, \
-          (mkdir -p tests && cd tests && \
-	   make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(CROSS_CC_GUEST)), \
-	  "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)")
-
+	   (mkdir -p tests && cd tests && \
+	    make -f $(TCG_MAKE) CC=$(CROSS_CC_GUEST) \
+				EXTRA_CFLAGS=$(CROSS_CC_GUEST_CFLAGS)), \
+	"CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)")
 
 GUEST_BUILD=cross-build-guest-tests
 
@@ -54,9 +49,10 @@ DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE)
 .PHONY: docker-build-guest-tests
 docker-build-guest-tests: $(DOCKER_PREREQ)
 	$(call quiet-command, \
-          (mkdir -p tests && cd tests && \
-	   make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(DOCKER_COMPILE_CMD)), \
-	  "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
+	  (mkdir -p tests && cd tests && \
+	   make -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \
+			       EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \
+	"CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
 
 GUEST_BUILD=docker-build-guest-tests
 
@@ -70,7 +66,8 @@ ifneq ($(GUEST_BUILD),)
 guest-tests: $(GUEST_BUILD)
 else
 guest-tests:
-	$(call quiet-command, /bin/true, "CROSS-BUILD", "$(TARGET_NAME) guest-tests SKIPPED")
+	$(call quiet-command, /bin/true, "CROSS-BUILD", \
+		"$(TARGET_NAME) guest-tests SKIPPED")
 endif
 
 # It doesn't mater if these don't exits
Signature · 1 line
2.17.0
#71 lore raw

PATCH v2 38/43 osdep: disable glib-compat.h include with QEMU_NO_GLIB

In reply to Alex Bennée

From: "Emilio G. Cota" <[email protected]>

To ease the cross-compilation of tests that do not use glib.

---
 include/qemu/osdep.h | 2 ++
 1 file changed, 2 insertions(+)
include/qemu/osdep.h +2 -0
index 41658060a7..fabaf73007 100644
@@ -104,7 +104,9 @@ extern int daemon(int, int);
 #include "sysemu/os-posix.h"
 #endif
 
+#ifndef QEMU_NO_GLIB
 #include "glib-compat.h"
+#endif
 #include "qemu/typedefs.h"
 
 /*
Signature · 1 line
2.17.0
#73 lore raw

PATCH v2 39/43 softfloat: do not include glib headers

In reply to Alex Bennée

From: "Emilio G. Cota" <[email protected]>

To ease the cross-compilation of softfloat.o.

---
 fpu/softfloat.c | 4 ++++
 1 file changed, 4 insertions(+)
fpu/softfloat.c +4 -0
index 70e0c40a1c..a2a5d4ea33 100644
@@ -82,6 +82,7 @@ this code that are retained.
 /* softfloat (and in particular the code in softfloat-specialize.h) is
  * target-dependent and needs the TARGET_* macros.
  */
+#define QEMU_NO_GLIB
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
 #include "fpu/softfloat.h"
@@ -105,6 +106,9 @@ this code that are retained.
 *----------------------------------------------------------------------------*/
 #include "softfloat-specialize.h"
 
+/* glib headers are not included due to QEMU_NO_GLIB */
+#define g_assert_not_reached() assert(false)
+
 /*----------------------------------------------------------------------------
 | Returns the fraction bits of the half-precision floating-point value `a'.
 *----------------------------------------------------------------------------*/
Signature · 1 line
2.17.0
#75 lore raw

PATCH v2 40/43 tests: add fp-test, a floating point test suite

In reply to Alex Bennée

From: "Emilio G. Cota" <[email protected]>

This will allow us to run correctness tests against our
FP implementation. The test can be run in two modes (called "testers"): host and soft. With the former we check the results and FP flags on the host machine against the model.
With the latter we check QEMU's fpu primitives against the model. Note that in soft mode we are not instantiating any particular CPU (hence the HW_POISON_H hack to avoid macro poisoning); for that we need to run the test in host mode under QEMU.

The input files are taken from IBM's FPGen test suite:
https://www.research.ibm.com/haifa/projects/verification/fpgen/

I see no license file in there so I am just downloading them with wget. We might want to keep a copy on a qemu server though, in case IBM takes those files down in the future.

The "IBM" syntax of those files (for now the only syntax supported in fp-test) is documented here:
https://www.research.ibm.com/haifa/projects/verification/fpgen/papers/ieee-test-suite-v2.pdf

Note that the syntax document has some inaccuracies; the appended parsing code works around some of those.

The exception flag (-e) is important: many of the optimizations included in the following commits assume that the inexact flag is set, so "-e x" is necessary in order to test those code paths.

The whitelist flag (-w) points to a file with test cases to be ignored. I have put some whitelist files online, but we should have them on a QEMU-related server.

Thus, a typical of fp-test is as follows:

  $ cd qemu/build/tests/fp-test
  $ make -j && \
	./fp-test -t soft ibm/*.fptest \
	-w whitelist.txt \
	-e x

If we want to test after-rounding tininess detection, then we need to pass "-a -w whitelist-tininess-after.txt" in addition to the above. (NB. we can pass "-w" as many times as we want.)

The patch immediately after this one fixes a mismatch against the model in softfloat, but after that is applied the above should finish with a 0 return code, and print something like:
All tests OK.
Tests passed: 76572. Not handled: 51237, whitelisted: 2662

The tests pass on "host" mode on x86_64 and aarch64 machines, although note that for the x86_64 you need to pass -w whitelist-tininess-after.txt.

Running on host mode under QEMU reports flag mismatches (e.g. for x86_64-linux-user), but that isn't too surprising given how little love the i386 frontend gets. Host mode under aarch64-linux-user passes OK.

Flush-to-zero and flush-inputs-to-zero modes can be tested with the -z and -Z flags. Note however that the IBM input files are only IEEE-compliant, so for now I've tested these modes by diff'ing the reported errors against the model files. We should look into generating files for these non-standard modes to make testing these modes less painful.

---
v2 (ajb,cota):
- build fixes to avoid glib dependency

---
 configure              |    2 +
 tests/Makefile.include |    3 +
 tests/fp/.gitignore    |    3 +
 tests/fp/Makefile      |   34 ++
 tests/fp/fp-test.c     | 1173 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 1215 insertions(+)
 create mode 100644 tests/fp/.gitignore
 create mode 100644 tests/fp/Makefile
 create mode 100644 tests/fp/fp-test.c
configure +2 -0
index 0988c88d9f..6362f3af8e 100755
@@ -7222,12 +7222,14 @@ fi
 
 # build tree in object directory in case the source is not in the current directory
 DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm"
+DIRS="$DIRS tests/fp"
 DIRS="$DIRS docs docs/interop fsdev scsi"
 DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
 DIRS="$DIRS roms/seabios roms/vgabios"
 FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
 FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
 FILES="$FILES tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
+FILES="$FILES tests/fp/Makefile"
 FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
 FILES="$FILES pc-bios/spapr-rtas/Makefile"
 FILES="$FILES pc-bios/s390-ccw/Makefile"
tests/Makefile.include +3 -0
index c402de901e..c019aa46a2 100644
@@ -644,6 +644,9 @@ tests/qht-bench$(EXESUF): tests/qht-bench.o $(test-util-obj-y)
 tests/test-bufferiszero$(EXESUF): tests/test-bufferiszero.o $(test-util-obj-y)
 tests/atomic_add-bench$(EXESUF): tests/atomic_add-bench.o $(test-util-obj-y)
 
+tests/fp/%:
+	$(MAKE) -C $(dir $@) $(notdir $@)
+
 tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
 	hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\
 	hw/core/bus.o \
tests/fp/.gitignore new file +3 -0
new file mode 100644
index 0000000000..0a9fef4368
@@ -0,0 +1,3 @@
+ibm
+*.txt
+fp-test
tests/fp/Makefile new file +34 -0
new file mode 100644
index 0000000000..a208f4cefc
@@ -0,0 +1,34 @@
+BUILD_DIR=$(CURDIR)/../..
+
+include ../../config-host.mak
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/fp $(SRC_PATH)/fpu)
+
+QEMU_INCLUDES += -I../..
+QEMU_INCLUDES += -I$(SRC_PATH)/fpu
+# work around TARGET_* poisoning
+QEMU_CFLAGS += -DHW_POISON_H
+
+IBMFP := ibm-fptests.zip
+
+OBJS := fp-test$(EXESUF)
+
+WHITELIST_FILES := whitelist.txt whitelist-tininess-after.txt
+
+all: $(OBJS) ibm $(WHITELIST_FILES)
+
+ibm:
+	wget -nv -O $(IBMFP) http://www.haifa.il.ibm.com/projects/verification/fpgen/download/test_suite.zip
+	mkdir -p $@
+	unzip $(IBMFP) -d $@
+	rm -rf $(IBMFP)
+
+# XXX: upload this to a qemu server, or just commit it.
+$(WHITELIST_FILES):
+	wget -nv -O $@ http://www.cs.columbia.edu/~cota/qemu/fpbench-$@
+
+fp-test$(EXESUF): fp-test.o softfloat.o
+
+clean:
+	rm -f *.o *.d $(OBJS)
tests/fp/fp-test.c new file +1173 -0

1,173 lines not on this page · raw message

Signature · 1 line
2.17.0
#76 lore raw

PATCH v2 41/43 tests/tcg/multiarch: add fp-test into multiarch set

In reply to Alex Bennée

The compile for fp-test is a little funky as we need to include a build of QEMU's softfloat as well. There is still a problem caused by the inclusion of config-host.h by osdep.h as it will trigger problems like:

In file included from /home/alex/lsrc/qemu/qemu.git/include/qemu/bitops.h:16:0,
from /home/alex/lsrc/qemu/qemu.git/fpu/softfloat.c:87:
/home/alex/lsrc/qemu/qemu.git/include/qemu/host-utils.h: In function ‘mulu64’:
/home/alex/lsrc/qemu/qemu.git/include/qemu/host-utils.h:35:5: error: unknown type name ‘__uint128_t’

       __uint128_t r = (__uint128_t)a * b;
     ^

When trying to cross build i386 on an x86_64 host.

---
 tests/tcg/multiarch/Makefile.target | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
tests/tcg/multiarch/Makefile.target +18 -0
index a691fd59d3..52adc18625 100644
@@ -28,3 +28,21 @@ run-test-mmap: test-mmap
 	-$(QEMU) -p 16384 ./test-mmap 16384
 	-$(QEMU) -p 32768 ./test-mmap 32768
 
+#
+# Include the fp-test from the main test suite
+#
+
+VPATH+=$(SRC_PATH)/tests/fp
+VPATH+=$(SRC_PATH)/fpu
+TESTS+=fp-test
+
+FP_CFLAGS := $(CFLAGS) -Wall -O0 -g -fno-strict-aliasing
+FP_CFLAGS += $(QEMU_INCLUDES)
+FP_CFLAGS += -D_GNU_SOURCE -DHW_POISON_H
+
+fp-test.o softfloat.o: %.o: %.c
+	$(CC) $(FP_CFLAGS) -c $< -o $@
+
+fp-test: fp-test.o softfloat.o
+	$(CC) $^ -o $@ -lm -static
+
Signature · 1 line
2.17.0
#77 lore raw

PATCH v2 42/43 tests/tcg: disable fp-test for 32 bit (HACK!)

In reply to Alex Bennée

This prevents us trying to build fp-test for 32 bit guests as they would fail due to pollution from config-host.h when including osdep.h. As keeping softfloat.o would be useful maybe we can conditionally disabled it?

---
 tests/tcg/multiarch/Makefile.target | 2 ++
 1 file changed, 2 insertions(+)
tests/tcg/multiarch/Makefile.target +2 -0
index 52adc18625..8bf6f3f8dc 100644
@@ -31,6 +31,7 @@ run-test-mmap: test-mmap
 #
 # Include the fp-test from the main test suite
 #
+ifneq (,$(findstring 64,$(TARGET_NAME)))
 
 VPATH+=$(SRC_PATH)/tests/fp
 VPATH+=$(SRC_PATH)/fpu
@@ -46,3 +47,4 @@ fp-test.o softfloat.o: %.o: %.c
 fp-test: fp-test.o softfloat.o
 	$(CC) $^ -o $@ -lm -static
 
+endif
Signature · 1 line
2.17.0
#78 lore raw

Re: [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!)

Quoted 1 line · Alex Bennée

+ifneq (,$(findstring 64,$(TARGET_NAME)))

You're only considering aarch64, x86_64, ppc64 and the like. This fails for alpha, s390x and the like.

r~

#79 lore raw

Re: [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!)

Quoted 5 lines · Richard Henderson
Quoted 1 line · Alex Bennée

+ifneq (,$(findstring 64,$(TARGET_NAME)))

You're only considering aarch64, x86_64, ppc64 and the like. This fails for alpha, s390x and the like.

Yes, it's a temporary hack that needs a better solution.

--
Alex Bennée

#80 lore raw

PATCH v2 43/43 tests: fp-test add fcvt support (!INCOMPLETE WIP)

In reply to Alex Bennée

This adds support for the various FOO-to-BAR conversions to fp-test. It also defines PREC_HALF although currently that is not used and will need compile time detection for _Float16 support.

I've added a small test file for testing against regressions.

---
 tests/fp/fp-test.c                    | 535 +++++++++++++++++++++++---
 tests/fp/qemu/regression-tests.fptest |   7 +
 2 files changed, 479 insertions(+), 63 deletions(-)
 create mode 100644 tests/fp/qemu/regression-tests.fptest
tests/fp/fp-test.c +472 -63
index 27db552160..320da2398a 100644
@@ -38,15 +38,167 @@ struct input {
 };
 
 enum precision {
+    PREC_HALF,
     PREC_FLOAT,
     PREC_DOUBLE,
     PREC_QUAD,
+    /* Integers */
+    PREC_INT16,
+    PREC_INT32,
+    PREC_INT64,
+    PREC_UINT16,
+    PREC_UINT32,
+    PREC_UINT64,
+    /* Float to Float conversions */
+    PREC_HALF_TO_FLOAT,
+    PREC_HALF_TO_DOUBLE,
+    PREC_FLOAT_TO_HALF,
     PREC_FLOAT_TO_DOUBLE,
+    PREC_DOUBLE_TO_HALF,
+    PREC_DOUBLE_TO_FLOAT,
+    /* Float to Int conversions */
+    PREC_HALF_TO_INT16,
+    PREC_HALF_TO_INT32,
+    PREC_HALF_TO_INT64,
+    PREC_FLOAT_TO_INT16,
+    PREC_FLOAT_TO_INT32,
+    PREC_FLOAT_TO_INT64,
+    PREC_DOUBLE_TO_INT16,
+    PREC_DOUBLE_TO_INT32,
+    PREC_DOUBLE_TO_INT64,
+    /* Float to unsigned int conversions */
+    PREC_HALF_TO_UINT16,
+    PREC_HALF_TO_UINT32,
+    PREC_HALF_TO_UINT64,
+    PREC_FLOAT_TO_UINT16,
+    PREC_FLOAT_TO_UINT32,
+    PREC_FLOAT_TO_UINT64,
+    PREC_DOUBLE_TO_UINT16,
+    PREC_DOUBLE_TO_UINT32,
+    PREC_DOUBLE_TO_UINT64,
+    /* Int to float conversions */
+    PREC_INT16_TO_HALF,
+    PREC_INT16_TO_FLOAT,
+    PREC_INT16_TO_DOUBLE,
+    PREC_INT32_TO_HALF,
+    PREC_INT32_TO_FLOAT,
+    PREC_INT32_TO_DOUBLE,
+    PREC_INT64_TO_HALF,
+    PREC_INT64_TO_FLOAT,
+    PREC_INT64_TO_DOUBLE,
+    /* Unsigned int to float conversions */
+    PREC_UINT16_TO_HALF,
+    PREC_UINT16_TO_FLOAT,
+    PREC_UINT16_TO_DOUBLE,
+    PREC_UINT32_TO_HALF,
+    PREC_UINT32_TO_FLOAT,
+    PREC_UINT32_TO_DOUBLE,
+    PREC_UINT64_TO_HALF,
+    PREC_UINT64_TO_FLOAT,
+    PREC_UINT64_TO_DOUBLE,
 };
 
+static enum precision get_input_prec(enum precision prec)
+{
+    /* Map conversions to input precision */
+    if (prec >= PREC_HALF_TO_FLOAT) {
+        switch (prec) {
+        case PREC_HALF_TO_FLOAT:
+        case PREC_HALF_TO_DOUBLE:
+        case PREC_HALF_TO_INT16:
+        case PREC_HALF_TO_INT32:
+        case PREC_HALF_TO_INT64:
+        case PREC_HALF_TO_UINT16:
+        case PREC_HALF_TO_UINT32:
+        case PREC_HALF_TO_UINT64:
+            return PREC_HALF;
+        case PREC_FLOAT_TO_HALF:
+        case PREC_FLOAT_TO_DOUBLE:
+        case PREC_FLOAT_TO_INT16:
+        case PREC_FLOAT_TO_INT32:
+        case PREC_FLOAT_TO_INT64:
+        case PREC_FLOAT_TO_UINT16:
+        case PREC_FLOAT_TO_UINT32:
+        case PREC_FLOAT_TO_UINT64:
+            return PREC_FLOAT;
+        case PREC_DOUBLE_TO_HALF:
+        case PREC_DOUBLE_TO_FLOAT:
+        case PREC_DOUBLE_TO_INT16:
+        case PREC_DOUBLE_TO_INT32:
+        case PREC_DOUBLE_TO_INT64:
+        case PREC_DOUBLE_TO_UINT16:
+        case PREC_DOUBLE_TO_UINT32:
+        case PREC_DOUBLE_TO_UINT64:
+            return PREC_DOUBLE;
+        default:
+            assert(false);
+        }
+    }
+
+    return prec;
+}
+
+static enum precision get_output_prec(enum precision prec)
+{
+    /* Map conversions to input precision */
+    if (prec >= PREC_HALF_TO_FLOAT) {
+        switch (prec) {
+        case PREC_FLOAT_TO_HALF:
+        case PREC_DOUBLE_TO_HALF:
+        case PREC_INT16_TO_HALF:
+        case PREC_INT32_TO_HALF:
+        case PREC_INT64_TO_HALF:
+        case PREC_UINT16_TO_HALF:
+        case PREC_UINT32_TO_HALF:
+        case PREC_UINT64_TO_HALF:
+            return PREC_HALF;
+        case PREC_HALF_TO_FLOAT:
+        case PREC_DOUBLE_TO_FLOAT:
+            return PREC_FLOAT;
+        case PREC_HALF_TO_DOUBLE:
+        case PREC_FLOAT_TO_DOUBLE:
+            return PREC_DOUBLE;
+        case PREC_HALF_TO_INT16:
+        case PREC_FLOAT_TO_INT16:
+        case PREC_DOUBLE_TO_INT16:
+            return PREC_INT16;
+        case PREC_HALF_TO_INT32:
+        case PREC_FLOAT_TO_INT32:
+        case PREC_DOUBLE_TO_INT32:
+            return PREC_INT32;
+        case PREC_HALF_TO_INT64:
+        case PREC_FLOAT_TO_INT64:
+        case PREC_DOUBLE_TO_INT64:
+            return PREC_INT64;
+        case PREC_HALF_TO_UINT16:
+        case PREC_FLOAT_TO_UINT16:
+        case PREC_DOUBLE_TO_UINT16:
+            return PREC_UINT16;
+        case PREC_HALF_TO_UINT32:
+        case PREC_FLOAT_TO_UINT32:
+        case PREC_DOUBLE_TO_UINT32:
+            return PREC_UINT32;
+        case PREC_HALF_TO_UINT64:
+        case PREC_FLOAT_TO_UINT64:
+        case PREC_DOUBLE_TO_UINT64:
+            return PREC_UINT64;
+        default:
+            assert(false);
+        }
+    }
+
+    return prec;
+}
+
+typedef struct {
+    char *opstr;
+    enum precision prec;
+} map_to_prec;
+
 struct op_desc {
     const char * const name;
     int n_operands;
+    map_to_prec *decode_tbl;
 };
 
 enum op {
@@ -62,9 +214,46 @@ enum op {
     OP_ABS,
     OP_IS_NAN,
     OP_IS_INF,
-    OP_FLOAT_TO_DOUBLE,
+    /* All above are conversions */
+    OP_FLOAT_TO_FLOAT,
+    OP_FLOAT_TO_INT,
+    OP_FLOAT_TO_UINT,
+    OP_INT_TO_FLOAT,
+    OP_UINT_TO_FLOAT
 };
 
+map_to_prec float_to_float[] = { {"b16b32", PREC_HALF_TO_FLOAT},
+                                 {"b16b64", PREC_HALF_TO_DOUBLE},
+                                 {"b32b16", PREC_FLOAT_TO_HALF},
+                                 {"b32b64", PREC_FLOAT_TO_DOUBLE},
+                                 {"b64b16", PREC_DOUBLE_TO_HALF},
+                                 {"b64b32", PREC_DOUBLE_TO_FLOAT},
+                                 { NULL, 0} };
+
+map_to_prec float_to_int[] = { {"b16b16", PREC_HALF_TO_INT16},
+                               {"b16b32", PREC_HALF_TO_INT16},
+                               {"b16b64", PREC_HALF_TO_INT16},
+                               {"b32b16", PREC_FLOAT_TO_INT16},
+                               {"b32b32", PREC_FLOAT_TO_INT32},
+                               {"b32b64", PREC_FLOAT_TO_INT64},
+                               {"b64b16", PREC_DOUBLE_TO_INT16},
+                               {"b64b32", PREC_DOUBLE_TO_INT32},
+                               {"b64b64", PREC_DOUBLE_TO_INT64},
+                               { NULL, 0} };
+
+static enum precision decode_map_table(map_to_prec *tbl, char *opstr)
+{
+    while (tbl->opstr) {
+        if (strncmp(tbl->opstr, opstr, strlen(tbl->opstr)) == 0) {
+            return tbl->prec;
+        }
+        tbl++;
+    }
+
+    /* lookup failed */
+    assert(false);
+}
+
 static const struct op_desc ops[] = {
     [OP_ADD] =       { "+", 2 },
     [OP_SUB] =       { "-", 2 },
@@ -78,7 +267,11 @@ static const struct op_desc ops[] = {
     [OP_ABS] =       { "A", 1 },
     [OP_IS_NAN] =    { "?N", 1 },
     [OP_IS_INF] =    { "?i", 1 },
-    [OP_FLOAT_TO_DOUBLE] = { "cff", 1 },
+    [OP_FLOAT_TO_FLOAT] = { "cff", 1, float_to_float },
+    [OP_FLOAT_TO_INT] = { "cfi", 1, float_to_int },
+    [OP_FLOAT_TO_UINT] = { "cfu", 1 },
+    [OP_INT_TO_FLOAT] = { "cif", 1 },
+    [OP_UINT_TO_FLOAT] = { "cuf", 1 },
 };
 
 /*
@@ -269,6 +462,159 @@ static enum error tester_check(const struct test_op *t, uint64_t res64,
     return err;
 }
 
+static float get_float(struct operand op)
+{
+    switch (op.type) {
+    case OP_TYPE_QNAN:
+        return __builtin_nanf("");
+    case OP_TYPE_SNAN:
+        return __builtin_nansf("");
+    default:
+        return u64_to_float(op.val);
+    }
+}
+
+static double get_double(struct operand op)
+{
+    switch (op.type) {
+    case OP_TYPE_QNAN:
+        return __builtin_nanf("");
+    case OP_TYPE_SNAN:
+        return __builtin_nansf("");
+    default:
+        return u64_to_double(op.val);
+    }
+}
+
+static enum error host_tester_cff(struct test_op *t)
+{
+    float in32, res32;
+    double in64, res64;
+    bool result_is_nan;
+    uint8_t flags = 0;
+
+    assert(t->op == OP_FLOAT_TO_FLOAT);
+
+    switch (t->prec) {
+    case PREC_HALF_TO_FLOAT:
+    case PREC_HALF_TO_DOUBLE:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_DOUBLE:
+    {
+        in32 = get_float(t->operands[0]);
+        t->expected_result.val = double_to_u64(get_double(t->expected_result));
+        res64 = (double) in32;
+        break;
+    }
+    case PREC_DOUBLE_TO_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_DOUBLE_TO_FLOAT:
+        in64 = get_double(t->operands[0]);
+        t->expected_result.val = float_to_u64(get_float(t->expected_result));
+        res32 = (float) in64;
+        break;
+    default:
+        return ERROR_NOT_HANDLED;
+    }
+
+    flags = host_get_exceptions();
+
+    switch (t->prec) {
+    case PREC_HALF_TO_DOUBLE:
+    case PREC_FLOAT_TO_DOUBLE:
+        result_is_nan = isnan(res64);
+        return tester_check(t, res64, result_is_nan, flags);
+    case PREC_HALF_TO_FLOAT:
+    case PREC_DOUBLE_TO_FLOAT:
+        result_is_nan = isnan(res32);
+        return tester_check(t, res32, result_is_nan, flags);
+    default:
+        assert(false);
+    }
+
+    return ERROR_NOT_HANDLED;
+}
+
+static enum error host_tester_cfi(struct test_op *t)
+{
+    uint8_t flags = 0;
+    float in32;
+    double in64;
+    uint64_t res;
+
+    assert(t->op == OP_FLOAT_TO_INT || t->op == OP_FLOAT_TO_UINT);
+
+    switch (get_input_prec(t->prec)) {
+    case PREC_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT:
+        in32 = get_float(t->operands[0]);
+        break;
+    case PREC_DOUBLE:
+        in64 = get_double(t->operands[0]);
+        break;
+    default:
+        assert(false);
+    }
+
+
+    switch (t->prec) {
+    case PREC_HALF_TO_INT16:
+    case PREC_HALF_TO_INT32:
+    case PREC_HALF_TO_INT64:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_INT16:
+    {
+        int16_t oi16 = (int16_t) in32;
+        res = (uint64_t) oi16;
+        break;
+    }
+    case PREC_FLOAT_TO_INT32:
+    {
+        int32_t oi32 = (int32_t) in32;
+        res = (uint64_t) oi32;
+        break;
+    }
+    case PREC_FLOAT_TO_INT64:
+    {
+        int64_t oi64 = (int64_t) in32;
+        res = (uint64_t) oi64;
+        break;
+    }
+    case PREC_DOUBLE_TO_INT16:
+    {
+        int16_t oi16 = (int16_t) in64;
+        res = (uint64_t) oi16;
+        break;
+    }
+    case PREC_DOUBLE_TO_INT32:
+    {
+        int32_t oi32 = (int32_t) in64;
+        res = (uint64_t) oi32;
+        break;
+    }
+    case PREC_DOUBLE_TO_INT64:
+    {
+        int64_t oi64 = (int64_t) in64;
+        res = (uint64_t) oi64;
+        break;
+    }
+    default:
+        assert(false);
+    }
+
+    flags = host_get_exceptions();
+
+    return tester_check(t, res, false, flags);
+}
+
+static enum error host_tester_cif(struct test_op *t)
+{
+    return ERROR_NOT_HANDLED;
+}
+
 static enum error host_tester(struct test_op *t)
 {
     uint64_t res64;
@@ -280,6 +626,20 @@ static enum error host_tester(struct test_op *t)
         host_set_exceptions(default_exceptions);
     }
 
+    /* Handle conversions first */
+    switch (t->op) {
+    case OP_FLOAT_TO_FLOAT:
+        return host_tester_cff(t);
+    case OP_FLOAT_TO_INT:
+    case OP_FLOAT_TO_UINT:
+        return host_tester_cfi(t);
+    case OP_INT_TO_FLOAT:
+    case OP_UINT_TO_FLOAT:
+        return host_tester_cif(t);
+    default:
+        break;
+    }
+
     if (t->prec == PREC_FLOAT) {
         float a, b, c;
         float *in[] = { &a, &b, &c };
@@ -396,40 +756,68 @@ static enum error host_tester(struct test_op *t)
         flags = host_get_exceptions();
         res64 = double_to_u64(res);
         result_is_nan = isnan(res);
-    } else if (t->prec == PREC_FLOAT_TO_DOUBLE) {
-        float a;
-        double res;
-
-        if (t->operands[0].type == OP_TYPE_QNAN) {
-            a = __builtin_nanf("");
-        } else if (t->operands[0].type == OP_TYPE_SNAN) {
-            a = __builtin_nansf("");
-        } else {
-            a = u64_to_float(t->operands[0].val);
-        }
-
-        if (t->expected_result.type == OP_TYPE_QNAN) {
-            t->expected_result.val = double_to_u64(__builtin_nan(""));
-        } else if (t->expected_result.type == OP_TYPE_SNAN) {
-            t->expected_result.val = double_to_u64(__builtin_nans(""));
-        }
-
-        switch (t->op) {
-        case OP_FLOAT_TO_DOUBLE:
-            res = a;
-            break;
-        default:
-            return ERROR_NOT_HANDLED;
-        }
-        flags = host_get_exceptions();
-        res64 = double_to_u64(res);
-        result_is_nan = isnan(res);
     } else {
         return ERROR_NOT_HANDLED; /* XXX */
     }
     return tester_check(t, res64, result_is_nan, flags);
 }
 
+static enum error soft_tester_cff(struct test_op *t, float_status *s)
+{
+    float in32, res32;
+    double in64, res64;
+    bool result_is_nan;
+
+    assert(t->op == OP_FLOAT_TO_FLOAT);
+
+    switch (t->prec) {
+    case PREC_HALF_TO_FLOAT:
+    case PREC_HALF_TO_DOUBLE:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_DOUBLE:
+    {
+        in32 = get_float(t->operands[0]);
+        t->expected_result.val = double_to_u64(get_double(t->expected_result));
+        res64 = float32_to_float64(in32, s);
+        break;
+    }
+    case PREC_DOUBLE_TO_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_DOUBLE_TO_FLOAT:
+        in64 = get_double(t->operands[0]);
+        t->expected_result.val = float_to_u64(get_float(t->expected_result));
+        res32 = float64_to_float32(in64, s);
+        break;
+    default:
+        return ERROR_NOT_HANDLED;
+    }
+
+    switch (t->prec) {
+    case PREC_HALF_TO_DOUBLE:
+    case PREC_FLOAT_TO_DOUBLE:
+        result_is_nan = isnan(res64);
+        return tester_check(t, res64, result_is_nan, s->float_exception_flags);
+    case PREC_HALF_TO_FLOAT:
+    case PREC_DOUBLE_TO_FLOAT:
+        result_is_nan = isnan(res32);
+        return tester_check(t, res32, result_is_nan, s->float_exception_flags);
+    default:
+        assert(false);
+    }
+}
+
+static enum error soft_tester_cfi(struct test_op *t, float_status *s)
+{
+    return ERROR_NOT_HANDLED;
+}
+
+static enum error soft_tester_cif(struct test_op *t, float_status *s)
+{
+    return ERROR_NOT_HANDLED;
+}
+
 static enum error soft_tester(struct test_op *t)
 {
     float_status *s = &soft_status;
@@ -440,6 +828,20 @@ static enum error soft_tester(struct test_op *t)
     s->float_rounding_mode = t->round;
     s->float_exception_flags = default_exceptions;
 
+    /* Handle conversions first */
+    switch (t->op) {
+    case OP_FLOAT_TO_FLOAT:
+        return soft_tester_cff(t, s);
+    case OP_FLOAT_TO_INT:
+    case OP_FLOAT_TO_UINT:
+        return soft_tester_cfi(t, s);
+    case OP_INT_TO_FLOAT:
+    case OP_UINT_TO_FLOAT:
+        return soft_tester_cif(t, s);
+    default:
+        break;
+    }
+
     if (t->prec == PREC_FLOAT) {
         float32 a, b, c;
         float32 *in[] = { &a, &b, &c };
@@ -558,17 +960,6 @@ static enum error soft_tester(struct test_op *t)
             return ERROR_NOT_HANDLED;
         }
         result_is_nan = isnan(*(double *)&res64);
-    } else if (t->prec == PREC_FLOAT_TO_DOUBLE) {
-        float32 a = t->operands[0].val;
-
-        switch (t->op) {
-        case OP_FLOAT_TO_DOUBLE:
-            res64 = float32_to_float64(a, s);
-            break;
-        default:
-            return ERROR_NOT_HANDLED;
-        }
-        result_is_nan = isnan(*(double *)&res64);
     } else {
         return ERROR_NOT_HANDLED; /* XXX */
     }
@@ -752,23 +1143,41 @@ ibm_fp_hex(const char *p, enum precision prec, struct operand *ret)
             return 0;
         }
         return 0;
-    } else if (!strcmp(p, "0x0")) {
-        if (prec == PREC_FLOAT) {
-            ret->val = float_to_u64(0.0);
-        } else if (prec == PREC_DOUBLE) {
-            ret->val = double_to_u64(0.0);
-        } else {
-            assert(false);
+    } else if (strncmp("0x", p, 2) == 0) {
+        unsigned long long result;
+        char *end;
+
+        result = strtoull(p, &end, 16);
+        if (result == 0 && end == p) {
+            /* not a number */
+            return 1;
+        } else if (result == ULLONG_MAX && errno) {
+            /* value does not fit in unsigned long long */
+            return 1;
+        } else if (*end) {
+            /* began with a number but has junk left over at the end */
+            return 1;
         }
-        return 0;
-    } else if (!strcmp(p, "0x1")) {
-        if (prec == PREC_FLOAT) {
-            ret->val = float_to_u64(1.0);
-        } else if (prec == PREC_DOUBLE) {
-            ret->val = double_to_u64(1.0);
-        } else {
+
+        switch (prec) {
+        case PREC_FLOAT:
+            ret->val = float_to_u64(result);
+            break;
+        case PREC_DOUBLE:
+            ret->val = double_to_u64(result);
+            break;
+        case PREC_INT16:
+        case PREC_INT32:
+        case PREC_INT64:
+        case PREC_UINT16:
+        case PREC_UINT32:
+        case PREC_UINT64:
+            ret->val = result;
+            break;
+        default:
             assert(false);
         }
+
         return 0;
     }
     return 1;
@@ -814,11 +1223,14 @@ static enum error ibm_test_line(const char *line)
     if (unlikely(strlen(p) < 4)) {
         return ERROR_INPUT;
     }
-    if (strcmp("b32b64cff", p) == 0) {
-        t.prec = PREC_FLOAT_TO_DOUBLE;
+    /* Conversions are of the form bXXbYYcZZ */
+    if (p[0] == 'b' && p[3] == 'b' && p[6] == 'c') {
         if (find_op(&p[6], &t.op)) {
+            fprintf(stderr, "%s: unhandled conversion %s\n", __func__, p);
             return ERROR_NOT_HANDLED;
         }
+        assert(ops[t.op].decode_tbl);
+        t.prec = decode_map_table(ops[t.op].decode_tbl, p);
     } else {
         if (strncmp("b32", p, 3) == 0) {
             t.prec = PREC_FLOAT;
@@ -855,9 +1267,7 @@ static enum error ibm_test_line(const char *line)
     }
 
     for (i = 0; i < ops[t.op].n_operands; i++) {
-        enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ?
-            PREC_FLOAT : t.prec;
-
+        enum precision prec = get_input_prec(t.prec);
         p = s[field++];
         if (ibm_fp_hex(p, prec, &t.operands[i])) {
             return ERROR_INPUT;
@@ -873,8 +1283,7 @@ static enum error ibm_test_line(const char *line)
     if (unlikely(strcmp("#", p) == 0)) {
         t.expected_result_is_valid = false;
     } else {
-        enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ?
-            PREC_DOUBLE : t.prec;
+        enum precision prec = get_output_prec(t.prec);
 
         if (ibm_fp_hex(p, prec, &t.expected_result)) {
             return ERROR_INPUT;
@@ -943,7 +1352,7 @@ static void test_file(const char *filename)
         enum error err;
 
         i++;
-        if (unlikely(line_is_whitelisted(line))) {
+        if (whitelist.n > 0 && unlikely(line_is_whitelisted(line))) {
             test_stats[ERROR_WHITELISTED]++;
             continue;
         }
tests/fp/qemu/regression-tests.fptest new file +7 -0
new file mode 100644
index 0000000000..a105d3aa44
@@ -0,0 +1,7 @@
+QEMU Floating point regression tests
+------------------------------------
+
+b32b32cfi =0 -Inf -> 0xffffffff80000000 i
+b32b32cfi =0 +Inf -> 0xffffffff80000000 i
+b32b64cfi =0 -Inf -> 0x8000000000000000 i
+b32b64cfi =0 +Inf -> 0x8000000000000000 i
Signature · 1 line
2.17.0
#81 lore raw
In reply to Alex Bennée
This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

Hi,

This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg

=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=8
time make docker-test-mingw@fedora
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
2cf210de25 tests: fp-test add fcvt support (!INCOMPLETE WIP) c59ace380c tests/tcg: disable fp-test for 32 bit (HACK!) 3f6d6b37b3 tests/tcg/multiarch: add fp-test into multiarch set a3942903d8 tests: add fp-test, a floating point test suite 93637ad78f softfloat: do not include glib headers
6cee90fce9 osdep: disable glib-compat.h include with QEMU_NO_GLIB 3f76b148e3 tests/Makefile.include: add (clean-)check-tcg targets 2b09de310b Makefile.target: add (clean-)guest-tests targets 64f32a347c tests/tcg/Makefile: update to be called from Makefile.target b6dd1c4257 tests/tcg: enable building for ppc64
ed516c56c9 tests/tcg: enable building for s390x
af045c00c8 tests/tcg/mips: include common mips hello-mips 9c8573e3ad tests/tcg: enable building for MIPS
801dbba4ae tests/tcg: move MIPS specific tests into subdir 842030aa82 tests/tcg/aarch64: userspace system register test a64644b63b tests/tcg/aarch64: add fcvt test cases for AArch64 1c9bd71293 tests/tcg/aarch64: add Makefile.target
c52e2f1c49 tests/tcg/arm: fix up test-arm-iwmmxt test d14bdceb14 tests/tcg: move ARM specific tests into subdir a929743e6c tests/tcg/i386/test-i386: fix printf format 1ab161b2e5 tests/tcg/i386/test-i386: use modern vector_size attributes 4a0590ba5e tests/tcg/x86_64: add Makefile.target
7732ca011f tests/tcg/i386: disable i386 version of test-i386-ssse f95c12d39d tests/tcg/i386: fix test-i386-fprem
40782bcd69 tests/tcg/i386: fix test-i386
ea0cc36d3a tests/tcg/i386: Build fix for hello-i386 f86342742d tests/tcg: enable building for i386
c5ddd1785c docker: Add fedora-i386-cross image
58d31ffc85 tests/tcg: move i386 specific tests into subdir 0f322b2f8a tests/tcg/multiarch: enable additional linux-test tests d2b649419a tests/tcg/multiarch: Build fix for linux-test 7c270a5818 tests/tcg: move architecture independent tests into subdir fe04f2a58e docker: Makefile.include introduce DOCKER_SCRIPT 387090cde5 docker: allow "cc" command to run in user context cc7e3225c2 docker: extend "cc" command to accept compiler b2098ca1ca docker: Add "cc" subcommand
307a60adf2 Makefile: Rename TARGET_DIRS to TARGET_LIST d6157c5262 configure: set cross_cc_FOO for host compiler 2afce5fc4d configure: allow user to specify --cross-cc-cflags-foo= efd2616b8e configure: move i386_cc to cross_cc_i386 887941a91c configure: add support for --cross-cc-FOO 947d99fae7 configure: add test for docker availability 7e41971dca docker: add "probe" command for configure

=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-qv4p4631/src/dtc'...
Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42'
BUILD fedora
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-qv4p4631/src'
GEN /var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953/qemu.tar
Cloning into '/var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953/qemu.tar.vroot'... done.

Checking out files:  50% (3088/6088)   
Checking out files:  51% (3105/6088)   
Checking out files:  52% (3166/6088)   
Checking out files:  53% (3227/6088)   
Checking out files:  54% (3288/6088)   
Checking out files:  55% (3349/6088)   
Checking out files:  56% (3410/6088)   
Checking out files:  57% (3471/6088)   
Checking out files:  58% (3532/6088)   
Checking out files:  59% (3592/6088)   
Checking out files:  60% (3653/6088)   
Checking out files:  61% (3714/6088)   
Checking out files:  62% (3775/6088)   
Checking out files:  63% (3836/6088)   
Checking out files:  64% (3897/6088)   
Checking out files:  65% (3958/6088)   
Checking out files:  66% (4019/6088)   
Checking out files:  67% (4079/6088)   
Checking out files:  68% (4140/6088)   
Checking out files:  69% (4201/6088)   
Checking out files:  70% (4262/6088)   
Checking out files:  71% (4323/6088)   
Checking out files:  72% (4384/6088)   
Checking out files:  73% (4445/6088)   
Checking out files:  74% (4506/6088)   
Checking out files:  75% (4566/6088)   
Checking out files:  76% (4627/6088)   
Checking out files:  77% (4688/6088)   
Checking out files:  78% (4749/6088)   
Checking out files:  79% (4810/6088)   
Checking out files:  80% (4871/6088)   
Checking out files:  81% (4932/6088)   
Checking out files:  82% (4993/6088)   
Checking out files:  83% (5054/6088)   
Checking out files:  84% (5114/6088)   
Checking out files:  85% (5175/6088)   
Checking out files:  86% (5236/6088)   
Checking out files:  87% (5297/6088)   
Checking out files:  88% (5358/6088)   
Checking out files:  89% (5419/6088)   
Checking out files:  90% (5480/6088)   
Checking out files:  91% (5541/6088)   
Checking out files:  92% (5601/6088)   
Checking out files:  93% (5662/6088)   
Checking out files:  94% (5723/6088)   
Checking out files:  95% (5784/6088)   
Checking out files:  96% (5845/6088)   
Checking out files:  97% (5906/6088)   
Checking out files:  98% (5967/6088)   
Checking out files:  99% (6028/6088)   
Checking out files: 100% (6088/6088)   
Checking out files: 100% (6088/6088), done.

Your branch is up-to-date with 'origin/test'.
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953/qemu.tar.vroot/dtc'... Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42'
Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered for path 'ui/keycodemapdb' Cloning into '/var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953/qemu.tar.vroot/ui/keycodemapdb'... Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce'
COPY RUNNER
RUN test-mingw in qemu:fedora
Packages installed:
PyYAML-3.12-5.fc27.x86_64
SDL2-devel-2.0.7-2.fc27.x86_64
bc-1.07.1-3.fc27.x86_64
bison-3.0.4-8.fc27.x86_64
bluez-libs-devel-5.48-3.fc27.x86_64
brlapi-devel-0.6.6-8.fc27.x86_64
bzip2-1.0.6-24.fc27.x86_64
bzip2-devel-1.0.6-24.fc27.x86_64
ccache-3.3.6-1.fc27.x86_64
clang-5.0.1-5.fc27.x86_64
device-mapper-multipath-devel-0.7.1-9.git847cc43.fc27.x86_64
findutils-4.6.0-16.fc27.x86_64
flex-2.6.1-5.fc27.x86_64
gcc-7.3.1-5.fc27.x86_64
gcc-c++-7.3.1-5.fc27.x86_64
gettext-0.19.8.1-12.fc27.x86_64
git-2.14.3-3.fc27.x86_64
glib2-devel-2.54.3-2.fc27.x86_64
glusterfs-api-devel-3.12.7-1.fc27.x86_64
gnutls-devel-3.5.18-2.fc27.x86_64
gtk3-devel-3.22.26-2.fc27.x86_64
hostname-3.18-4.fc27.x86_64
libaio-devel-0.3.110-9.fc27.x86_64
libasan-7.3.1-5.fc27.x86_64
libattr-devel-2.4.47-21.fc27.x86_64
libcap-devel-2.25-7.fc27.x86_64
libcap-ng-devel-0.7.8-5.fc27.x86_64
libcurl-devel-7.55.1-10.fc27.x86_64
libfdt-devel-1.4.6-1.fc27.x86_64
libpng-devel-1.6.31-1.fc27.x86_64
librbd-devel-12.2.4-1.fc27.x86_64
libssh2-devel-1.8.0-5.fc27.x86_64
libubsan-7.3.1-5.fc27.x86_64
libusbx-devel-1.0.21-4.fc27.x86_64
libxml2-devel-2.9.7-1.fc27.x86_64
llvm-5.0.1-6.fc27.x86_64
lzo-devel-2.08-11.fc27.x86_64
make-4.2.1-4.fc27.x86_64
mingw32-SDL-1.2.15-9.fc27.noarch
mingw32-bzip2-1.0.6-9.fc27.noarch
mingw32-curl-7.54.1-2.fc27.noarch
mingw32-glib2-2.54.1-1.fc27.noarch
mingw32-gmp-6.1.2-2.fc27.noarch
mingw32-gnutls-3.5.13-2.fc27.noarch
mingw32-gtk2-2.24.31-4.fc27.noarch
mingw32-gtk3-3.22.16-1.fc27.noarch
mingw32-libjpeg-turbo-1.5.1-3.fc27.noarch
mingw32-libpng-1.6.29-2.fc27.noarch
mingw32-libssh2-1.8.0-3.fc27.noarch
mingw32-libtasn1-4.13-1.fc27.noarch
mingw32-nettle-3.3-3.fc27.noarch
mingw32-pixman-0.34.0-3.fc27.noarch
mingw32-pkg-config-0.28-9.fc27.x86_64
mingw64-SDL-1.2.15-9.fc27.noarch
mingw64-bzip2-1.0.6-9.fc27.noarch
mingw64-curl-7.54.1-2.fc27.noarch
mingw64-glib2-2.54.1-1.fc27.noarch
mingw64-gmp-6.1.2-2.fc27.noarch
mingw64-gnutls-3.5.13-2.fc27.noarch
mingw64-gtk2-2.24.31-4.fc27.noarch
mingw64-gtk3-3.22.16-1.fc27.noarch
mingw64-libjpeg-turbo-1.5.1-3.fc27.noarch
mingw64-libpng-1.6.29-2.fc27.noarch
mingw64-libssh2-1.8.0-3.fc27.noarch
mingw64-libtasn1-4.13-1.fc27.noarch
mingw64-nettle-3.3-3.fc27.noarch
mingw64-pixman-0.34.0-3.fc27.noarch
mingw64-pkg-config-0.28-9.fc27.x86_64
ncurses-devel-6.0-13.20170722.fc27.x86_64
nettle-devel-3.4-1.fc27.x86_64
nss-devel-3.36.0-1.0.fc27.x86_64
numactl-devel-2.0.11-5.fc27.x86_64
package libjpeg-devel is not installed
perl-5.26.1-403.fc27.x86_64
pixman-devel-0.34.0-4.fc27.x86_64
python3-3.6.2-13.fc27.x86_64
snappy-devel-1.1.4-5.fc27.x86_64
sparse-0.5.1-2.fc27.x86_64
spice-server-devel-0.14.0-1.fc27.x86_64
systemtap-sdt-devel-3.2-3.fc27.x86_64
tar-1.29-7.fc27.x86_64
usbredir-devel-0.7.1-5.fc27.x86_64
virglrenderer-devel-0.6.0-3.20170210git76b3da97b.fc27.x86_64
vte3-devel-0.36.5-5.fc27.x86_64
which-2.21-4.fc27.x86_64
xen-devel-4.9.1-5.fc27.x86_64
zlib-devel-1.2.11-4.fc27.x86_64

Environment variables:
TARGET_LIST=
PACKAGES=ccache gettext git tar PyYAML sparse flex bison python3 bzip2 hostname gcc gcc-c++ llvm clang make perl which bc findutils glib2-devel libaio-devel pixman-devel zlib-devel libfdt-devel libasan libubsan bluez-libs-devel brlapi-devel bzip2-devel device-mapper-multipath-devel glusterfs-api-devel gnutls-devel gtk3-devel libattr-devel libcap-devel libcap-ng-devel libcurl-devel libjpeg-devel libpng-devel librbd-devel libssh2-devel libusbx-devel libxml2-devel lzo-devel ncurses-devel nettle-devel nss-devel numactl-devel SDL2-devel snappy-devel spice-server-devel systemtap-sdt-devel usbredir-devel virglrenderer-devel vte3-devel xen-devel mingw32-pixman mingw32-glib2 mingw32-gmp mingw32-SDL mingw32-pkg-config mingw32-gtk2 mingw32-gtk3 mingw32-gnutls mingw32-nettle mingw32-libtasn1 mingw32-libjpeg-turbo mingw32-libpng mingw32-curl mingw32-libssh2 mingw32-bzip2 mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 mingw64-bzip2
J=8
V=
HOSTNAME=1d2e9274b3bc
DEBUG=
SHOW_ENV=1
PWD=/
HOME=/root
CCACHE_DIR=/var/tmp/ccache
DISTTAG=f27container
QEMU_CONFIGURE_OPTS=--python=/usr/bin/python3
FGC=f27
TEST_DIR=/tmp/qemu-test
SHLVL=1
FEATURES=mingw clang pyyaml asan dtc PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAKEFLAGS= -j8
EXTRA_CONFIGURE_OPTS=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --with-sdlabi=1.2 --with-gtkabi=2.0

Install prefix    /tmp/qemu-test/install
BIOS directory    /tmp/qemu-test/install
firmware path     /tmp/qemu-test/install/share/qemu-firmware
binary directory  /tmp/qemu-test/install

library directory /tmp/qemu-test/install/lib
module directory /tmp/qemu-test/install/lib
libexec directory /tmp/qemu-test/install/libexec
include directory /tmp/qemu-test/install/include
config directory /tmp/qemu-test/install
local state directory queried at runtime

Windows SDK       no
Source path       /tmp/qemu-test/src
GIT binary        git
GIT submodules    
C compiler        x86_64-w64-mingw32-gcc
Host C compiler   cc
C++ compiler      x86_64-w64-mingw32-g++
Objective-C compiler clang
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/pixman-1  -I$(SRC_PATH)/dtc/libfdt -Werror -DHAS_LIBSSH2_SFTP_FSYNC -mms-bitfields -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/glib-2.0 -I/usr/x86_64-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include  -m64 -mcx16 -mthreads -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN -DWINVER=0x501 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include  -I/usr/x86_64-w64-mingw32/sys-root/mingw/include   -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 
LDFLAGS           -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--warn-common -m64 -g 
make              make
install           install
python            /usr/bin/python3 -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no
target list       x86_64-softmmu aarch64-softmmu
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
SDL support       yes (1.2.15)
GTK support       yes (2.24.31)
GTK GL support    no
VTE support       no 
TLS priority      NORMAL
GNUTLS support    yes
GNUTLS rnd        yes
libgcrypt         no
libgcrypt kdf     no
nettle            yes (3.3)
nettle kdf        yes
libtasn1          yes
curses support    no
virgl support     no
curl support      yes
mingw32 support   yes
Audio drivers     dsound

Block whitelist (rw)
Block whitelist (ro)
VirtFS support no
Multipath support no

VNC support       yes
VNC SASL support  no
VNC JPEG support  yes
VNC PNG support   yes
xen support       no
brlapi support    no
bluez  support    no
Documentation     no
PIE               no
vde support       no
netmap support    no
Linux AIO support no
ATTR/XATTR support no
Install blobs     yes
KVM support       no
HAX support       yes
HVF support       no
WHPX support      no
TCG support       yes
TCG debug enabled no
TCG interpreter   no
malloc trim support no
RDMA support      no
fdt support       yes
membarrier        no
preadv support    no
fdatasync         no
madvise           no
posix_madvise     no
posix_memalign    no

libcap-ng support no
vhost-net support no
vhost-crypto support no
vhost-scsi support no
vhost-vsock support no
vhost-user support no
Trace backends simple
Trace output file trace-<pid>

spice support     no 
rbd support       no
xfsctl support    no
smartcard support no
libusb            no
usb net redir     no
OpenGL support    no
OpenGL dmabufs    no
libiscsi support  no
libnfs support    no

build guest agent yes
QGA VSS support no
QGA w32 disk info yes
QGA MSI support no
seccomp support no
coroutine backend win32
coroutine pool yes
debug stack usage no
crypto afalg no
GlusterFS support no

gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   no
TPM emulator      no
QOM debugging     yes
Live block migration yes
lzo support       no
snappy support    no
bzip2 support     yes
NUMA host support no
libxml2           no
tcmalloc support  no
jemalloc support  no

avx2 optimization yes
replication support yes
VxHS block device no
capstone no
docker no

WARNING: Use of GTK 2.0 is deprecated and will be removed in
WARNING: future releases. Please switch to using GTK 3.0

WARNING: Use of SDL 1.2 is deprecated and will be removed in
WARNING: future releases. Please switch to using SDL 2.0
GEN x86_64-softmmu/config-devices.mak.tmp
mkdir -p dtc/libfdt
GEN aarch64-softmmu/config-devices.mak.tmp
GEN config-host.h
mkdir -p dtc/tests

  GEN     qemu-options.def
  GEN     qapi-gen
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     aarch64-softmmu/config-devices.mak
  GEN     trace/generated-helpers.c
  GEN     x86_64-softmmu/config-devices.mak
  GEN     module_block.h
  GEN     ui/input-keymap-atset1-to-qcode.c
  GEN     ui/input-keymap-linux-to-qcode.c
  GEN     ui/input-keymap-qcode-to-atset1.c
  GEN     ui/input-keymap-qcode-to-atset2.c
  GEN     ui/input-keymap-qcode-to-atset3.c
  GEN     ui/input-keymap-qcode-to-linux.c
  GEN     ui/input-keymap-qcode-to-qnum.c
  GEN     ui/input-keymap-qcode-to-sun.c
  GEN     ui/input-keymap-usb-to-qcode.c
  GEN     ui/input-keymap-qnum-to-qcode.c
  GEN     ui/input-keymap-x11-to-qcode.c
  GEN     ui/input-keymap-win32-to-qcode.c
  GEN     ui/input-keymap-xorgevdev-to-qcode.c
  GEN     ui/input-keymap-xorgkbd-to-qcode.c
  GEN     ui/input-keymap-xorgxquartz-to-qcode.c
  GEN     ui/input-keymap-xorgxwin-to-qcode.c
  GEN     tests/test-qapi-gen
  GEN     trace-root.h
  GEN     util/trace.h
  GEN     crypto/trace.h
  GEN     io/trace.h
  GEN     migration/trace.h
  GEN     block/trace.h
  GEN     chardev/trace.h
  GEN     hw/block/trace.h
  GEN     hw/block/dataplane/trace.h
  GEN     hw/char/trace.h
  GEN     hw/intc/trace.h
  GEN     hw/net/trace.h
  GEN     hw/rdma/trace.h
  GEN     hw/rdma/vmw/trace.h
  GEN     hw/virtio/trace.h
  GEN     hw/audio/trace.h
  GEN     hw/misc/trace.h
  GEN     hw/misc/macio/trace.h
  GEN     hw/usb/trace.h
  GEN     hw/scsi/trace.h
  GEN     hw/nvram/trace.h
  GEN     hw/display/trace.h
  GEN     hw/input/trace.h
  GEN     hw/timer/trace.h
  GEN     hw/dma/trace.h
  GEN     hw/sparc/trace.h
  GEN     hw/sparc64/trace.h
  GEN     hw/sd/trace.h
  GEN     hw/isa/trace.h
  GEN     hw/mem/trace.h
  GEN     hw/i386/trace.h
  GEN     hw/i386/xen/trace.h
  GEN     hw/9pfs/trace.h
  GEN     hw/ppc/trace.h
  GEN     hw/pci/trace.h
  GEN     hw/pci-host/trace.h
  GEN     hw/s390x/trace.h
  GEN     hw/vfio/trace.h
  GEN     hw/acpi/trace.h
  GEN     hw/arm/trace.h
  GEN     hw/alpha/trace.h
  GEN     hw/hppa/trace.h
  GEN     hw/xen/trace.h
  GEN     hw/ide/trace.h
  GEN     hw/tpm/trace.h
  GEN     ui/trace.h
  GEN     audio/trace.h
  GEN     net/trace.h
  GEN     target/arm/trace.h
  GEN     target/i386/trace.h
  GEN     target/mips/trace.h
  GEN     target/sparc/trace.h
  GEN     target/s390x/trace.h
  GEN     target/ppc/trace.h
  GEN     qom/trace.h
  GEN     linux-user/trace.h
  GEN     qapi/trace.h
  GEN     accel/tcg/trace.h
  GEN     accel/kvm/trace.h
  GEN     nbd/trace.h
  GEN     scsi/trace.h
  GEN     trace-root.c
  GEN     util/trace.c
  GEN     crypto/trace.c
  GEN     io/trace.c
  GEN     migration/trace.c
  GEN     block/trace.c
  GEN     chardev/trace.c
  GEN     hw/block/trace.c
  GEN     hw/block/dataplane/trace.c
  GEN     hw/char/trace.c
  GEN     hw/intc/trace.c
  GEN     hw/net/trace.c
  GEN     hw/rdma/trace.c
  GEN     hw/rdma/vmw/trace.c
  GEN     hw/virtio/trace.c
  GEN     hw/audio/trace.c
  GEN     hw/misc/trace.c
  GEN     hw/misc/macio/trace.c
  GEN     hw/usb/trace.c
  GEN     hw/scsi/trace.c
  GEN     hw/nvram/trace.c
  GEN     hw/display/trace.c
  GEN     hw/input/trace.c
  GEN     hw/timer/trace.c
  GEN     hw/dma/trace.c
  GEN     hw/sparc/trace.c
  GEN     hw/sparc64/trace.c
  GEN     hw/sd/trace.c
  GEN     hw/isa/trace.c
  GEN     hw/mem/trace.c
  GEN     hw/i386/trace.c
  GEN     hw/i386/xen/trace.c
  GEN     hw/9pfs/trace.c
  GEN     hw/ppc/trace.c
  GEN     hw/pci/trace.c
  GEN     hw/pci-host/trace.c
  GEN     hw/s390x/trace.c
  GEN     hw/vfio/trace.c
  GEN     hw/acpi/trace.c
  GEN     hw/arm/trace.c
  GEN     hw/alpha/trace.c
  GEN     hw/hppa/trace.c
  GEN     hw/xen/trace.c
  GEN     hw/ide/trace.c
  GEN     hw/tpm/trace.c
  GEN     ui/trace.c
  GEN     audio/trace.c
  GEN     net/trace.c
  GEN     target/arm/trace.c
  GEN     target/i386/trace.c
  GEN     target/mips/trace.c
  GEN     target/sparc/trace.c
  GEN     target/s390x/trace.c
  GEN     target/ppc/trace.c
  GEN     qom/trace.c
  GEN     linux-user/trace.c
  GEN     qapi/trace.c
  GEN     accel/tcg/trace.c
  GEN     accel/kvm/trace.c
  GEN     nbd/trace.c
  GEN     scsi/trace.c
  GEN     config-all-devices.mak

DEP /tmp/qemu-test/src/dtc/tests/dumptrees.c
DEP /tmp/qemu-test/src/dtc/tests/trees.S
DEP /tmp/qemu-test/src/dtc/tests/value-labels.c DEP /tmp/qemu-test/src/dtc/tests/testutils.c
DEP /tmp/qemu-test/src/dtc/tests/asm_tree_dump.c DEP /tmp/qemu-test/src/dtc/tests/truncated_property.c DEP /tmp/qemu-test/src/dtc/tests/check_path.c
DEP /tmp/qemu-test/src/dtc/tests/overlay_bad_fixup.c DEP /tmp/qemu-test/src/dtc/tests/overlay.c
DEP /tmp/qemu-test/src/dtc/tests/property_iterate.c DEP /tmp/qemu-test/src/dtc/tests/subnode_iterate.c DEP /tmp/qemu-test/src/dtc/tests/integer-expressions.c DEP /tmp/qemu-test/src/dtc/tests/utilfdt_test.c DEP /tmp/qemu-test/src/dtc/tests/path_offset_aliases.c DEP /tmp/qemu-test/src/dtc/tests/add_subnode_with_nops.c DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_unordered.c DEP /tmp/qemu-test/src/dtc/tests/dtb_reverse.c DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_ordered.c DEP /tmp/qemu-test/src/dtc/tests/extra-terminating-null.c DEP /tmp/qemu-test/src/dtc/tests/incbin.c
DEP /tmp/qemu-test/src/dtc/tests/boot-cpuid.c
DEP /tmp/qemu-test/src/dtc/tests/phandle_format.c DEP /tmp/qemu-test/src/dtc/tests/path-references.c DEP /tmp/qemu-test/src/dtc/tests/references.c
DEP /tmp/qemu-test/src/dtc/tests/string_escapes.c DEP /tmp/qemu-test/src/dtc/tests/propname_escapes.c DEP /tmp/qemu-test/src/dtc/tests/appendprop2.c DEP /tmp/qemu-test/src/dtc/tests/appendprop1.c DEP /tmp/qemu-test/src/dtc/tests/del_node.c
DEP /tmp/qemu-test/src/dtc/tests/del_property.c DEP /tmp/qemu-test/src/dtc/tests/setprop.c
DEP /tmp/qemu-test/src/dtc/tests/set_name.c
DEP /tmp/qemu-test/src/dtc/tests/rw_tree1.c
DEP /tmp/qemu-test/src/dtc/tests/open_pack.c
DEP /tmp/qemu-test/src/dtc/tests/nopulate.c
DEP /tmp/qemu-test/src/dtc/tests/mangle-layout.c DEP /tmp/qemu-test/src/dtc/tests/move_and_save.c DEP /tmp/qemu-test/src/dtc/tests/sw_tree1.c
DEP /tmp/qemu-test/src/dtc/tests/nop_node.c
DEP /tmp/qemu-test/src/dtc/tests/nop_property.c DEP /tmp/qemu-test/src/dtc/tests/setprop_inplace.c DEP /tmp/qemu-test/src/dtc/tests/stringlist.c
DEP /tmp/qemu-test/src/dtc/tests/addr_size_cells.c DEP /tmp/qemu-test/src/dtc/tests/notfound.c
DEP /tmp/qemu-test/src/dtc/tests/sized_cells.c DEP /tmp/qemu-test/src/dtc/tests/char_literal.c DEP /tmp/qemu-test/src/dtc/tests/get_alias.c
DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_compatible.c DEP /tmp/qemu-test/src/dtc/tests/node_check_compatible.c DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_phandle.c DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_prop_value.c DEP /tmp/qemu-test/src/dtc/tests/parent_offset.c DEP /tmp/qemu-test/src/dtc/tests/get_path.c
DEP /tmp/qemu-test/src/dtc/tests/get_phandle.c DEP /tmp/qemu-test/src/dtc/tests/supernode_atdepth_offset.c DEP /tmp/qemu-test/src/dtc/tests/getprop.c
DEP /tmp/qemu-test/src/dtc/tests/get_name.c
DEP /tmp/qemu-test/src/dtc/tests/path_offset.c DEP /tmp/qemu-test/src/dtc/tests/subnode_offset.c DEP /tmp/qemu-test/src/dtc/tests/find_property.c DEP /tmp/qemu-test/src/dtc/tests/root_node.c
DEP /tmp/qemu-test/src/dtc/tests/get_mem_rsv.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_overlay.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_addresses.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_empty_tree.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_strerror.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_rw.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_sw.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_wip.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_ro.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt.c
DEP /tmp/qemu-test/src/dtc/util.c
DEP /tmp/qemu-test/src/dtc/fdtoverlay.c
DEP /tmp/qemu-test/src/dtc/fdtput.c
DEP /tmp/qemu-test/src/dtc/fdtget.c
DEP /tmp/qemu-test/src/dtc/fdtdump.c
LEX convert-dtsv0-lexer.lex.c
DEP /tmp/qemu-test/src/dtc/srcpos.c
BISON dtc-parser.tab.c
LEX dtc-lexer.lex.c
DEP /tmp/qemu-test/src/dtc/treesource.c
DEP /tmp/qemu-test/src/dtc/fstree.c
DEP /tmp/qemu-test/src/dtc/flattree.c
DEP /tmp/qemu-test/src/dtc/livetree.c
DEP /tmp/qemu-test/src/dtc/dtc.c
DEP /tmp/qemu-test/src/dtc/data.c
DEP /tmp/qemu-test/src/dtc/checks.c
DEP convert-dtsv0-lexer.lex.c
DEP dtc-lexer.lex.c
DEP dtc-parser.tab.c
CHK version_gen.h
UPD version_gen.h
DEP /tmp/qemu-test/src/dtc/util.c
CC libfdt/fdt.o
CC libfdt/fdt_wip.o
CC libfdt/fdt_ro.o
CC libfdt/fdt_sw.o
CC libfdt/fdt_rw.o
CC libfdt/fdt_strerror.o
CC libfdt/fdt_empty_tree.o
CC libfdt/fdt_addresses.o
CC libfdt/fdt_overlay.o
AR libfdt/libfdt.a
x86_64-w64-mingw32-ar: creating libfdt/libfdt.a
a - libfdt/fdt.o
a - libfdt/fdt_ro.o
a - libfdt/fdt_wip.o
a - libfdt/fdt_sw.o
a - libfdt/fdt_rw.o
a - libfdt/fdt_strerror.o
a - libfdt/fdt_empty_tree.o
a - libfdt/fdt_addresses.o
a - libfdt/fdt_overlay.o
RC version.o
mkdir -p dtc/libfdt
mkdir -p dtc/tests

  GEN     qga/qapi-generated/qapi-gen
  CC      qapi/qapi-builtin-types.o
  CC      qapi/qapi-types-block-core.o
  CC      qapi/qapi-types.o
  CC      qapi/qapi-types-block.o
  CC      qapi/qapi-types-char.o
  CC      qapi/qapi-types-common.o
  CC      qapi/qapi-types-crypto.o
  CC      qapi/qapi-types-introspect.o
  CC      qapi/qapi-types-migration.o
  CC      qapi/qapi-types-misc.o
  CC      qapi/qapi-types-net.o
  CC      qapi/qapi-types-rocker.o
  CC      qapi/qapi-types-run-state.o
  CC      qapi/qapi-types-sockets.o
  CC      qapi/qapi-types-tpm.o
  CC      qapi/qapi-types-trace.o
  CC      qapi/qapi-types-transaction.o
  CC      qapi/qapi-types-ui.o
  CC      qapi/qapi-builtin-visit.o
  CC      qapi/qapi-visit.o
  CC      qapi/qapi-visit-block-core.o
  CC      qapi/qapi-visit-block.o
  CC      qapi/qapi-visit-char.o
  CC      qapi/qapi-visit-common.o
  CC      qapi/qapi-visit-crypto.o
  CC      qapi/qapi-visit-introspect.o
  CC      qapi/qapi-visit-migration.o
  CC      qapi/qapi-visit-misc.o
  CC      qapi/qapi-visit-rocker.o
  CC      qapi/qapi-visit-net.o
  CC      qapi/qapi-visit-run-state.o
  CC      qapi/qapi-visit-sockets.o
  CC      qapi/qapi-visit-tpm.o
  CC      qapi/qapi-visit-trace.o
  CC      qapi/qapi-visit-transaction.o
  CC      qapi/qapi-visit-ui.o
  CC      qapi/qapi-events.o
  CC      qapi/qapi-events-block-core.o
  CC      qapi/qapi-events-block.o
  CC      qapi/qapi-events-char.o
  CC      qapi/qapi-events-common.o
  CC      qapi/qapi-events-crypto.o
  CC      qapi/qapi-events-introspect.o
  CC      qapi/qapi-events-migration.o
  CC      qapi/qapi-events-misc.o
  CC      qapi/qapi-events-net.o
  CC      qapi/qapi-events-rocker.o
  CC      qapi/qapi-events-run-state.o
  CC      qapi/qapi-events-sockets.o
  CC      qapi/qapi-events-tpm.o
  CC      qapi/qapi-events-trace.o
  CC      qapi/qapi-events-transaction.o
  CC      qapi/qapi-events-ui.o
  CC      qapi/qapi-introspect.o
  CC      qapi/qapi-visit-core.o
  CC      qapi/qapi-dealloc-visitor.o
  CC      qapi/qobject-input-visitor.o
  CC      qapi/qobject-output-visitor.o
  CC      qapi/qmp-registry.o
  CC      qapi/qmp-dispatch.o
  CC      qapi/string-input-visitor.o
  CC      qapi/string-output-visitor.o
  CC      qapi/opts-visitor.o
  CC      qapi/qapi-clone-visitor.o
  CC      qapi/qmp-event.o
  CC      qapi/qapi-util.o
  CC      qobject/qnull.o
  CC      qobject/qnum.o
  CC      qobject/qstring.o
  CC      qobject/qdict.o
  CC      qobject/qlist.o
  CC      qobject/qbool.o
  CC      qobject/qlit.o
  CC      qobject/qjson.o
  CC      qobject/qobject.o
  CC      qobject/json-lexer.o
  CC      qobject/json-streamer.o
  CC      qobject/json-parser.o
  CC      trace/simple.o
  CC      trace/control.o
  CC      trace/qmp.o
  CC      util/osdep.o
  CC      util/cutils.o
  CC      util/unicode.o
  CC      util/qemu-timer-common.o
  CC      util/bufferiszero.o
  CC      util/lockcnt.o
  CC      util/aiocb.o
  CC      util/async.o
  CC      util/aio-wait.o
  CC      util/thread-pool.o
  CC      util/qemu-timer.o
  CC      util/main-loop.o
  CC      util/iohandler.o
  CC      util/aio-win32.o
  CC      util/event_notifier-win32.o
  CC      util/oslib-win32.o
  CC      util/qemu-thread-win32.o
  CC      util/envlist.o
  CC      util/path.o
  CC      util/module.o
  CC      util/host-utils.o
  CC      util/bitmap.o
  CC      util/bitops.o
  CC      util/hbitmap.o
  CC      util/fifo8.o
  CC      util/acl.o
  CC      util/cacheinfo.o
  CC      util/error.o
  CC      util/qemu-error.o
  CC      util/id.o
  CC      util/iov.o
  CC      util/qemu-config.o
  CC      util/qemu-sockets.o
  CC      util/uri.o
  CC      util/notify.o
  CC      util/qemu-option.o
  CC      util/qemu-progress.o
  CC      util/keyval.o
  CC      util/hexdump.o
  CC      util/crc32c.o
  CC      util/uuid.o
  CC      util/throttle.o
  CC      util/getauxval.o
  CC      util/readline.o
  CC      util/rcu.o
  CC      util/qemu-coroutine.o
  CC      util/qemu-coroutine-lock.o
  CC      util/qemu-coroutine-io.o
  CC      util/qemu-coroutine-sleep.o
  CC      util/coroutine-win32.o
  CC      util/buffer.o
  CC      util/timed-average.o
  CC      util/base64.o
  CC      util/log.o
  CC      util/pagesize.o
  CC      util/qdist.o
  CC      util/qht.o
  CC      util/range.o
  CC      util/stats64.o
  CC      util/systemd.o
  CC      trace-root.o
  CC      util/trace.o
  CC      crypto/trace.o
  CC      io/trace.o
  CC      migration/trace.o
  CC      block/trace.o
  CC      chardev/trace.o
  CC      hw/block/trace.o
  CC      hw/block/dataplane/trace.o
  CC      hw/char/trace.o
  CC      hw/intc/trace.o
  CC      hw/net/trace.o
  CC      hw/rdma/trace.o
  CC      hw/rdma/vmw/trace.o
  CC      hw/virtio/trace.o
  CC      hw/audio/trace.o
  CC      hw/misc/trace.o
  CC      hw/misc/macio/trace.o
  CC      hw/usb/trace.o
  CC      hw/scsi/trace.o
  CC      hw/nvram/trace.o
  CC      hw/display/trace.o
  CC      hw/input/trace.o
  CC      hw/timer/trace.o
  CC      hw/dma/trace.o
  CC      hw/sparc/trace.o
  CC      hw/sparc64/trace.o
  CC      hw/sd/trace.o
  CC      hw/isa/trace.o
  CC      hw/mem/trace.o
  CC      hw/i386/trace.o
  CC      hw/i386/xen/trace.o
  CC      hw/9pfs/trace.o
  CC      hw/ppc/trace.o
  CC      hw/pci/trace.o
  CC      hw/pci-host/trace.o
  CC      hw/s390x/trace.o
  CC      hw/vfio/trace.o
  CC      hw/acpi/trace.o
  CC      hw/arm/trace.o
  CC      hw/alpha/trace.o
  CC      hw/hppa/trace.o
  CC      hw/xen/trace.o
  CC      hw/ide/trace.o
  CC      hw/tpm/trace.o
  CC      ui/trace.o
  CC      audio/trace.o
  CC      net/trace.o
  CC      target/arm/trace.o
  CC      target/i386/trace.o
  CC      target/mips/trace.o
  CC      target/sparc/trace.o
  CC      target/s390x/trace.o
  CC      target/ppc/trace.o
  CC      qom/trace.o
  CC      linux-user/trace.o
  CC      qapi/trace.o
  CC      accel/tcg/trace.o
  CC      accel/kvm/trace.o
  CC      nbd/trace.o
  CC      scsi/trace.o
  CC      crypto/pbkdf-stub.o
  CC      stubs/arch-query-cpu-def.o
  CC      stubs/arch-query-cpu-model-expansion.o
  CC      stubs/arch-query-cpu-model-comparison.o
  CC      stubs/arch-query-cpu-model-baseline.o
  CC      stubs/bdrv-next-monitor-owned.o
  CC      stubs/blk-commit-all.o
  CC      stubs/blockdev-close-all-bdrv-states.o
  CC      stubs/clock-warp.o
  CC      stubs/cpu-get-clock.o
  CC      stubs/cpu-get-icount.o
  CC      stubs/dump.o
  CC      stubs/error-printf.o
  CC      stubs/fdset.o
  CC      stubs/gdbstub.o
  CC      stubs/get-vm-name.o
  CC      stubs/iothread.o
  CC      stubs/iothread-lock.o
  CC      stubs/is-daemonized.o
  CC      stubs/machine-init-done.o
  CC      stubs/migr-blocker.o
  CC      stubs/change-state-handler.o
  CC      stubs/monitor.o
  CC      stubs/notify-event.o
  CC      stubs/qtest.o
  CC      stubs/replay.o
  CC      stubs/runstate-check.o
  CC      stubs/set-fd-handler.o
  CC      stubs/slirp.o
  CC      stubs/sysbus.o
  CC      stubs/tpm.o
  CC      stubs/trace-control.o
  CC      stubs/uuid.o
  CC      stubs/vm-stop.o
  CC      stubs/vmstate.o
  CC      stubs/fd-register.o
  CC      stubs/qmp_pc_dimm.o
  CC      stubs/target-monitor-defs.o
  CC      stubs/target-get-monitor-def.o
  CC      stubs/pc_madt_cpu_entry.o
  CC      stubs/vmgenid.o
  CC      stubs/xen-common.o
  CC      stubs/xen-hvm.o
  CC      stubs/pci-host-piix.o
  CC      stubs/ram-block.o
  GEN     qemu-img-cmds.h
  CC      block.o
  CC      blockjob.o
  CC      qemu-io-cmds.o
  CC      replication.o
  CC      block/raw-format.o
  CC      block/qcow.o
  CC      block/vdi.o
  CC      block/vmdk.o
  CC      block/cloop.o
  CC      block/bochs.o
  CC      block/vpc.o
  CC      block/vvfat.o
  CC      block/dmg.o
  CC      block/qcow2.o
  CC      block/qcow2-refcount.o
  CC      block/qcow2-cluster.o
  CC      block/qcow2-snapshot.o
  CC      block/qcow2-cache.o
  CC      block/qcow2-bitmap.o
  CC      block/qed.o
  CC      block/qed-l2-cache.o
  CC      block/qed-table.o
  CC      block/qed-cluster.o
  CC      block/qed-check.o
  CC      block/vhdx.o
  CC      block/vhdx-endian.o
  CC      block/vhdx-log.o
  CC      block/quorum.o
  CC      block/parallels.o
  CC      block/blkdebug.o
  CC      block/blkverify.o
  CC      block/blkreplay.o
  CC      block/block-backend.o
  CC      block/snapshot.o
  CC      block/qapi.o
  CC      block/win32-aio.o
  CC      block/file-win32.o
  CC      block/null.o
  CC      block/mirror.o
  CC      block/commit.o
  CC      block/io.o
  CC      block/create.o
  CC      block/throttle-groups.o
  CC      block/nbd.o
  CC      block/nbd-client.o
  CC      block/sheepdog.o
  CC      block/accounting.o
  CC      block/dirty-bitmap.o
  CC      block/write-threshold.o
  CC      block/backup.o
  CC      block/replication.o
  CC      block/throttle.o
  CC      block/crypto.o
  CC      nbd/server.o
  CC      nbd/client.o
  CC      nbd/common.o
  CC      scsi/utils.o
  CC      block/curl.o
  CC      block/ssh.o
  CC      block/dmg-bz2.o
  CC      crypto/init.o
  CC      crypto/hash.o
  CC      crypto/hash-nettle.o
  CC      crypto/hmac.o
  CC      crypto/hmac-nettle.o
  CC      crypto/aes.o
  CC      crypto/desrfb.o
  CC      crypto/cipher.o
  CC      crypto/tlscreds.o
  CC      crypto/tlscredsanon.o
  CC      crypto/tlscredsx509.o
  CC      crypto/tlssession.o
  CC      crypto/secret.o
  CC      crypto/random-gnutls.o
  CC      crypto/pbkdf.o
  CC      crypto/pbkdf-nettle.o
  CC      crypto/ivgen.o
  CC      crypto/ivgen-essiv.o
  CC      crypto/ivgen-plain.o
  CC      crypto/ivgen-plain64.o
  CC      crypto/afsplit.o
  CC      crypto/xts.o
  CC      crypto/block.o
  CC      crypto/block-qcow.o
  CC      crypto/block-luks.o
  CC      io/channel.o
  CC      io/channel-buffer.o
  CC      io/channel-command.o
  CC      io/channel-file.o
  CC      io/channel-socket.o
  CC      io/channel-tls.o
  CC      io/channel-watch.o
  CC      io/channel-websock.o
  CC      io/channel-util.o
  CC      io/dns-resolver.o
  CC      io/net-listener.o
  CC      io/task.o
  CC      qom/object.o
  CC      qom/container.o
  CC      qom/qom-qobject.o
  CC      qom/object_interfaces.o
  CC      qemu-io.o
  CC      blockdev.o
  CC      blockdev-nbd.o
  CC      bootdevice.o
  CC      iothread.o
  CC      qdev-monitor.o
  CC      device-hotplug.o
  CC      os-win32.o
  CC      bt-host.o
  CC      bt-vhci.o
  CC      dma-helpers.o
  CC      vl.o
  CC      tpm.o
  CC      device_tree.o
  CC      qapi/qapi-commands.o
  CC      qapi/qapi-commands-block-core.o
  CC      qapi/qapi-commands-block.o
  CC      qapi/qapi-commands-char.o
  CC      qapi/qapi-commands-common.o
  CC      qapi/qapi-commands-crypto.o
  CC      qapi/qapi-commands-introspect.o
  CC      qapi/qapi-commands-migration.o
  CC      qapi/qapi-commands-misc.o
  CC      qapi/qapi-commands-net.o
  CC      qapi/qapi-commands-rocker.o
  CC      qapi/qapi-commands-run-state.o
  CC      qapi/qapi-commands-sockets.o
  CC      qapi/qapi-commands-tpm.o
  CC      qapi/qapi-commands-trace.o
  CC      qapi/qapi-commands-transaction.o
  CC      qapi/qapi-commands-ui.o
  CC      qmp.o
  CC      hmp.o
  CC      cpus-common.o
  CC      audio/audio.o
  CC      audio/noaudio.o
  CC      audio/wavaudio.o
  CC      audio/mixeng.o
  CC      audio/audio_win_int.o
  CC      audio/dsoundaudio.o
  CC      audio/wavcapture.o
  CC      backends/rng.o
  CC      backends/rng-egd.o
  CC      backends/tpm.o
  CC      backends/hostmem-ram.o
  CC      backends/hostmem.o
  CC      backends/cryptodev.o
  CC      backends/cryptodev-builtin.o
  CC      backends/cryptodev-vhost.o
  CC      block/stream.o
  CC      chardev/msmouse.o
  CC      chardev/wctablet.o
  CC      chardev/testdev.o
  CC      disas/arm.o
  CXX     disas/arm-a64.o
  CC      disas/i386.o
  CXX     disas/libvixl/vixl/utils.o
  CXX     disas/libvixl/vixl/compiler-intrinsics.o
  CXX     disas/libvixl/vixl/a64/instructions-a64.o
  CXX     disas/libvixl/vixl/a64/decoder-a64.o
  CXX     disas/libvixl/vixl/a64/disasm-a64.o
  CC      hw/acpi/core.o
  CC      hw/acpi/piix4.o
  CC      hw/acpi/pcihp.o
  CC      hw/acpi/ich9.o
  CC      hw/acpi/tco.o
  CC      hw/acpi/cpu_hotplug.o
  CC      hw/acpi/memory_hotplug.o
  CC      hw/acpi/cpu.o
  CC      hw/acpi/nvdimm.o
  CC      hw/acpi/vmgenid.o
  CC      hw/acpi/acpi_interface.o
  CC      hw/acpi/bios-linker-loader.o
  CC      hw/acpi/aml-build.o
  CC      hw/acpi/ipmi.o
  CC      hw/acpi/acpi-stub.o
  CC      hw/acpi/ipmi-stub.o
  CC      hw/audio/sb16.o
  CC      hw/audio/es1370.o
  CC      hw/audio/ac97.o
  CC      hw/audio/fmopl.o
  CC      hw/audio/adlib.o
  CC      hw/audio/gus.o
  CC      hw/audio/gusemu_hal.o
  CC      hw/audio/gusemu_mixer.o
  CC      hw/audio/cs4231a.o
  CC      hw/audio/intel-hda.o
  CC      hw/audio/hda-codec.o
  CC      hw/audio/pcspk.o
  CC      hw/audio/wm8750.o
  CC      hw/audio/pl041.o
  CC      hw/audio/lm4549.o
  CC      hw/audio/marvell_88w8618.o
  CC      hw/audio/soundhw.o
  CC      hw/block/block.o
  CC      hw/block/cdrom.o
  CC      hw/block/hd-geometry.o
  CC      hw/block/fdc.o
  CC      hw/block/m25p80.o
  CC      hw/block/nand.o
  CC      hw/block/pflash_cfi01.o
  CC      hw/block/pflash_cfi02.o
  CC      hw/block/ecc.o
  CC      hw/block/onenand.o
  CC      hw/block/nvme.o
  CC      hw/bt/core.o
  CC      hw/bt/l2cap.o
  CC      hw/bt/sdp.o
  CC      hw/bt/hci.o
  CC      hw/bt/hid.o
  CC      hw/bt/hci-csr.o
  CC      hw/char/ipoctal232.o
  CC      hw/char/parallel.o
  CC      hw/char/parallel-isa.o
  CC      hw/char/pl011.o
  CC      hw/char/serial.o
  CC      hw/char/serial-isa.o
  CC      hw/char/serial-pci.o
  CC      hw/char/virtio-console.o
  CC      hw/char/cadence_uart.o
  CC      hw/char/cmsdk-apb-uart.o
  CC      hw/char/debugcon.o
  CC      hw/char/imx_serial.o
  CC      hw/core/qdev.o
  CC      hw/core/qdev-properties.o
  CC      hw/core/bus.o
  CC      hw/core/reset.o
  CC      hw/core/qdev-fw.o
  CC      hw/core/fw-path-provider.o
  CC      hw/core/irq.o
  CC      hw/core/hotplug.o
  CC      hw/core/nmi.o
  CC      hw/core/stream.o
  CC      hw/core/ptimer.o
  CC      hw/core/sysbus.o
  CC      hw/core/machine.o
  CC      hw/core/loader.o
  CC      hw/core/qdev-properties-system.o
  CC      hw/core/register.o
  CC      hw/core/or-irq.o
  CC      hw/core/split-irq.o
  CC      hw/core/platform-bus.o
  CC      hw/cpu/core.o
  CC      hw/display/ads7846.o
  CC      hw/display/cirrus_vga.o
  CC      hw/display/pl110.o
  CC      hw/display/sii9022.o
  CC      hw/display/ssd0303.o
  CC      hw/display/ssd0323.o
  CC      hw/display/vga-pci.o
  CC      hw/display/vga-isa.o
  CC      hw/display/vmware_vga.o
  CC      hw/display/blizzard.o
  CC      hw/display/exynos4210_fimd.o
  CC      hw/display/framebuffer.o
  CC      hw/display/tc6393xb.o
  CC      hw/dma/pl080.o
  CC      hw/dma/pl330.o
  CC      hw/dma/i8257.o
  CC      hw/dma/xilinx_axidma.o
  CC      hw/dma/xlnx-zynq-devcfg.o
  CC      hw/gpio/max7310.o
  CC      hw/gpio/pl061.o
  CC      hw/gpio/zaurus.o
  CC      hw/gpio/gpio_key.o
  CC      hw/i2c/core.o
  CC      hw/i2c/smbus.o
  CC      hw/i2c/smbus_eeprom.o
  CC      hw/i2c/i2c-ddc.o
  CC      hw/i2c/versatile_i2c.o
  CC      hw/i2c/smbus_ich9.o
  CC      hw/i2c/pm_smbus.o
  CC      hw/i2c/bitbang_i2c.o
  CC      hw/i2c/exynos4210_i2c.o
  CC      hw/i2c/imx_i2c.o
  CC      hw/i2c/aspeed_i2c.o
  CC      hw/ide/core.o
  CC      hw/ide/atapi.o
  CC      hw/ide/qdev.o
  CC      hw/ide/pci.o
  CC      hw/ide/isa.o
  CC      hw/ide/piix.o
  CC      hw/ide/microdrive.o
  CC      hw/ide/ahci.o
  CC      hw/ide/ich.o
  CC      hw/ide/ahci-allwinner.o
  CC      hw/input/hid.o
  CC      hw/input/lm832x.o
  CC      hw/input/pckbd.o
  CC      hw/input/pl050.o
  CC      hw/input/ps2.o
  CC      hw/input/stellaris_input.o
  CC      hw/input/tsc2005.o
  CC      hw/input/virtio-input.o
  CC      hw/input/virtio-input-hid.o
  CC      hw/intc/i8259_common.o
  CC      hw/intc/i8259.o
  CC      hw/intc/pl190.o
  CC      hw/intc/xlnx-pmu-iomod-intc.o
  CC      hw/intc/xlnx-zynqmp-ipi.o
  CC      hw/intc/imx_avic.o
  CC      hw/intc/imx_gpcv2.o
  CC      hw/intc/realview_gic.o
  CC      hw/intc/ioapic_common.o
  CC      hw/intc/arm_gic_common.o
  CC      hw/intc/arm_gic.o
  CC      hw/intc/arm_gicv2m.o
  CC      hw/intc/arm_gicv3_common.o
  CC      hw/intc/arm_gicv3.o
  CC      hw/intc/arm_gicv3_dist.o
  CC      hw/intc/arm_gicv3_redist.o
  CC      hw/intc/arm_gicv3_its_common.o
  CC      hw/intc/intc.o
  CC      hw/ipack/ipack.o
  CC      hw/ipack/tpci200.o
  CC      hw/ipmi/ipmi.o
  CC      hw/ipmi/ipmi_bmc_sim.o
  CC      hw/ipmi/ipmi_bmc_extern.o
  CC      hw/ipmi/isa_ipmi_kcs.o
  CC      hw/ipmi/isa_ipmi_bt.o
  CC      hw/isa/isa-bus.o
  CC      hw/isa/isa-superio.o
  CC      hw/isa/smc37c669-superio.o
  CC      hw/isa/apm.o
  CC      hw/mem/pc-dimm.o
  CC      hw/mem/nvdimm.o
  CC      hw/misc/applesmc.o
  CC      hw/misc/max111x.o
  CC      hw/misc/tmp105.o
  CC      hw/misc/tmp421.o
  CC      hw/misc/debugexit.o
  CC      hw/misc/sga.o
  CC      hw/misc/pc-testdev.o
  CC      hw/misc/pci-testdev.o
  CC      hw/misc/edu.o
  CC      hw/misc/unimp.o
  CC      hw/misc/vmcoreinfo.o
  CC      hw/misc/arm_l2x0.o
  CC      hw/misc/arm_integrator_debug.o
  CC      hw/misc/a9scu.o
  CC      hw/misc/arm11scu.o
  CC      hw/net/ne2000.o
  CC      hw/net/eepro100.o
  CC      hw/net/pcnet-pci.o
  CC      hw/net/pcnet.o
  CC      hw/net/e1000.o
  CC      hw/net/e1000x_common.o
  CC      hw/net/net_tx_pkt.o
  CC      hw/net/net_rx_pkt.o
  CC      hw/net/e1000e.o
  CC      hw/net/e1000e_core.o
  CC      hw/net/rtl8139.o
  CC      hw/net/vmxnet3.o
  CC      hw/net/smc91c111.o
  CC      hw/net/lan9118.o
  CC      hw/net/ne2000-isa.o
  CC      hw/net/xgmac.o
  CC      hw/net/xilinx_axienet.o
  CC      hw/net/allwinner_emac.o
  CC      hw/net/imx_fec.o
  CC      hw/net/cadence_gem.o
  CC      hw/net/stellaris_enet.o
  CC      hw/net/ftgmac100.o
  CC      hw/net/rocker/rocker.o
  CC      hw/net/rocker/rocker_fp.o
  CC      hw/net/rocker/rocker_desc.o
  CC      hw/net/rocker/rocker_world.o
  CC      hw/net/rocker/rocker_of_dpa.o
  CC      hw/net/can/can_sja1000.o
  CC      hw/net/can/can_kvaser_pci.o
  CC      hw/net/can/can_pcm3680_pci.o
  CC      hw/net/can/can_mioe3680_pci.o
  CC      hw/nvram/eeprom93xx.o
  CC      hw/nvram/eeprom_at24c.o
  CC      hw/nvram/fw_cfg.o
  CC      hw/nvram/chrp_nvram.o
  CC      hw/pci-bridge/pci_bridge_dev.o
  CC      hw/pci-bridge/pcie_root_port.o
  CC      hw/pci-bridge/gen_pcie_root_port.o
  CC      hw/pci-bridge/pcie_pci_bridge.o
  CC      hw/pci-bridge/pci_expander_bridge.o
  CC      hw/pci-bridge/xio3130_upstream.o
  CC      hw/pci-bridge/xio3130_downstream.o
  CC      hw/pci-bridge/ioh3420.o
  CC      hw/pci-bridge/i82801b11.o
  CC      hw/pci-host/pam.o
  CC      hw/pci-host/versatile.o
  CC      hw/pci-host/piix.o
  CC      hw/pci-host/q35.o
  CC      hw/pci-host/gpex.o
  CC      hw/pci-host/designware.o
  CC      hw/pci/pci.o
  CC      hw/pci/pci_bridge.o
  CC      hw/pci/msix.o
  CC      hw/pci/msi.o
  CC      hw/pci/shpc.o
  CC      hw/pci/slotid_cap.o
  CC      hw/pci/pci_host.o
  CC      hw/pci/pcie_host.o
  CC      hw/pci/pcie.o
  CC      hw/pci/pcie_aer.o
  CC      hw/pci/pcie_port.o
  CC      hw/pci/pci-stub.o
  CC      hw/pcmcia/pcmcia.o
  CC      hw/scsi/scsi-disk.o
  CC      hw/scsi/scsi-generic.o
  CC      hw/scsi/scsi-bus.o
  CC      hw/scsi/lsi53c895a.o
  CC      hw/scsi/mptsas.o
  CC      hw/scsi/mptconfig.o
  CC      hw/scsi/mptendian.o
  CC      hw/scsi/megasas.o
  CC      hw/scsi/vmw_pvscsi.o
  CC      hw/scsi/esp.o
  CC      hw/scsi/esp-pci.o
  CC      hw/sd/pl181.o
  CC      hw/sd/ssi-sd.o
  CC      hw/sd/sd.o
  CC      hw/sd/core.o
  CC      hw/sd/sdmmc-internal.o
  CC      hw/sd/sdhci.o
  CC      hw/smbios/smbios.o
  CC      hw/smbios/smbios_type_38.o
  CC      hw/smbios/smbios-stub.o
  CC      hw/smbios/smbios_type_38-stub.o
  CC      hw/ssi/pl022.o
  CC      hw/ssi/ssi.o
  CC      hw/ssi/xilinx_spips.o
  CC      hw/ssi/aspeed_smc.o
  CC      hw/ssi/stm32f2xx_spi.o
  CC      hw/ssi/mss-spi.o
  CC      hw/timer/arm_timer.o
  CC      hw/timer/arm_mptimer.o
  CC      hw/timer/armv7m_systick.o
  CC      hw/timer/a9gtimer.o
  CC      hw/timer/cadence_ttc.o
  CC      hw/timer/ds1338.o
  CC      hw/timer/hpet.o
  CC      hw/timer/i8254_common.o
  CC      hw/timer/i8254.o
  CC      hw/timer/pl031.o
  CC      hw/timer/twl92230.o
  CC      hw/timer/imx_epit.o
  CC      hw/timer/imx_gpt.o
  CC      hw/timer/xlnx-zynqmp-rtc.o
  CC      hw/timer/stm32f2xx_timer.o
  CC      hw/timer/aspeed_timer.o
  CC      hw/timer/cmsdk-apb-timer.o
  CC      hw/timer/mss-timer.o
  CC      hw/tpm/tpm_util.o
  CC      hw/tpm/tpm_tis.o
  CC      hw/tpm/tpm_crb.o
  CC      hw/usb/core.o
  CC      hw/usb/combined-packet.o
  CC      hw/usb/bus.o
  CC      hw/usb/libhw.o
  CC      hw/usb/desc.o
  CC      hw/usb/desc-msos.o
  CC      hw/usb/hcd-uhci.o
  CC      hw/usb/hcd-ohci.o
  CC      hw/usb/hcd-ehci.o
  CC      hw/usb/hcd-ehci-pci.o
  CC      hw/usb/hcd-ehci-sysbus.o
  CC      hw/usb/hcd-xhci.o
  CC      hw/usb/hcd-xhci-nec.o
  CC      hw/usb/hcd-musb.o
  CC      hw/usb/dev-hub.o
  CC      hw/usb/dev-hid.o
  CC      hw/usb/dev-wacom.o
  CC      hw/usb/dev-storage.o
  CC      hw/usb/dev-uas.o
  CC      hw/usb/dev-audio.o
  CC      hw/usb/dev-serial.o
  CC      hw/usb/dev-network.o
  CC      hw/usb/dev-bluetooth.o
  CC      hw/usb/dev-smartcard-reader.o
  CC      hw/usb/host-stub.o
  CC      hw/virtio/virtio-rng.o
  CC      hw/virtio/virtio-pci.o
  CC      hw/virtio/virtio-bus.o
  CC      hw/virtio/virtio-mmio.o
  CC      hw/virtio/vhost-stub.o
  CC      hw/watchdog/watchdog.o
  CC      hw/watchdog/wdt_i6300esb.o
  CC      hw/watchdog/wdt_ib700.o
  CC      hw/watchdog/wdt_aspeed.o
  CC      migration/migration.o
  CC      migration/socket.o
  CC      migration/fd.o
  CC      migration/exec.o
  CC      migration/tls.o
  CC      migration/channel.o
  CC      migration/savevm.o
  CC      migration/colo-comm.o
  CC      migration/colo.o
  CC      migration/colo-failover.o
  CC      migration/vmstate.o
  CC      migration/vmstate-types.o
  CC      migration/page_cache.o
  CC      migration/qemu-file.o
  CC      migration/global_state.o
  CC      migration/qemu-file-channel.o
  CC      migration/xbzrle.o
  CC      migration/postcopy-ram.o
  CC      migration/qjson.o
  CC      migration/block-dirty-bitmap.o
  CC      migration/block.o
  CC      net/net.o
  CC      net/queue.o
  CC      net/checksum.o
  CC      net/util.o
  CC      net/hub.o
  CC      net/socket.o
  CC      net/dump.o
  CC      net/eth.o
  CC      net/slirp.o
  CC      net/filter.o
  CC      net/filter-buffer.o
  CC      net/filter-mirror.o
  CC      net/colo-compare.o
  CC      net/colo.o
  CC      net/filter-rewriter.o
  CC      net/filter-replay.o
  CC      net/tap-win32.o
  CC      net/can/can_core.o
  CC      net/can/can_host.o
  CC      qom/cpu.o
  CC      replay/replay.o
  CC      replay/replay-internal.o
  CC      replay/replay-events.o
  CC      replay/replay-time.o
  CC      replay/replay-input.o
  CC      replay/replay-char.o
  CC      replay/replay-snapshot.o
  CC      replay/replay-net.o
  CC      replay/replay-audio.o
  CC      slirp/cksum.o
  CC      slirp/if.o
  CC      slirp/ip_icmp.o
  CC      slirp/ip6_icmp.o
  CC      slirp/ip6_input.o
  CC      slirp/ip6_output.o
  CC      slirp/ip_input.o
  CC      slirp/ip_output.o
  CC      slirp/dnssearch.o
  CC      slirp/dhcpv6.o
  CC      slirp/slirp.o
  CC      slirp/mbuf.o
  CC      slirp/misc.o
  CC      slirp/sbuf.o
  CC      slirp/socket.o
  CC      slirp/tcp_input.o
  CC      slirp/tcp_output.o
  CC      slirp/tcp_subr.o
  CC      slirp/tcp_timer.o
  CC      slirp/udp.o
  CC      slirp/udp6.o
  CC      slirp/bootp.o
  CC      slirp/tftp.o
  CC      slirp/arp_table.o
  CC      slirp/ndp_table.o
  CC      slirp/ncsi.o
  CC      ui/keymaps.o
  CC      ui/console.o
  CC      ui/cursor.o
  CC      ui/qemu-pixman.o
  CC      ui/input.o
  CC      ui/input-keymap.o
  CC      ui/input-legacy.o
  CC      ui/vnc.o
  CC      ui/vnc-enc-zlib.o
  CC      ui/vnc-enc-hextile.o
  CC      ui/vnc-enc-tight.o
  CC      ui/vnc-palette.o
  CC      ui/vnc-enc-zrle.o
  CC      ui/vnc-auth-vencrypt.o
  CC      ui/vnc-ws.o
  CC      ui/vnc-jobs.o
  CC      ui/sdl.o
  CC      ui/sdl_zoom.o
  CC      ui/gtk.o
  CC      chardev/char.o
  CC      chardev/char-console.o
  CC      chardev/char-fe.o
  CC      chardev/char-file.o
  CC      chardev/char-io.o
  CC      chardev/char-mux.o
  CC      chardev/char-null.o
  CC      chardev/char-pipe.o
  CC      chardev/char-ringbuf.o
  CC      chardev/char-serial.o
  CC      chardev/char-socket.o
  CC      chardev/char-stdio.o
  CC      chardev/char-udp.o
  CC      chardev/char-win.o
  CC      chardev/char-win-stdio.o
  CC      qga/commands.o
  AS      optionrom/multiboot.o
  AS      optionrom/linuxboot.o
  CC      optionrom/linuxboot_dma.o
  AS      optionrom/kvmvapic.o
  BUILD   optionrom/multiboot.img
  BUILD   optionrom/linuxboot.img
  BUILD   optionrom/linuxboot_dma.img
  BUILD   optionrom/kvmvapic.img
  BUILD   optionrom/multiboot.raw
  BUILD   optionrom/linuxboot.raw
  BUILD   optionrom/linuxboot_dma.raw
  BUILD   optionrom/kvmvapic.raw
  SIGN    optionrom/multiboot.bin
  CC      qga/guest-agent-command-state.o
  SIGN    optionrom/linuxboot.bin
  CC      qga/main.o
  SIGN    optionrom/linuxboot_dma.bin
  SIGN    optionrom/kvmvapic.bin
  CC      qga/commands-win32.o
  CC      qga/channel-win32.o
  CC      qga/service-win32.o
  CC      qga/vss-win32.o
  CC      qga/qapi-generated/qga-qapi-types.o
  CC      qga/qapi-generated/qga-qapi-visit.o
  CC      qga/qapi-generated/qga-qapi-commands.o
  AR      libqemuutil.a
  CC      qemu-img.o
  LINK    qemu-io.exe
  GEN     aarch64-softmmu/hmp-commands.h
  GEN     aarch64-softmmu/hmp-commands-info.h
  GEN     aarch64-softmmu/config-target.h
  CC      aarch64-softmmu/tcg/tcg.o
  CC      aarch64-softmmu/exec.o
  GEN     x86_64-softmmu/hmp-commands.h
  GEN     x86_64-softmmu/hmp-commands-info.h
  GEN     x86_64-softmmu/config-target.h
  CC      aarch64-softmmu/tcg/tcg-op.o
  CC      x86_64-softmmu/exec.o
  CC      x86_64-softmmu/tcg/tcg-op.o
  CC      x86_64-softmmu/tcg/tcg.o
  CC      x86_64-softmmu/tcg/tcg-op-vec.o
  CC      x86_64-softmmu/tcg/tcg-op-gvec.o
  CC      aarch64-softmmu/tcg/tcg-op-vec.o
  CC      x86_64-softmmu/tcg/tcg-common.o
  CC      aarch64-softmmu/tcg/tcg-op-gvec.o
  CC      x86_64-softmmu/tcg/optimize.o
  CC      x86_64-softmmu/fpu/softfloat.o
  CC      x86_64-softmmu/disas.o
  GEN     x86_64-softmmu/gdbstub-xml.c
  LINK    qemu-img.exe
  CC      x86_64-softmmu/arch_init.o
  CC      aarch64-softmmu/tcg/tcg-common.o
  CC      x86_64-softmmu/cpus.o
  CC      x86_64-softmmu/monitor.o
  CC      x86_64-softmmu/gdbstub.o
  CC      aarch64-softmmu/tcg/optimize.o
  CC      x86_64-softmmu/balloon.o
  CC      aarch64-softmmu/fpu/softfloat.o
  CC      x86_64-softmmu/ioport.o
  CC      aarch64-softmmu/disas.o
  CC      x86_64-softmmu/numa.o
  LINK    qemu-ga.exe
  GEN     aarch64-softmmu/gdbstub-xml.c
  CC      aarch64-softmmu/arch_init.o
  CC      aarch64-softmmu/cpus.o
  CC      x86_64-softmmu/qtest.o
  CC      aarch64-softmmu/monitor.o
  CC      x86_64-softmmu/memory.o
  CC      aarch64-softmmu/gdbstub.o
  CC      aarch64-softmmu/balloon.o

/tmp/qemu-test/src/fpu/softfloat.c: In function 'addsub_floats':
/tmp/qemu-test/src/fpu/softfloat.c:727:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'mul_floats':
/tmp/qemu-test/src/fpu/softfloat.c:844:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'div_floats':
/tmp/qemu-test/src/fpu/softfloat.c:1172:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_int_and_pack':
/tmp/qemu-test/src/fpu/softfloat.c:1384:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_uint_and_pack':
/tmp/qemu-test/src/fpu/softfloat.c:1481:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_int':
/tmp/qemu-test/src/fpu/softfloat.c:1284:24: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]

                 a.frac += inc;
                        ^~
/tmp/qemu-test/src/fpu/softfloat.c:1249:16: error: 'one' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             if (one) {
                ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_canonical':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'minmax_floats':
/tmp/qemu-test/src/fpu/softfloat.c:1745:18: error: 'b_exp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             bool a_less = a_exp < b_exp;
                  ^~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:1745:18: error: 'a_exp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
cc1: all warnings being treated as errors
make[1]: *** [/tmp/qemu-test/src/rules.mak:66: fpu/softfloat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
  CC      aarch64-softmmu/ioport.o
  CC      aarch64-softmmu/numa.o
  CC      aarch64-softmmu/qtest.o
  CC      aarch64-softmmu/memory.o
  CC      aarch64-softmmu/memory_mapping.o
  CC      aarch64-softmmu/dump.o
  CC      aarch64-softmmu/migration/ram.o
make: *** [Makefile:478: subdir-x86_64-softmmu] Error 2
make: *** Waiting for unfinished jobs....
  CC      aarch64-softmmu/accel/accel.o
  CC      aarch64-softmmu/accel/stubs/hax-stub.o
  CC      aarch64-softmmu/accel/stubs/hvf-stub.o
  CC      aarch64-softmmu/accel/stubs/whpx-stub.o
  CC      aarch64-softmmu/accel/stubs/kvm-stub.o
  CC      aarch64-softmmu/accel/tcg/tcg-all.o

/tmp/qemu-test/src/fpu/softfloat.c: In function 'addsub_floats':
/tmp/qemu-test/src/fpu/softfloat.c:727:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'mul_floats':
/tmp/qemu-test/src/fpu/softfloat.c:844:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'div_floats':
/tmp/qemu-test/src/fpu/softfloat.c:1172:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_int_and_pack':
/tmp/qemu-test/src/fpu/softfloat.c:1384:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_uint_and_pack':
/tmp/qemu-test/src/fpu/softfloat.c:1481:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_int':
/tmp/qemu-test/src/fpu/softfloat.c:1284:24: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]

                 a.frac += inc;
                        ^~
/tmp/qemu-test/src/fpu/softfloat.c:1249:16: error: 'one' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             if (one) {
                ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'minmax_floats':
/tmp/qemu-test/src/fpu/softfloat.c:1745:18: error: 'b_exp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             bool a_less = a_exp < b_exp;
                  ^~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:1745:18: error: 'a_exp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_canonical':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~

cc1: all warnings being treated as errors
make[1]: *** [/tmp/qemu-test/src/rules.mak:66: fpu/softfloat.o] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:478: subdir-aarch64-softmmu] Error 2 Traceback (most recent call last):
File "./tests/docker/docker.py", line 456, in <module>

    sys.exit(main())

File "./tests/docker/docker.py", line 453, in main
return args.cmdobj.run(args, argv)
File "./tests/docker/docker.py", line 261, in run
return Docker().run(argv, args.keep, quiet=args.quiet)
File "./tests/docker/docker.py", line 229, in run
quiet=quiet)
File "./tests/docker/docker.py", line 147, in _do_check
return subprocess.check_call(self._command + cmd, **kwargs)
File "/usr/lib64/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'run', '--label', 'com.qemu.instance.uuid=dff201fe43e111e8984252540069c830', '-u', '0', '--security-opt', 'seccomp=unconfined', '--rm', '--net=none', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=8', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/root/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2 make[1]: *** [tests/docker/Makefile.include:131: docker-run] Error 1
make[1]: Leaving directory '/var/tmp/patchew-tester-tmp-qv4p4631/src'
make: *** [tests/docker/Makefile.include:165: docker-run-test-mingw@fedora] Error 2

real 6m5.400s
user 0m5.096s
sys 0m3.730s
=== OUTPUT END ===

Test command exited with code: 2

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]

#82 lore raw
In reply to Alex Bennée
Quoted 4 lines · Alex Bennée

I did start playing with crosstool-ng and Linaro's own ABE scripts but realised this could end up a massive time sync. What would be really helpful is if the respective maintainers could encode their EXACT STEPS for building their cross compilers into some docker recipes.

Building a cross-compiler with an existing libc binary is easy. Building a cross-compiler without a libc is harder, and involves a bit of two-stepping to get things right.

For someone who has never used docker, what's a recipe look like? Just a shell script that gets run within a container? Is there an opportunity to wget or local copy an existing libc tarball/package to put us into the easy case?

Quoted 7 lines

Finally the end of the series has me adding Emilio's fp-test to the per-target builds. Unfortunately although some osdep.h and softfloat.c fiddling allows us to build in most cases I still can't build for example an i386 fp-test on an x86_64 host using the cross compiler as it triggers incompatibilities with config-host.h - in this case Int128 support. Currently I just hackily disable fp-test for non-64 bit platforms.

It seems I can't even build fp-test for x86_64.

CROSS-BUILD x86_64 guest-tests with cc
In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
/home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
config-host.h: No such file or directory

 #include "config-host.h"
          ^~~~~~~~~~~~~~~

compilation terminated.

r~

#83 lore raw
Quoted 9 lines

It seems I can't even build fp-test for x86_64.

CROSS-BUILD x86_64 guest-tests with cc
In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
/home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
config-host.h: No such file or directory

 #include "config-host.h"
          ^~~~~~~~~~~~~~~

compilation terminated.

Cross builds when target==host arch are often broken because the less tested. Probably because it is easier to directly use the host, yet fully configured.

#84 lore raw
In reply to Richard Henderson
Quoted 6 lines · Richard Henderson
Quoted 4 lines · Alex Bennée

I did start playing with crosstool-ng and Linaro's own ABE scripts but realised this could end up a massive time sync. What would be really helpful is if the respective maintainers could encode their EXACT STEPS for building their cross compilers into some docker recipes.

Quoted 8 lines

Building a cross-compiler with an existing libc binary is easy. Building a cross-compiler without a libc is harder, and involves a bit of two-stepping to get things right.

For someone who has never used docker, what's a recipe look like? Just a shell script that gets run within a container? Is there an opportunity to wget or local copy an existing libc tarball/package to put us into the easy case?

Yes, it's just a bunch of steps run from a known starting state. Our debian-bootstrap.docker is probably the most complex as there is a seed step before you enter the container to run the setup steps.

If you already have a built script for your compilers converting it to docker is fairly trivial.

Quoted 11 lines
Quoted 8 lines

Finally the end of the series has me adding Emilio's fp-test to the per-target builds. Unfortunately although some osdep.h and softfloat.c fiddling allows us to build in most cases I still can't build for example an i386 fp-test on an x86_64 host using the cross compiler as it triggers incompatibilities with config-host.h - in this case Int128 support. Currently I just hackily disable fp-test for non-64 bit platforms.

It seems I can't even build fp-test for x86_64.

Quoted 7 lines

CROSS-BUILD x86_64 guest-tests with cc
In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
/home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
config-host.h: No such file or directory

 #include "config-host.h"
          ^~~~~~~~~~~~~~~

compilation terminated.

Weird as that works for me. Has configure been run? Are you in a external build dir?

Quoted 3 lines

r~

--
Alex Bennée

#85 lore raw
Quoted 2 lines · Alex Bennée

Richard Henderson <[email protected]> writes:

(snip)

Quoted 18 lines
Quoted 10 lines
Quoted 7 lines

Finally the end of the series has me adding Emilio's fp-test to the per-target builds. Unfortunately although some osdep.h and softfloat.c fiddling allows us to build in most cases I still can't build for example an i386 fp-test on an x86_64 host using the cross compiler as it triggers incompatibilities with config-host.h - in this case Int128 support. Currently I just hackily disable fp-test for non-64 bit platforms.

It seems I can't even build fp-test for x86_64.

Quoted 7 lines

CROSS-BUILD x86_64 guest-tests with cc
In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
/home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
config-host.h: No such file or directory

 #include "config-host.h"
          ^~~~~~~~~~~~~~~

compilation terminated.

Quoted 2 lines

Weird as that works for me. Has configure been run? Are you in a external build dir?

config-host.h is generated when running "make" (to build whatever targets were configured), so the recipe in tests/fp expects that to have happened. I think this is commonly expected when building tests/, but if I'm mistaken we could fix it by adding a rule for config-host.h as a prerequisite.

		E.
#86 lore raw
In reply to Alex Bennée
Quoted 10 lines · Alex Bennée
Quoted 9 lines

It seems I can't even build fp-test for x86_64.

CROSS-BUILD x86_64 guest-tests with cc
In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
/home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
config-host.h: No such file or directory

 #include "config-host.h"
          ^~~~~~~~~~~~~~~

compilation terminated.

Quoted 2 lines

Weird as that works for me. Has configure been run? Are you in a external build dir?

Yes to both -- configure and build completed in an external build dir.

r~

#89 lore raw
In reply to Alex Bennée
This series seems to have some coding style problems. See output below for more information:

Hi,

This series seems to have some coding style problems. See output below for more information:

Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do

    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))

done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
t [tag update] patchew/[email protected] -> patchew/[email protected]
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
2cf210de25 tests: fp-test add fcvt support (!INCOMPLETE WIP) c59ace380c tests/tcg: disable fp-test for 32 bit (HACK!) 3f6d6b37b3 tests/tcg/multiarch: add fp-test into multiarch set a3942903d8 tests: add fp-test, a floating point test suite 93637ad78f softfloat: do not include glib headers
6cee90fce9 osdep: disable glib-compat.h include with QEMU_NO_GLIB 3f76b148e3 tests/Makefile.include: add (clean-)check-tcg targets 2b09de310b Makefile.target: add (clean-)guest-tests targets 64f32a347c tests/tcg/Makefile: update to be called from Makefile.target b6dd1c4257 tests/tcg: enable building for ppc64
ed516c56c9 tests/tcg: enable building for s390x
af045c00c8 tests/tcg/mips: include common mips hello-mips 9c8573e3ad tests/tcg: enable building for MIPS
801dbba4ae tests/tcg: move MIPS specific tests into subdir 842030aa82 tests/tcg/aarch64: userspace system register test a64644b63b tests/tcg/aarch64: add fcvt test cases for AArch64 1c9bd71293 tests/tcg/aarch64: add Makefile.target
c52e2f1c49 tests/tcg/arm: fix up test-arm-iwmmxt test d14bdceb14 tests/tcg: move ARM specific tests into subdir a929743e6c tests/tcg/i386/test-i386: fix printf format 1ab161b2e5 tests/tcg/i386/test-i386: use modern vector_size attributes 4a0590ba5e tests/tcg/x86_64: add Makefile.target
7732ca011f tests/tcg/i386: disable i386 version of test-i386-ssse f95c12d39d tests/tcg/i386: fix test-i386-fprem
40782bcd69 tests/tcg/i386: fix test-i386
ea0cc36d3a tests/tcg/i386: Build fix for hello-i386 f86342742d tests/tcg: enable building for i386
c5ddd1785c docker: Add fedora-i386-cross image
58d31ffc85 tests/tcg: move i386 specific tests into subdir 0f322b2f8a tests/tcg/multiarch: enable additional linux-test tests d2b649419a tests/tcg/multiarch: Build fix for linux-test 7c270a5818 tests/tcg: move architecture independent tests into subdir fe04f2a58e docker: Makefile.include introduce DOCKER_SCRIPT 387090cde5 docker: allow "cc" command to run in user context cc7e3225c2 docker: extend "cc" command to accept compiler b2098ca1ca docker: Add "cc" subcommand
307a60adf2 Makefile: Rename TARGET_DIRS to TARGET_LIST d6157c5262 configure: set cross_cc_FOO for host compiler 2afce5fc4d configure: allow user to specify --cross-cc-cflags-foo= efd2616b8e configure: move i386_cc to cross_cc_i386 887941a91c configure: add support for --cross-cc-FOO 947d99fae7 configure: add test for docker availability 7e41971dca docker: add "probe" command for configure

=== OUTPUT BEGIN ===
Checking PATCH 1/43: docker: add "probe" command for configure... Checking PATCH 2/43: configure: add test for docker availability... Checking PATCH 3/43: configure: add support for --cross-cc-FOO... Checking PATCH 4/43: configure: move i386_cc to cross_cc_i386... Checking PATCH 5/43: configure: allow user to specify --cross-cc-cflags-foo=... Checking PATCH 6/43: configure: set cross_cc_FOO for host compiler... Checking PATCH 7/43: Makefile: Rename TARGET_DIRS to TARGET_LIST... Checking PATCH 8/43: docker: Add "cc" subcommand...
Checking PATCH 9/43: docker: extend "cc" command to accept compiler... Checking PATCH 10/43: docker: allow "cc" command to run in user context... Checking PATCH 11/43: docker: Makefile.include introduce DOCKER_SCRIPT... Checking PATCH 12/43: tests/tcg: move architecture independent tests into subdir... Checking PATCH 13/43: tests/tcg/multiarch: Build fix for linux-test...
ERROR: if this code is redundant consider removing it
#153: FILE: tests/tcg/multiarch/linux-test.c:323:
+#if 0

total: 1 errors, 0 warnings, 185 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 14/43: tests/tcg/multiarch: enable additional linux-test tests... Checking PATCH 15/43: tests/tcg: move i386 specific tests into subdir... Checking PATCH 16/43: docker: Add fedora-i386-cross image... Checking PATCH 17/43: tests/tcg: enable building for i386... Checking PATCH 18/43: tests/tcg/i386: Build fix for hello-i386...
ERROR: externs should be avoided in .c files
#21: FILE: tests/tcg/i386/hello-i386.c:23:
+void _start(void);

total: 1 errors, 0 warnings, 7 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 19/43: tests/tcg/i386: fix test-i386...
Checking PATCH 20/43: tests/tcg/i386: fix test-i386-fprem...
Checking PATCH 21/43: tests/tcg/i386: disable i386 version of test-i386-ssse... Checking PATCH 22/43: tests/tcg/x86_64: add Makefile.target... Checking PATCH 23/43: tests/tcg/i386/test-i386: use modern vector_size attributes... Checking PATCH 24/43: tests/tcg/i386/test-i386: fix printf format... Checking PATCH 25/43: tests/tcg: move ARM specific tests into subdir... Checking PATCH 26/43: tests/tcg/arm: fix up test-arm-iwmmxt test... Checking PATCH 27/43: tests/tcg/aarch64: add Makefile.target... Checking PATCH 28/43: tests/tcg/aarch64: add fcvt test cases for AArch64...
ERROR: space prohibited before open square bracket '['
#281: FILE: tests/tcg/aarch64/fcvt.c:244:
+ : /* no output */ : [flags] "n" (1 << 26) : "x1" );

ERROR: space prohibited before that close parenthesis ')' #281: FILE: tests/tcg/aarch64/fcvt.c:244:
+ : /* no output */ : [flags] "n" (1 << 26) : "x1" );

total: 2 errors, 0 warnings, 1587 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 29/43: tests/tcg/aarch64: userspace system register test... Checking PATCH 30/43: tests/tcg: move MIPS specific tests into subdir... Checking PATCH 31/43: tests/tcg: enable building for MIPS...
Checking PATCH 32/43: tests/tcg/mips: include common mips hello-mips... Checking PATCH 33/43: tests/tcg: enable building for s390x...
Checking PATCH 34/43: tests/tcg: enable building for ppc64...
Checking PATCH 35/43: tests/tcg/Makefile: update to be called from Makefile.target... Checking PATCH 36/43: Makefile.target: add (clean-)guest-tests targets... Checking PATCH 37/43: tests/Makefile.include: add (clean-)check-tcg targets... Checking PATCH 38/43: osdep: disable glib-compat.h include with QEMU_NO_GLIB... Checking PATCH 39/43: softfloat: do not include glib headers... Checking PATCH 40/43: tests: add fp-test, a floating point test suite...
ERROR: Macros with complex values should be enclosed in parenthesis #382: FILE: tests/fp/fp-test.c:221:

+#define PR_EXCEPTIONS(x)                                \
+        ((x) & STANDARD_EXCEPTIONS ? "" : "none"),      \
+        (((x) & float_flag_inexact)   ? "x" : ""),      \
+        (((x) & float_flag_underflow) ? "u" : ""),      \
+        (((x) & float_flag_overflow)  ? "o" : ""),      \
+        (((x) & float_flag_divbyzero) ? "z" : ""),      \

+ (((x) & float_flag_invalid) ? "i" : "")

ERROR: consider using qemu_strtoul in preference to strtoul #844: FILE: tests/fp/fp-test.c:683:
+ significand = strtoul(&p[3], &pos, 16);

ERROR: consider using qemu_strtol in preference to strtol #849: FILE: tests/fp/fp-test.c:688:
+ exponent = strtol(pos, &pos, 10) + 127;

ERROR: consider using qemu_strtoul in preference to strtoul #874: FILE: tests/fp/fp-test.c:713:
+ significand = strtoul(&p[3], &pos, 16);

ERROR: consider using qemu_strtol in preference to strtol #879: FILE: tests/fp/fp-test.c:718:
+ exponent = strtol(pos, &pos, 10) + 1023;

ERROR: consider using qemu_strtof in preference to strtof #898: FILE: tests/fp/fp-test.c:737:
+ float f = strtof(p, &pos);

ERROR: externs should be avoided in .c files
#1187: FILE: tests/fp/fp-test.c:1026:
+ int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,

total: 7 errors, 0 warnings, 1233 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 41/43: tests/tcg/multiarch: add fp-test into multiarch set... Checking PATCH 42/43: tests/tcg: disable fp-test for 32 bit (HACK!)... Checking PATCH 43/43: tests: fp-test add fcvt support (!INCOMPLETE WIP)...
ERROR: consider using qemu_strtoull in preference to strtoull #591: FILE: tests/fp/fp-test.c:1150:
+ result = strtoull(p, &end, 16);

total: 1 errors, 0 warnings, 644 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]

#90 lore raw
In reply to Alex Bennée
Quoted 3 lines · Alex Bennée

What would be really
helpful is if the respective maintainers could encode their EXACT STEPS for building their cross compilers into some docker recipes.

I've just re-built my alphaev67 cross-environment and recorded everything.

Since the script begins with rebuilding glibc, it assumes you *already* have a cross-compiler. If you don't have that, then you start in the middle of the script with the GCC build. But in that case you must have the sysroot.tar.gz that the first half just created.

Starting without that seed tarball is hard, as previously mentioned. For better supported platforms than alpha you can typically pull the same files from e.g. debian packages or a gentoo stage3 tarball.

While I've used git gcc/binutils/glibc, because I had them handy, of course everything would work equally well using release tarballs for each project.

Let me know if you have any questions re cross-tools.

r~

#91 lore raw
Quoted 11 lines · Richard Henderson
Quoted 3 lines · Alex Bennée

What would be really
helpful is if the respective maintainers could encode their EXACT STEPS for building their cross compilers into some docker recipes.

I've just re-built my alphaev67 cross-environment and recorded everything.

Since the script begins with rebuilding glibc, it assumes you *already* have a cross-compiler. If you don't have that, then you start in the middle of the script with the GCC build. But in that case you must have the sysroot.tar.gz that the first half just created.

Could you send me the sysroot.tar.gz?

Quoted 4 lines

Starting without that seed tarball is hard, as previously mentioned. For better supported platforms than alpha you can typically pull the same files from e.g. debian packages or a gentoo stage3 tarball.

Hmm I was hoping I could use --without-sysroot to build a gcc just for building glibc and then re-build gcc once glibc was boot-strapped. But that doesn't seem to work...

Maybe for alpha we just have to accept there is a blob of sysroot to get the build going? Of course we should probably host that blob on qemu's servers somewhere...

Quoted 7 lines

While I've used git gcc/binutils/glibc, because I had them handy, of course everything would work equally well using release tarballs for each project.

Let me know if you have any questions re cross-tools.

r~

--
Alex Bennée

#92 lore raw
Quoted 8 lines · Alex Bennée
Quoted 6 lines · Richard Henderson
Quoted 3 lines · Alex Bennée

What would be really
helpful is if the respective maintainers could encode their EXACT STEPS for building their cross compilers into some docker recipes.

I've just re-built my alphaev67 cross-environment and recorded everything.

<snip>

Quoted 11 lines
Quoted 3 lines

Starting without that seed tarball is hard, as previously mentioned. For better supported platforms than alpha you can typically pull the same files from e.g. debian packages or a gentoo stage3 tarball.

Hmm I was hoping I could use --without-sysroot to build a gcc just for building glibc and then re-build gcc once glibc was boot-strapped. But that doesn't seem to work...

Maybe for alpha we just have to accept there is a blob of sysroot to get the build going? Of course we should probably host that blob on qemu's servers somewhere...

New plan - Debian Sid has gcc-alpha-linux-gnu on account of the unofficial Debian Alpha port.

--
Alex Bennée