From owner-freebsd-stable@FreeBSD.ORG Thu Mar 24 10:36:17 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DB8816A4CE; Thu, 24 Mar 2005 10:36:17 +0000 (GMT) Received: from raven.ravenbrook.com (raven.ravenbrook.com [193.82.131.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46E7043D3F; Thu, 24 Mar 2005 10:36:16 +0000 (GMT) (envelope-from nb@ravenbrook.com) Received: from thrush.ravenbrook.com (thrush.ravenbrook.com [193.112.141.145]) j2OAa7uo093387; Thu, 24 Mar 2005 10:36:07 GMT (envelope-from nb@ravenbrook.com) Received: from thrush.ravenbrook.com (localhost [127.0.0.1]) j2OAa5rB090610; Thu, 24 Mar 2005 10:36:06 GMT (envelope-from nb@thrush.ravenbrook.com) From: Nick Barnes To: Bruce Evans In-Reply-To: <20050324182524.J97436@delplex.bde.org> from Bruce Evans of "Thu, 24 Mar 2005 19:31:14 +1100" Date: Thu, 24 Mar 2005 10:36:05 +0000 Message-ID: <90609.1111660565@thrush.ravenbrook.com> Sender: nb@ravenbrook.com cc: freebsd-stable@freebsd.org cc: Vinod Kashyap cc: freebsd-amd64@freebsd.org Subject: Re: undefined reference to `memset' X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2005 10:36:17 -0000 At 2005-03-24 08:31:14+0000, Bruce Evans writes: > what is gcc to do when -fno-builtin tells it to turn off its > builtins and -ffreestanding tells it that the relevant interfaces > might not exist in the library? Plainly, GCC should generate code which fills the array with zeroes. It's not obliged to generate code which calls memset (either builtin or in a library). If it knows that it can do so, then fine. Otherwise it must do it the Old Fashioned Way. So this is surely a bug in GCC. Nick B, who used to write compilers for a living