[ofa-general] OFED 1.4's autoconf.h conflicting with kernel
Brian J. Murrell
brian at sun.com
Fri Jan 23 12:01:42 PST 2009
On Fri, 2009-01-23 at 11:31 -0800, Jeff Becker wrote:
> I put it in, because I thought it would fix some trouble configuring
> sysctls and rpc debugging properly.
Certainly, no argument there.
> I can check again to see if it's
> really needed.
I don't have a problem with enabling of nfsrdma enabling that
CONFIG_SYSCTL.
My issue is with disabling of config items.
In fact I've been scratching my brain trying to figure out this
linux/autoconf.h stuff is supposed to work with third party modules.
Here's my use case... I've built a kernel, now I build kernel-ib[-devel]
against it with some chosen configuration items. Let's say for
argument's sake I have chosen to disable nfsrdma in the build.
Now I want to build another module which wants to use the OFED stack.
It needs to pick up the OFED headers, of course, so I put:
-I/usr/src/ofa_kernel/include/ at the beginning of my include search
path -- because I want my module to find the new OFED headers before any
that might be in my kernel source tree, yes?
So now how does a module that wants to conditionally compile code based
on a define in the kernel's linux/autoconf.h find the kernel definition
of that file? i.e.
--- module.c ---
...
#include <linux/module.h>
#include <linux/autoconf.h>
...
#ifdef CONFIG_SOMETHING_OR_OTHER
<conditional code>
#endif
}
...
----------------
When the compile command for that module has
-I/usr/src/ofa_kernel/include/ on it meaning it will
find /usr/src/ofa_kernel/include/linux/linux/autoconf.h, not the one
defined in the kernel's source pool.
Thots?
b.
More information about the general
mailing list