Article View: gnu.gcc.bug
Article #6248Questions about using gcc
From: Bennett, Chip (KTR) ~U
Date: Tue, 26 Dec 1995 00:00
Date: Tue, 26 Dec 1995 00:00
29 lines
1891 bytes
1891 bytes
We have installed gcc 2.7.2 under SunOS 4.1.3, 5.3, and 5.4. Everything seems to be working OK, but I've read something recently that indicates we may have a problem down the road. First of all, we had problems compiling glibc 1.09, so we are not using it. However I have noticed that basic "C" libraries are still available. I am assuming that, without glibc, that gcc (with Sun's loader and assembler) is using Sun's libraries for "printf", "read", and "write", etc. Is this a correct assumption? Today, I was looking at the README file for gdbm and noticed that, for SunOS, the native "C" compiler uses a different layout, for structures on the function return stack, than gcc uses. Assuming that out copy of gcc is indeed using the Sun provided system libraries, I believe this "note" applies to us. The solution is to compile with the "-fpcc-struct-return" flag in order to get gcc to use a compatible format. This tells me that on our SunOS 4.1.3 system (which uses the basic K&R C compiler), every application we compile needs to include this flag. Also, what about Solaris? It doesn't come with a native C compiler, but it does come with standard libraries. Do we need to follow the same precaution? Is this problem as serious as it looks, or am I missing something? If my analysis above is correct, is there anyway to make this invisible to the developer using the compiler? Thanks, Chip Bennett
Technical Details
Message-ID:
<30E07104@SMTPGATE2.STRATCOM.AF.MIL>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,ce1cac8caefdc68d,start X-Google-Attributes: gid113d02,public From: BennettC@j64.stratcom.af.mil (Bennett, Chip (KTR) ~U) Subject: Questions about using gcc Date: 1995/12/26 Message-ID: <30E07104@SMTPGATE2.STRATCOM.AF.MIL> X-Deja-AN: 122884942 distribution: gnu sender: daemon@cis.ohio-state.edu organization: GNUs Not Usenet newsgroups: gnu.gcc.bug