Article View: gnu.misc.discuss
Article #2199Re: Splitting GCC into smaller parts (not a bug, but a suggestion)
From: Simon Leinen
Date: Thu, 03 Jun 1993 15:40
Date: Thu, 03 Jun 1993 15:40
38 lines
2600 bytes
2600 bytes
In article <1ukt40INNt8o@senator-bedfellow.MIT.EDU> jfc@athena.mit.edu writes: > One option to reduce the total size of gcc binaries is to make the > back end into a shared library. Last time I heard, rms was opposed > to doing this, but there's nothing stopping someone from doing it > independently. That would save between .5 MB and 1 MB per compiler > after the first. I tried this with GCC 2.3.3 on SunOS 5.1 (SVR4), and the space savings are indeed quite impressive (actually a bit more than a megabyte par compiler on the SPARC): liasun6% cd /logiciels/distribution/public/gnu/sun4-5.1/lib/gcc-lib/sparc-sun-solaris2.1/2.3.3 liasun6% /usr/ccs/bin/size cc1* libbackend.so cc1: 178928 + 4400 + 1352 = 184680 cc1obj: 225448 + 4760 + 1904 = 232112 cc1plus: 541552 + 5944 + 8508 = 556004 libbackend.so: 1222694 + 48752 + 43956 = 1315402 liasun6% cd ../2.4.1 liasun6% !/ /usr/ccs/bin/size cc1* libbackend.so cc1: 1299848 + 12468 + 62812 = 1375128 cc1obj: 1368392 + 12740 + 63356 = 1444488 cc1plus: 1650792 + 12540 + 69112 = 1732444 size: libbackend.so: cannot open It is a bit hairy to automate the installation, because the ways how shared libraries are created and used vary so wildly between systems. Autoconf should be extended to handle shared libraries (this would also be very useful for libraries like readline or bfd!). Anyway, for SVR4 shared libraries it is quite trivial to hack the configure-generated Makefile to put all the $(OBJS) files into a shared library, and use this library when linking the cc1* programs, rather than the $(OBJS). -- Simon.
Technical Details
Message-ID:
<SIMON.93Jun3154004@liasg3.epfl.ch>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!wupost!decwrl!decwrl!olivea!grapevine.lcs.mit.edu!ai-lab!prep.ai.mit.edu!gnulistsReferences:
<1ukpqk$abf@disuns2.epfl.ch> <1ukt40INNt8o@senator-bedfellow.MIT.EDU>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,81eb5e5fe02065a3,start X-Google-Attributes: gid113d02,public X-Google-Thread: 1025b4,d920b941201b6bcd X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1993-06-03 10:59:55 PST To: gnu-gcc-bug@cis.ohio-state.edu From: simon@lia.di.epfl.ch (Simon Leinen) Newsgroups: gnu.misc.discuss,gnu.gcc.bug Subject: Re: Splitting GCC into smaller parts (not a bug, but a suggestion) Date: 3 Jun 93 15:40:04 Organization: Ecole Polytechnique Federale de Lausanne Message-ID: <SIMON.93Jun3154004@liasg3.epfl.ch> References: <1ukpqk$abf@disuns2.epfl.ch> <1ukt40INNt8o@senator-bedfellow.MIT.EDU> In-Reply-To: jfc@athena.mit.edu's message of 3 Jun 1993 13:08:16 GMT Distribution: world Approved: info-gnu@prep.ai.mit.edu Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!wupost!decwrl!decwrl!olivea!grapevine.lcs.mit.edu!ai-lab!prep.ai.mit.edu!gnulists Followup-To: gnu.misc.discuss,gnu.gcc.bug Lines: 39