On 09 Jan 2024 07:34, Tom Tromey wrote: > >>>>> "Mike" == Mike Frysinger writes: > > Mike> The lbasename function from libiberty provides the same API as this > Mike> custom function. The common/ code already made the switch, so make > Mike> the same change to the ppc code to avoid target duplication. > > When updating and rebuilding in an existing tree, some patch -- I guess > probably this one, I didn't bisect -- caused a build failure in sim/ppc > because filter_filename was missing. Removing sim/ppc/*.o and > rebuilding fixed it, but I suppose this means there is a missing > dependency somewhere. ppc/ used to generate a filter_host.c file in the output dir, and compile the .o from that. it switched to using the igen/filter_host.c in the source dir. when i've migrated code like this, i haven't left behind clean rules to delete files that only mattered to old builds since any new builds would never see that stuff. but it means bisect/incremental (re)builds across that timespan might break. i don't know what the general policy is in the tree for these cases, but it seems like we just don't bother. also a lot of sim rules rely on VPATH to locate sources. e.g. the makefiles write ppc/foo.c instead of $(srcdir)/ppc/foo.c. the only time we really use $(srcdir) is with generated files we commit to the tree. i think this pattern is standard in the binutils-gdb tree. but it also contributes to incremental (re)build failures like this. -mike