From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org,
richard.henderson@linaro.org, robhenry@microsoft.com,
aaron@os.amperecomputing.com, cota@braap.org,
peter.puhov@linaro.org, kuhn.chenqun@huawei.com,
aurelien@aurel32.net
Subject: Re: [PATCH v2 01/11] configure: remove all dependencies on a (re)configure
Date: Mon, 13 Jul 2020 22:15:19 +0200 [thread overview]
Message-ID: <5de536a4-bef7-c8bc-e6a1-dbaf95e58d51@amsat.org> (raw)
In-Reply-To: <20200713200415.26214-2-alex.bennee@linaro.org>
On 7/13/20 10:04 PM, Alex Bennée wrote:
> The previous code was brittle and missed cases such as the mipn32
> variants which for some reason has the 64 bit syscalls. This leads to
> a number of binary targets having deps lines like:
>
> all.clang-sanitizer/mipsn32el-linux-user/linux-user/signal.d
> 140: /home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h \
> 455:/home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h:
>
> all.clang-sanitizer/mipsn32el-linux-user/linux-user/syscall.d
> 146: /home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h \
> 485:/home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h:
>
> which in turn would trigger the re-generation of syscall_nr.h in the
> source tree (thanks to generic %/syscall_nr.h rules). The previous
> code attempts to clean it out but misses edge cases but fails.
>
> After spending a day trying to understand how this was happening I'm
> unconvinced that there are not other such breakages possible with this
> "caching". As we add more auto-generated code to the build it is likely
> to trip up again. Apply a hammer to the problem.
>
> Fixes: 91e5998f18 (which fixes 5f29856b852d and 4d6a835dea47)
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> configure | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/configure b/configure
> index bc3b9ad931..e1de2f5b24 100755
> --- a/configure
> +++ b/configure
> @@ -1955,23 +1955,20 @@ EOF
> exit 0
> fi
>
> -# Remove old dependency files to make sure that they get properly regenerated
> -rm -f */config-devices.mak.d
> -
> # Remove syscall_nr.h to be sure they will be regenerated in the build
> # directory, not in the source directory
> for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \
> i386 x86_64 mips mips64 ; do
> # remove the file if it has been generated in the source directory
> rm -f "${source_path}/linux-user/${arch}/syscall_nr.h"
> - # remove the dependency files
> - for target in ${arch}*-linux-user ; do
> - test -d "${target}" && find "${target}" -type f -name "*.d" \
> - -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \
> - -print | while read file ; do rm "${file}" "${file%.d}.o" ; done
> - done
> done
>
> +# Clean out all old dependency files. As more files are generated we
> +# run the risk of old dependencies triggering generation in the wrong
> +# places. Previous brittle attempts to be surgical tend to miss edge
> +# cases leading to wasted time and much confusion.
> +find -type f -name "*.d" -exec rm -f {} \;
> +
> if test -z "$python"
> then
> error_exit "Python not found. Use --python=/path/to/python"
>
next prev parent reply other threads:[~2020-07-13 20:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 20:04 [PATCH v2 00/11] misc fixes for rc0 (docker, plugins, softfloat) Alex Bennée
2020-07-13 20:04 ` [PATCH v2 01/11] configure: remove all dependencies on a (re)configure Alex Bennée
2020-07-13 20:15 ` Philippe Mathieu-Daudé [this message]
2020-07-13 20:04 ` [PATCH v2 02/11] tests/docker: Remove the libssh workaround from the ubuntu 20.04 image Alex Bennée
2020-07-13 20:04 ` [PATCH v2 03/11] docker.py: fix fetching of FROM layers Alex Bennée
2020-07-13 20:04 ` [PATCH v2 04/11] fpu/softfloat: fix up float16 nan recognition Alex Bennée
2020-07-13 20:04 ` [PATCH v2 05/11] tests/plugins: don't unconditionally add -Wpsabi Alex Bennée
2020-07-14 5:31 ` Thomas Huth
2020-07-13 20:04 ` [PATCH v2 06/11] cputlb: ensure we save the IOTLB data in case of reset Alex Bennée
2020-07-13 21:58 ` Richard Henderson
2020-07-18 20:51 ` Emilio G. Cota
2020-07-13 20:04 ` [PATCH v2 07/11] plugins: expand the bb plugin to be thread safe and track per-cpu Alex Bennée
2020-07-13 20:04 ` [PATCH v2 08/11] docs/devel: fix grammar in multi-thread-tcg Alex Bennée
2020-07-13 22:01 ` Richard Henderson
2020-07-14 5:41 ` Thomas Huth
2020-07-14 10:20 ` Philippe Mathieu-Daudé
2020-07-13 20:04 ` [PATCH v2 09/11] hw/virtio/pci: include vdev name in registered PCI sections Alex Bennée
2020-07-14 9:07 ` Michael S. Tsirkin
2020-07-14 9:49 ` Philippe Mathieu-Daudé
2020-07-13 20:04 ` [PATCH v2 10/11] plugins: add API to return a name for a IO device Alex Bennée
2020-07-13 22:04 ` Richard Henderson
2020-07-13 20:04 ` [PATCH v2 11/11] plugins: new hwprofile plugin Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5de536a4-bef7-c8bc-e6a1-dbaf95e58d51@amsat.org \
--to=f4bug@amsat.org \
--cc=aaron@os.amperecomputing.com \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=cota@braap.org \
--cc=fam@euphon.net \
--cc=kuhn.chenqun@huawei.com \
--cc=peter.puhov@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=robert.foley@linaro.org \
--cc=robhenry@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).