From owner-freebsd-current@FreeBSD.ORG Sun Aug 19 23:50:58 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2728C16A419 for ; Sun, 19 Aug 2007 23:50:58 +0000 (UTC) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by mx1.freebsd.org (Postfix) with ESMTP id A210C13C428 for ; Sun, 19 Aug 2007 23:50:57 +0000 (UTC) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.13.4/8.12.9) with ESMTP id l7K07MpF085414 for ; Mon, 20 Aug 2007 00:07:22 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.13.4/8.12.9/Submit) id l7K07Mha085413 for freebsd-current@freebsd.org; Mon, 20 Aug 2007 00:07:22 GMT (envelope-from dunstan) Date: Mon, 20 Aug 2007 00:07:21 +0000 From: "Wojciech A. Koszek" To: freebsd-current@freebsd.org Message-ID: <20070820000721.GA85364@FreeBSD.czest.pl> Mail-Followup-To: "Wojciech A. Koszek" , freebsd-current@freebsd.org References: <20070506164247.GA77786@FreeBSD.czest.pl> <20070719174847.GA5853@outcold.yadt.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <20070719174847.GA5853@outcold.yadt.co.uk> User-Agent: Mutt/1.4.2.1i X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0.2 (freebsd.czest.pl [80.48.250.4]); Mon, 20 Aug 2007 00:07:22 +0000 (UTC) Subject: Re: INCLUDE_CONFIG_FILE patches X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 23:50:58 -0000 On Thu, Jul 19, 2007 at 06:48:47PM +0100, David Taylor wrote: > On Sun, 06 May 2007, Wojciech A. Koszek wrote: > > Hello, > > > > We talked about improved INCLUDE_CONFIG_FILE work some time ago. I > > cleaned it up, and I have prepared a patch for the latest -CURRENT. > > > > It's here: > > > > http://people.freebsd.org/~wkoszek/patches/kernconf.patch > > > > If you have any suggestions, please let me know as I'd really like to > > see this patch into the tree before RELENG_7. > > Hi, I've discovered a small problem with this patch (or at least, > whatever version is in RELENG_6 as of 2007-07-18). > > If your config file contains a trigraph (in my case, I had a comment > containing "??)"), gcc will process it as a trigraph and produce a > warning, which will break the build with a confusing and unhelpful > error message in config.c. This caused no problems before the > new INCLUDE_CONFIG_FILE option (as the config file wasn't included > in the C source file). > > Not sure what the best solution is, but some kind of warning that > this can happen would perhaps save someone 30 minutes of frustration! > Alternatively, some method of escaping any potential trigraphs would > be great. Here's the patch I prepared for you: http://people.freebsd.org/~wkoszek/patches/config-trigraph.patch Apply it within src/usr.sbin/config directory: cd src/usr.sbin/config && patch < config-trigraph.patch And rebuild config(8). Please let me know whether it works for you correctly. I tested it very roughly both with and without -C flag against GENERIC and LINT configurations tweaked a little bit to contain trigraphs within comments and options containing value. Sorry for long delay in replying, Thanks for your report! -- Wojciech A. Koszek wkoszek@FreeBSD.org http://FreeBSD.czest.pl/dunstan/