Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: David Addison <addy@TINOFSPAMaddy.freeserve.co.uk>
Subject: Re: Compiling against a static libots using Compaq ccc
Date: 2000/07/07	[thread overview]
Message-ID: <8k4c3p$b6f$1@soap.pipex.net> (raw)
In-Reply-To: 3964ED2F.11E55C62@kc.rr.com

In article <3964ED2F.11E55C62@kc.rr.com>, Tony Hammitt
<thammitt@kc.rr.com> 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.



      reply	other threads:[~2000-07-07  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-06  4:00 Compiling against a static libots using Compaq ccc David Addison
2000-07-06  4:00 ` Tony Hammitt
2000-07-07  4:00   ` David Addison [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox