From owner-cvs-src@FreeBSD.ORG Sat Jun 14 00:48:57 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0BDF37B401; Sat, 14 Jun 2003 00:48:57 -0700 (PDT) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29C9043F75; Sat, 14 Jun 2003 00:48:57 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (210.50.218.177) by smtp01.syd.iprimus.net.au (7.0.015) id 3EDD516E002C553A; Sat, 14 Jun 2003 17:48:55 +1000 Received: by dilbert.robbins.dropbear.id.au (Postfix, from userid 1000) id 09A0DC911; Sat, 14 Jun 2003 17:40:29 +1000 (EST) Date: Sat, 14 Jun 2003 17:40:29 +1000 From: Tim Robbins To: Peter Wemm Message-ID: <20030614174029.A41074@dilbert.robbins.dropbear.id.au> References: <20030614115039.A30692@dilbert.robbins.dropbear.id.au> <20030614070135.C2AEC2A8C1@canning.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030614070135.C2AEC2A8C1@canning.wemm.org>; from peter@wemm.org on Sat, Jun 14, 2003 at 12:01:35AM -0700 cc: cvs-src@FreeBSD.ORG cc: src-committers@FreeBSD.ORG cc: cvs-all@FreeBSD.ORG cc: Dag-Erling Smorgrav Subject: Re: cvs commit: src/share/mk bsd.sys.mk X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2003 07:48:58 -0000 On Sat, Jun 14, 2003 at 12:01:35AM -0700, Peter Wemm wrote: > Tim Robbins wrote: > > On Sat, Jun 14, 2003 at 12:39:33AM +0200, Dag-Erling Smorgrav wrote: > > > > > Peter Wemm writes: > > > > Log: > > > > We cannot use c99 on amd64 either due to lack of alloca(). libc:strpti > me() > > > > uses alloca() and alloca is impossible to implement as a callable funct > ion > > > > on amd64. It has to be a compiler builtin. Note that the bigger probl > em > > > > is that libc is not c99 clean internally. > > > > > > #define alloca(sz) __builtin_alloca(sz) > > > > That would be fine in the __GNUC__ >= 2 && __BSD_VISIBLE case. > > > > For the other cases, I think we should also take the alloca() implementation > > from contrib/amd/libamu/alloca.c and throw out lib/libc/i386/gen/alloca.S. > > That way we get GCC's fast and conventional alloca() implementation for > > !CSTD=c?9 programs, and a slower alloca() that uses the heap and sometimes > > leaks memory for CSTD=c?9 programs (and programs that are compiled with > > non-GCC compilers without their own alloca() implementation). > > We really really dont want to use that alloca.c except as an absolute last > resort. I mean Really. It is Nasty. I would rather that we removed alloca() > entirely from the tree rather than use alloca.c by default for any of our > released platforms. I agree that it's very nasty because it will create memory leaks that are difficult to track down. I don't want any platform to use alloca.c by default, I just thought it might be useful in case someone compiles with -std=c?9 then #undef's alloca, or uses (alloca)(x) instead of alloca(x). Tim