From owner-freebsd-current Wed Mar 19 21:13: 4 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00B0F37B401 for ; Wed, 19 Mar 2003 21:13:02 -0800 (PST) Received: from web21511.mail.yahoo.com (web21511.mail.yahoo.com [66.163.169.50]) by mx1.FreeBSD.org (Postfix) with SMTP id 89FCE43FA3 for ; Wed, 19 Mar 2003 21:13:01 -0800 (PST) (envelope-from rmhlldr@yahoo.co.uk) Message-ID: <20030320051301.16790.qmail@web21511.mail.yahoo.com> Received: from [194.44.215.148] by web21511.mail.yahoo.com via HTTP; Thu, 20 Mar 2003 05:13:01 GMT Date: Thu, 20 Mar 2003 05:13:01 +0000 (GMT) From: =?iso-8859-1?q?RMH?= Reply-To: alasir@supereva.it Subject: Re: buildkernel and gcc2 To: current@freebsd.org In-Reply-To: <20030319223620.57c600b5.kabaev@bellatlantic.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Thu, Mar 20, 2003 at 03:21:13AM +0000, RMH wrote: > > I have to note that currently it isn't really possible to compile > > -CURRENT by GCC 2.95.x in the way it has to be. Buildkernel is > > broken in several places by different means, however GCC 3.2.x > > passes them successfully, even with no warnings shown. > > Huh?? What do you mean "in the way it has to be"? We purposely upgraded > from GCC 2.95.x to 3.2.x and part of that upgrade gave us C99 features. Well, I probably had to say "in the way it could [should] be". I've passed through a list of C99 features, but only two things I've seen implemented in kernel: a) macros with a variable number of arguments; b) preprocessor arithmetic done in intmax_t/uintmax_t; Maybe I've missed a couple of extra ones, but anyway I suppose they don't make so much difference to put GCC2 into unsupported list. > > > Namely, first problem is in bsd.kern.mk, because of compiler flag > > -mno-align-long-strings, which is not supported by 2.95.x. Should > > be autodetected. > > The patch for doing this? Since the vast majority of 5-CURRENT's users > are using the stock 3.2.x compiler, making the kernel build with gcc > 2.95.x isn't going to be high on our list of things to do. However, this > doesn't prevent you from making a committable patch. It isn't a problem to export an extra variable and make it known to bsd.kern.mk; the question is, do we want GCC2 to be a supported compiler for -CURRENT or not? If not, all efforts to that way make no sense... > > > Second problem is periods in two macros of sys/eventhandler.h, > > that broke depend: > > > > #define EVENTHANDLER_FAST_INVOKE(name, ...) > > #define EVENTHANDLER_INVOKE(name, ...) > > > > Might be fixed in the way like: > > > > #define EVENTHANDLER_FAST_INVOKE(name) > > #define EVENTHANDLER_INVOKE(name, arg1, arg2, arg3) > > We can certainly put in a #ifdef detection on the GCC version. Please > submit a patch for this and the other nits you point out. Actually I've explained it all before. Those two macros with variable arguments have to be changed towards fixed arguments, __VA_ARGS__ should be replaced with some substitute (out of my present knowledge, so I used NULL), plus "%j" and [u]intmax_t. In other words, #ifdef detection isn't enough, we should decide are C99 features so important to break compatibility, or we can live without them. --- Regards, Rhett __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message