From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20059 invoked by alias); 2 Sep 2009 00:31:14 -0000 Received: (qmail 20049 invoked by uid 22791); 2 Sep 2009 00:31:11 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from saratoga.rkirkpat.net (HELO saratoga.rkirkpat.net) (206.196.156.29) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Sep 2009 00:31:06 +0000 Received: by saratoga.rkirkpat.net (Postfix, from userid 33) id CBA7A7180B; Tue, 1 Sep 2009 18:31:04 -0600 (MDT) From: "Bill McEnaney" To: John Carter , bd satish , gcc-help@gcc.gnu.org Subject: Re: Building my own C library X-IPAddress: 67.242.192.183 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Message-Id: <20090902003104.CBA7A7180B@saratoga.rkirkpat.net> Date: Wed, 02 Sep 2009 00:31:00 -0000 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg00018.txt.bz2 I wouldn't want to write my on Standard C Library, but I wish someone would rewrite glibc's qsort function. I may be lightning fast, but it's almost unintelligible. > On Wed, 2 Sep 2009, bd satish wrote: > > > I was trying to compile my own Standard C Library (for ex, I want to > > use my version of malloc instead of the one included in libc ). What > > command line options should I use to compile & link this code with my > > test case ? The code is compiling fine (with option -nostdinc) but I > > think linking is my problem. For one, I noticed -nostdlib and > > -nodefaultlibs but these are giving errors. > > You'll have to show the errors. > > Some that I'd expect would relate to C language infrastructure > routines that are provided by libgcc which you have probably forgotten > to provide (or never heard of til now). > > I hope you are aware their are many other ways to achieve similar > things... > > I suspect this is a classic case of we can help do what you are trying > to do... but if you told us what you are trying to do... we could > advise a _much_ better and simpler solution. > > ie. Writing your own Standard C library is almost _never_ what you > want to do. > > > John Carter Phone : (64)(3) 358 6639 > Tait Electronics Fax : (64)(3) 359 4632 > PO Box 1645 Christchurch Email : john.carter@tait.co.nz > New Zealand > > ________________________________________________________________ Please visit a saintly hero: http://www.jakemoore.org