From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,ff0122fac27fef70 X-Google-Attributes: gid111c93,public From: David Addison Subject: Re: Compiling against a static libots using Compaq ccc Date: 2000/07/07 Message-ID: <8k4c3p$b6f$1@soap.pipex.net>#1/1 X-Deja-AN: 643412929 References: <8k20c7$rtg$1@soap.pipex.net> <3964ED2F.11E55C62@kc.rr.com> X-Complaints-To: abuse@uk.uu.net X-Trace: soap.pipex.net 962966457 11471 194.202.174.90 (7 Jul 2000 10:40:57 GMT) Organization: Addy @ Home User-Agent: Pan/0.8.1beta1 (Unix) NNTP-Posting-Date: 7 Jul 2000 10:40:57 GMT Newsgroups: comp.os.linux.alpha In article <3964ED2F.11E55C62@kc.rr.com>, Tony Hammitt wrote: > How big of an executable can you stand? =-] > > ccc supports the "-static" flag, just like gcc, but it's just as literal > as gcc. You can't choose what you want to be statically linked, you get > everything including libc stuff. I tried it on a 60 line program and it > linked to 2.1MB... stripped to 380K > > This, too is a bit ugly. > Yes, I guess its the same with gcc and libc. Simply putting /usr/lib/libc.a on the command line has no effect. The difference is that everyone has libc already installed! The Compaq ccc compiler uses the standard ld as follows; /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/ld -o blob -O1 -melf64alpha -G 8 -L/usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/lib -L/usr/local/lib -L/usr/alpha-redhat-linux/lib -L/usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.91.66 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crt1.o /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crti.o /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crtbegin.o blob.o -lgcc -lc -lgcc -lots /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crtend.o /usr/lib/compaq/ccc-6.2.9.002-2/alpha-linux/bin/crtn.o And its the -lots that gets us, even with /usr/lib/libots.a included in this command, it still links dynamically. Removing -lots from this link command seems to be the only fix. Oh well, perhaps using gcc to link is not that bad after all ! Thanks for you help, Addy.