From owner-cvs-src@FreeBSD.ORG Sat Jun 14 00:01:36 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 7824F37B404; Sat, 14 Jun 2003 00:01:36 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE45243F75; Sat, 14 Jun 2003 00:01:35 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id C2AEC2A8C1; Sat, 14 Jun 2003 00:01:35 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Tim Robbins In-Reply-To: <20030614115039.A30692@dilbert.robbins.dropbear.id.au> Date: Sat, 14 Jun 2003 00:01:35 -0700 From: Peter Wemm Message-Id: <20030614070135.C2AEC2A8C1@canning.wemm.org> 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:01:37 -0000 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'd even rather have /usr/include/alloca.h with #define alloca(n) __builtin_alloca(n) if there are namespace concerns. Autoconf knows how to look for #include , FWIW. > > and please remove CSTD?=c99 from bsd.sys.mk, it was never intended to > > be used that way. > > I agree. I think so too, or at the very least use gnu99. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5