Determine if a kernel is built with a specific option?
Andrew Brampton
brampton+freebsd-hackers at gmail.com
Mon Jan 12 08:27:12 PST 2009
2009/1/12 Giorgos Keramidas <keramida at ceid.upatras.gr>:
> On Mon, 12 Jan 2009 14:56:21 +0000, "Andrew Brampton" <brampton+freebsd-hackers at gmail.com> wrote:
>> If you were going to do this, would you make it a configure flag... ie
>> --enable-polling... That way it doesn't matter if the build box is
>> different?
>
> If both choices are available (i.e. no header files are missing, no
> link-time libraries are unavailable, and so on), I'd probably make it a
> runtime option:
That is the problem, if polling is enabled there are some symbols
which are required which are unavailable if running on a GENERIC
kernel. By turning off polling, different #defines are used in the
code, removing any calls to the kernel polling functions. So as much
as I was like to make this a runtime option, I don't think I can.
>
> * A configure-time flag to set the 'default' and
>
> * A runtime option to explicitly specify the current preference when
> the program runs.
>
> This seems a bit more flexible, and does not require an expensive ``go
> back to your vendor, and ask for a special build-time option'' cycle to
> test different setups when a field installation is done.
>
Thanks to everyone that has replied. I think I'm just going to make
this a configure flag, and if the target system doesn't have a
suitable kernel then the software (or kernel) will have to be rebuilt.
thanks for your wisdom
Andrew
More information about the freebsd-hackers
mailing list