Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 91640 invoked from network); 7 Oct 2005 18:01:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Oct 2005 18:01:15 -0000 Received: (qmail 60294 invoked by uid 500); 7 Oct 2005 18:01:09 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 60239 invoked by uid 500); 7 Oct 2005 18:01:09 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 60228 invoked by uid 99); 7 Oct 2005 18:01:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2005 11:01:09 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.39.12.10] (HELO deck1210.hostdeck.com) (212.39.12.10) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Oct 2005 11:01:11 -0700 Received: (qmail 23051 invoked from network); 7 Oct 2005 20:00:39 +0200 Received: from host70-41.pool82106.interbusiness.it (HELO fatti.com) (82.106.41.70) by deck1210.hostdeck.com with SMTP; 7 Oct 2005 20:00:38 +0200 Message-ID: <4346B809.1090209@fatti.com> Date: Fri, 07 Oct 2005 20:01:45 +0200 From: Enrico Migliore Reply-To: enrico.migliore@fatti.com Organization: - User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: opinions on structure packing in C? References: <4120051057161659260@earthlink.net> <8957062C-C689-47FC-A8D8-AD850232151C@apache.org> In-Reply-To: <8957062C-C689-47FC-A8D8-AD850232151C@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > Why would people want to recompile libc? > > geir > > On Oct 7, 2005, at 12:16 PM, Dan Lydick wrote: > >> >> It seems that not all versions of 'libc' are compiled >> with the same flags. Furthermore, the edition that I >> am using (GCC 3.3.3 on Solaris 9) apparently does not >> use all the same flags all the way around. I am >> suspicious of this because I was able to compile >> everything but code that used fprintf(3) and sprintf(3) >> with -fpack-struct, yet had to compile code that >> invoked those library(3) calls _without_ it! I am >> really interested to see what other permutations of >> this problem we find, and what solutions might present >> themselves. >> >> Probably making _absolutely_ sure that this problem >> goes away with a recompile of 'libc' is a very good >> idea, whether considering optimization or not. But >> optimization itself is a long way down the road on >> the code I put together. I still have one module >> that I'm finishing up, which Geir is aware of. But >> let's keep this 'libc' question on the table because >> surely other people are going to run into it when >> they look at the code and try compiling. >> >> >> Dan Lydick >> >> Hi, I've been writing code for embedded systems for quite a while and faced many different kind of problems when mixing my code with someone else's libraries. The only way out to those problems was compiling my code with the same set of flags of the library. Since we got GNU libc code, my suggestion is, for each architecture, compile _ALL_ the C code with the same set of C flags, including the libc. In this way, the libc and the VM will be a monolithic executable which will not call the libc functions installed in the system. Yet, we will be free of optimizing the code as we want. Enrico