* Compressing archives...
@ 1996-01-04 5:00 Scott Tringali
1996-01-05 5:00 ` Scott Tringali
0 siblings, 1 reply; 2+ messages in thread
From: Scott Tringali @ 1996-01-04 5:00 UTC (permalink / raw)
We've noticed a 22:1 increase in debug vs. non-debug builds for some of our
large software systems here. This of course seriously impacts our disk space.
I have been looking into a method of somehow compressing our object files
and/or libraries, which seem to take up most of our disk space.
Unfortunately, I have to deal with our "home grown" build tool, which makes
things a little tougher.
After reading through the cc man pages, I thought I found exactly what I was
looking for: the -compress option. Sure enough, the .o files (especially with
symbol information) are MUCH smaller, but it doesn't seem to be compatible
with the ar archiver our build tool uses to maintain libraries. For example:
cc -c -compress <bunch of .c files> ar qcu test.a <all .o files> ar: Error:
malformed archive (at 2611)
I have, however, found a happy medium. I found an ar option that will
compress the resulting .a file -- the Z option. This works fine, however, all
my .a files are compressed, while .o files are still huge. Before I complain
too much, this has already helped a lot (it cuts the debug libraries' size in
half, and when some are > 10 megs, that is great) but I'd like to get the .o
files as well. Any ideas, anyone? Thanks in advance.
--
Scott J. Tringali, tringali@ultranet.com
Raytheon Electronic Systems, International Air Traffic Control
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Compressing archives...
1996-01-04 5:00 Compressing archives Scott Tringali
@ 1996-01-05 5:00 ` Scott Tringali
0 siblings, 0 replies; 2+ messages in thread
From: Scott Tringali @ 1996-01-05 5:00 UTC (permalink / raw)
I received a solution via mail, for all those interested, here it is:
> This being the case, the user will
> want to grab this patch kit from the CSC: # OSF350-049. This fixes
> several problems in ar related to compressed objects as well as similar
> bugs in nm, odump and libmld.a.
>
> With respect to the problem in general, there's two approaches (assuming
> they have the fixed ar):
>
> 1) the user can compile all the .o's with -compress and just ar them into
> an archive. (ie: cc -c -compress *.c ; ar cr mylib.a *.o)
>
> 2) the user can compile all the .o's normally and use the 'Z' option to
> ar to compress them on the fly as they are added to the archive. (ie:
> cc -c *.c ; ar crZ mylib.a *.o)
>
> Lastly, if the user doesn't want to take the patch kit, they can also use
> objZ directly on the .o's after using the old ar. (ie: cc -c *.c ;
> ar crZ mylib.a *.o ; objZ *.o)
>
> Hope this helps. I don't travel the news groups regularly, so please feel
> free to post this yourself.
--
Scott J. Tringali, tringali@ultranet.com
Raytheon Electronic Systems, International Air Traffic Control
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-01-05 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-01-04 5:00 Compressing archives Scott Tringali
1996-01-05 5:00 ` Scott Tringali
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox