Le 18/03/2020 à 21:42, Richard Henderson a écrit : > On 3/18/20 1:23 PM, Laurent Vivier wrote: >> Le 18/03/2020 à 21:17, Richard Henderson a écrit : >>> On 3/18/20 12:58 PM, Laurent Vivier wrote: >>>>> However, from the error message above, it's clear that cpu_loop.o has not >>>>> been >>>>> rebuilt properly. >>>>> >>>> >>>> In the series merged here syscall_nr.h are moved from source directory >>>> to build directory. >>>> >>>> The include path of the files is based on the dependecy files (*.d), and >>>> to force the update of this path PATCH 13 removes all the .d files that >>>> have a dependecy on the syscall_nr.h file in the source path. >>>> >>>> This is added in configure: >>>> >>>> --- a/configure >>>> +++ b/configure >>>> @@ -1887,6 +1887,17 @@ 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 ; 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 >>>> + find . -name "*.d" \ >>>> + -exec grep -q >>>> "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \ >>>> + -exec rm {} \; >>>> +done >>> ... >>>> Perhaps it removes a dependency that should trigger the rebuild of >>>> cpu_loop.o? >>> >>> Ah, yes indeed. It removes *all* dependencies for cpu_loop.o, so unless we >>> touch the cpu_loop.c source file, nothing gets done. >>> >>> I think you're trying to be too fine grained here, since the *.o file has >>> to go >>> away with the *.d file. Why not just >>> >>> make ${arch}-linux-user/clean >>> >>> ? >> >> The idea was to be able to bisect the series as the syscall_nr.h were >> added incrementally without rebuilding all the files. >> >> If I remove the loop in the configure where to add the "make >> ${arch}-linux-user/clean"? > > I don't know. Can you get an exit status out of the find? > > Another option might be > > for f in $(find ${arch}-linux-user -name '*.d' \ > -exec grep -q ${arch_syscall} \ > -print); do > rm -f $(basename $f .d).* > done > > But frankly I don't care if all of every file gets rebuilt while bisecting, it > just needs to work.
ok, thank you for your help. I'm going to resend the pull request without this series to have more time to find a solution and to test it. Thanks, Laurent