Adding Peter to the cc, because I just realized gcov has a maintainer :) On Fri, Jun 09, 2023 at 04:12:56PM -0700, Nick Desaulniers wrote: > On Fri, Jun 9, 2023 at 4:11 PM Nick Desaulniers <ndesaulniers@xxxxxxxxxx> wrote: > > > > On Fri, Jun 9, 2023 at 3:23 PM Kent Overstreet > > <kent.overstreet@xxxxxxxxx> wrote: > > > > > > Hello kbuild maintainers & list, > > > > > > Years ago I used to be able to specify additional CFLAGS for a specific > > > > Probably cause it's KCFLAGS ;) > > > > I used this yesterday, it works. > > > > > subdirectory on the command line, which I used for enabling gcov > > Ah, for a specific subdir? No I've not seen that, at least from the > command line. Such flags can be specified via Makefile > `subdir-ccflags-y`. Sorry, not CFLAGS, I misread my old code - it's just a make variable. >From Documentation/dev-tools/gcov.rst, you enable gcov on a specific subdirectory by editing that directory's makefile, and adding GCOV_PROFILE := y or, for a specific file within that directory, GCOV_PROFILE_main.o := y So, if appending a file to GCOV_PROFILE works, why not a path? This used to work - my old code would pass GCOV_PROFILE_fs_bcachefs=y on the make command line, but doesn't anymore. Alas I have nowhere near the make-fu to debug this, and I believe I tried to bisect this back in the day but got nowhere... :)