www.digitalmars.com         C & C++   DMDScript  

D.gnu - GDC binary size, on Mac OS X

reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Anyone know why GDC is such a big program on Mac OS X ?

  15M    /opt/gdc/lib/gcc-lib/powerpc-apple-darwin7.8.0/3.3.5/cc1d

At least compared to the corresponding program for Linux:

3.2M    /opt/gdc/libexec/gcc/i386-redhat-linux/3.4.3/cc1d


I know that libstdc++ and libgcc are statically linked,
but that can hardly make up for the enormous difference ?

 /opt/gdc/lib/gcc-lib/powerpc-apple-darwin7.8.0/3.3.5/cc1d:
         /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current
version 5.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 71.1.1)

 132K    /usr/lib/gcc/darwin/3.3/libgcc.a
 1.4M    /usr/lib/gcc/darwin/3.3/libstdc++.a

vs.
 # ldd /opt/gdc/libexec/gcc/i386-redhat-linux/3.4.3/cc1d
         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00a06000)
         libm.so.6 => /lib/tls/libm.so.6 (0x00111000)
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x006f6000)
         libc.so.6 => /lib/tls/libc.so.6 (0x00176000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00160000)

Otherwise, sizes are comparable (bin/gdc and lib/libphobos.a) --anders PS. After zipping, it's not *that* bad:
 gdc/lib/gcc-lib/powerpc-apple-darwin7.8.0/3.3.5/cc1d (deflated 71%)
 4.3M    gdc-darwin.zip
 gdc/libexec/gcc/i386-redhat-linux/3.4.3/cc1d (deflated 56%)
 1.5M    gdc-linux.zip

Mar 03 2005
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
I myself wrote:

 Anyone know why GDC is such a big program on Mac OS X ?
 At least compared to the corresponding program for Linux:

Never mind, found out why after doing a "strip" command: 15M /opt/gdc/lib/gcc-lib/powerpc-apple-darwin7.8.0/3.3.5/cc1d 3.1M /tmp/cc1d 3.2M /opt/gdc/libexec/gcc/i386-redhat-linux/3.4.3/cc1d 3.2M /tmp/cc1d It seems that Fedora Core strips binaries and compresses man pages by default, when doing install, and Mac OS X doesn't... I'll just add a little %install step to strip gdc/cc1d, and probably also gzip -9 the man pages for good measure. --anders
Mar 03 2005