Date: Thu, 20 Mar 2003 05:13:01 +0000 (GMT) From: =?iso-8859-1?q?RMH?= <rmhlldr@yahoo.co.uk> To: current@freebsd.org Subject: Re: buildkernel and gcc2 Message-ID: <20030320051301.16790.qmail@web21511.mail.yahoo.com> In-Reply-To: <20030319223620.57c600b5.kabaev@bellatlantic.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030320051301.16790.qmail>