From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 12 16:27:11 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE2B01065673 for ; Mon, 12 Jan 2009 16:27:11 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 216198FC08 for ; Mon, 12 Jan 2009 16:27:10 +0000 (UTC) (envelope-from brampton@gmail.com) Received: by ewy14 with SMTP id 14so13166464ewy.19 for ; Mon, 12 Jan 2009 08:27:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=8JqoJQ4EaXiqe4a1NDU+G2eZAHQlq9Fpry3UKf5/wOo=; b=k0IYxWlimltE0W5KOnZiHJYs7mRRMLTfVMEiOl0J0ULveT6aIzlEA825pT79fxTcl/ PbHtQreHG5jrw3O4oqcJB5XyaWvQQ2CbJxjRKRKrPXNXOmRZF9WR+P2kHq8pezuwF3ta lz3sF2Tauk6yi05bSk0JQfMU3Ps6yM59JM8lE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=kleBKRuyo9NlYIV03iWc63E0RzTsJt7MsrclvzjSwu1r5tskmIura1p/yYK6/jRog9 yd5rhU7CEu8dc2bQM9PDqDll5NrKrNFbpbgY2SI3ieTEoVWIDWAIYpBOmSFLlb82HUoE Z5kBCZgVkeacyoxVmYZhc7ScV4hiIaghYLPSg= Received: by 10.210.104.20 with SMTP id b20mr322070ebc.182.1231777629902; Mon, 12 Jan 2009 08:27:09 -0800 (PST) Received: by 10.210.69.1 with HTTP; Mon, 12 Jan 2009 08:27:09 -0800 (PST) Message-ID: Date: Mon, 12 Jan 2009 16:27:09 +0000 From: "Andrew Brampton" Sender: brampton@gmail.com To: "Giorgos Keramidas" In-Reply-To: <873afolcrh.fsf@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20090112145131.GA4375@svzserv.kemerovo.su> <873afolcrh.fsf@kobe.laptop> X-Google-Sender-Auth: 61ae79905ce8642c Cc: hackers@freebsd.org, Eugene Grosbein Subject: Re: Determine if a kernel is built with a specific option? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2009 16:27:12 -0000 2009/1/12 Giorgos Keramidas : > On Mon, 12 Jan 2009 14:56:21 +0000, "Andrew Brampton" 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