* [RFC PATCH] configure: remove all dependencies on a (re)configure
@ 2020-07-08 17:53 Alex Bennée
2020-07-10 19:19 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2020-07-08 17:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Alex Bennée
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>
---
configure | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index d2d93ae51e47..81ef123fb187 100755
--- a/configure
+++ b/configure
@@ -1950,23 +1950,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"
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] configure: remove all dependencies on a (re)configure
2020-07-08 17:53 [RFC PATCH] configure: remove all dependencies on a (re)configure Alex Bennée
@ 2020-07-10 19:19 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2020-07-10 19:19 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
On 7/8/20 10:53 AM, 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>
> ---
> configure | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-10 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08 17:53 [RFC PATCH] configure: remove all dependencies on a (re)configure Alex Bennée
2020-07-10 19:19 ` Richard Henderson
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).