Date: Mon, 20 Aug 2007 00:07:21 +0000 From: "Wojciech A. Koszek" <wkoszek@freebsd.org> To: freebsd-current@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE patches Message-ID: <20070820000721.GA85364@FreeBSD.czest.pl> In-Reply-To: <20070719174847.GA5853@outcold.yadt.co.uk> References: <20070506164247.GA77786@FreeBSD.czest.pl> <20070719174847.GA5853@outcold.yadt.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070820000721.GA85364>