Subject: Re: CVS commit: syssrc/sys/conf
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: source-changes
Date: 12/27/2001 23:07:26
On Thu, Dec 27, 2001 at 12:00:06AM -0500, Nathan J. Williams wrote:
> > Log Message:
> > Add -ffreestanding to kernel builds. It's not always safe to
> > use GCC's built-ins.
>
> Could you elaborate on the reasoning here? Adding -ffreestanding broke
> everything that used alloca(), which seems to include a chunk of
> cardbus, macppc kernels, and the generic ofw_subr code.
Ah. Then please add a macro that expands it to __builtin_alloca() in
libkern.h.
Anyway, simply put, using GCC built-in's is not always safe in the kernel
environment. This is especially true with GCC 3.x.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>