Gustavo Romero <grom...@linux.ibm.com> writes:
> Hi Alex, > > On 12/16/20 7:51 AM, Alex Bennée wrote: >> >> Gustavo Romero <grom...@linux.ibm.com> writes: >> >>> Currently if the cross compiler passed to 'configure' (--cross-cc-<arch>) >>> does >>> not exist no error happens and only later when the TCG tests are run they >>> fail >>> because the cross compiler is not set correctly. >> >> Do they? They should just skip because of a non-existing compiler and a >> failed fallback to using docker: >> >> ../../configure --disable-docs --target-list=aarch64-softmmu >> --cross-cc-aarch64=nonexisting_gcc >> >> and then cat ./tests/tcg/config-aarch64-softmmu.mak >> >> # Automatically generated by configure - do not modify >> TARGET_NAME=aarch64 >> CONFIG_SOFTMMU=y >> QEMU=/home/alex/lsrc/qemu.git/builds/bisect/qemu-system-aarch64 >> CROSS_CC_GUEST_CFLAGS= >> DOCKER_IMAGE=debian-arm64-test-cross >> DOCKER_CROSS_CC_GUEST=aarch64-linux-gnu-gcc-10 >> >> So what do you see in your failing case? > > I get the following (I don't have docker installed): > > $ ../configure --disable-docs --target-list=aarch64-softmmu > --cross-cc-aarch64=nonexisting_gcc > gromero@pub:~/git/qemu/build$ cat ./tests/tcg/config-aarch64-softmmu.mak > # Automatically generated by configure - do not modify > TARGET_NAME=aarch64 > CONFIG_SOFTMMU=y > QEMU=/home/gromero/git/qemu/build/qemu-system-aarch64 > CROSS_CC_GUEST_CFLAGS= > > $ ../configure --disable-docs --target-list=ppc64-softmmu > --cross-cc-ppc64=nonexisting_gcc > gromero@pub:~/git/qemu/build$ cat ./tests/tcg/config-ppc64-softmmu.mak > # Automatically generated by configure - do not modify > TARGET_NAME=ppc64 > CONFIG_SOFTMMU=y > QEMU=/home/gromero/git/qemu/build/qemu-system-ppc64 > CROSS_CC_GUEST_CFLAGS= > CROSS_CC_GUEST_STATIC=y > CROSS_CC_GUEST=powerpc-linux-gnu-gcc Hmm that is impressively wrong to somehow get the 32 bit compiler. But I'm still failing to replicate the problem. Could you try the following configure for a like-for-like comparison: ../../configure --disable-containers --target-list=ppc64-softmmu --cross-cc-ppc64=nonexisting_gcc which gives me: $ cat tests/tcg/config-ppc64-softmmu.mak # Automatically generated by configure - do not modify TARGET_NAME=ppc64 CONFIG_SOFTMMU=y QEMU=/home/alex/lsrc/qemu.git/builds/ppc-linux.all/qemu-system-ppc64 CROSS_CC_GUEST_CFLAGS= > > hrm It seems PPC64 is even assuming some default gcc... > > I'm at commit af3f37319c from Dec 15. Yep I'm based on that as well. > I'm wondering if tha happens because I don't have docker package installed. > > Anyway, should we at least say we're using Docker as fallback? Something like: modified tests/tcg/configure.sh @@ -255,6 +255,7 @@ for target in $target_list; do if test $got_cross_cc = no && test "$container" != no && test -n "$container_image"; then echo "DOCKER_IMAGE=$container_image" >> $config_target_mak echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak + enabled_container_compilers="$enabled_container_compilers $container_cross_cc" fi done @@ -265,3 +266,6 @@ if test -n "$enabled_cross_compilers"; then echo echo "NOTE: guest cross-compilers enabled:$enabled_cross_compilers" fi +if test -n "$enabled_container_compilers"; then + echo "NOTE: container cross-compilers enabled:$enabled_container_compilers" +fi To be honest at the moment the information is a little hidden at the top of the output. It would be nice if we could teach meson to echo it in it's nice coloured output. Paolo, Any ideas for the cleanest way to do that? -- Alex Bennée