Re: INCLUDE_CONFIG_FILE patches

From: Wojciech A. Koszek <wkoszek_at_freebsd.org>
Date: Mon, 20 Aug 2007 00:07:21 +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_at_FreeBSD.org
http://FreeBSD.czest.pl/dunstan/
Received on Sun Aug 19 2007 - 21:50:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:16 UTC