From owner-freebsd-current Mon Oct 11 20:39:47 1999 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 687AB155B5 for ; Mon, 11 Oct 1999 20:39:43 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from d191.syd2.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id NAA22053; Tue, 12 Oct 1999 13:41:58 +1000 Date: Tue, 12 Oct 1999 13:39:28 +1000 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: nnd@mail.nsk.ru Cc: current@FreeBSD.ORG Subject: Re: kernel broken? (pcm) In-Reply-To: <199910120257.JAA80657@wint.itfs.nsk.su> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >> Such an errors results from (uncommented) kernel option ^^^^^^^^^^^ > >> > >> #makeoptions CONF_CFLAGS=-fno-builtin > > > > We have enough breakages with the _documented_ kernel options that we ^^^^^^^^^^^^ > > don't need to go hunting down oddities. :> It's well documented. -fno-builtin is a standard gcc option, and CONF_FLAGS and its use of -fno-builtin is documented in 4 lines in LINT. > Does it mean that I throw away my PR with patches to > the 'newpcm' files which add 'abs' definition and therefore > make it possible to make kernel with > > makeoptions CONF_CFLAGS=-fno-builtin ? No, some patches are needed. I think pcm should use explicit code like (x < 0 : -x : x). It only calls abs() twice. > P.S. It seems to me that this option (or its absent) can > severely influence kernel run time efficience (not in the 'abs' > case, of course ;-). I used to use it for all kernels as a side effect of putting it in /etc/make.conf so that it gets used for LINT. Any efficiency effects seem to be limited to the +-0.1% range. The only place where it is likely to make much difference is for bcopy() vs memcpy() on some machines. The builtin memcpy() can be pessimal. This is supposed to be handled by using bcopy() for large copies and memcpy() (only) for small, fix-sized copies. The builtin memcpy() tends to be better for small copies. Since using memcpy() in the kernel is correct in some cases, it is backed up by a function to handle cases where there is no inline memcpy(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message