On Sun, 2009-09-20 at 21:04 -0700, Roland McGrath wrote:
I believe it was a specific feature request to have /lib/`uname
-r`/build
get searched. You'd have to ask around or look through old PRs for
systemtap to find the request. But I'm not comfortable changing this right
now. Keeping consistent with the depmod behavior is the sort of
excuse^H^H^H^H^H^Hstandard that I like, but we should take care to research
the past concerns of users before making a change.
I asked around and it is indeed a feature of stap:
-r /DIR
Build for kernel in given build tree. Can also be set with the
SYSTEMTAP_RELEASE environment variable.
-r RELEASE
Build for kernel in build tree /lib/modules/RELEASE/build. Can
also be set with the SYSTEMTAP_RELEASE environment variable.
So, that second case explicitly relies on searching the modules under
the 'build' subdir.
Which is a little unfortunate imho since in most normal/distro installs
there isn't actually a build tree there, but just the sources. I don't
immediately see an easy/clean way to keep this functionality and detect
that in some cases the build/sources dir doesn't need to be searched.
Maybe you could detect that there is a /lib/modules/RELEASE/kernel
subdir and then only search that, but I am not sure that is very
robust/sane.
Cheers,
Mark