Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jun 1996 20:56:29 -0400 (EDT)
From:      Chuck Robey <chuckr@Glue.umd.edu>
To:        Andrew Herdman <andrew@why.whine.com>
Cc:        questions@freebsd.org
Subject:   Re: Creating a true static binary
Message-ID:  <Pine.OSF.3.91.960623205421.10774A-100000@ginger.eng.umd.edu>
In-Reply-To: <Pine.BSF.3.91.960623201825.6315A-100000@why>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 23 Jun 1996, Andrew Herdman wrote:

> I've noticed that whenever I create a static binary for people, that libc 
> is never included (perhaps others as well?) in the binary.  This started 
> becomming a problem when I moved up to 2.2-960501-SNAP where libc changed 
> from 2.2 to 3.0.  Is there a way to have the binary include everything it 
> needs into itself so that no libraries are necessary?

Realize that doing what you ask is going to create huge binaries, but I 
guess that's your lookout ... just link your program with the -static 
option (check the gcc man page).

> 
> Andrew
> 
> 

----------------------------+-----------------------------------------------
Chuck Robey                 | Interests include any kind of voice or data 
chuckr@eng.umd.edu          | communications topic, C programming, and Unix.
9120 Edmonston Ct #302      |
Greenbelt, MD 20770         | I run Journey2 and n3lxx, both FreeBSD
(301) 220-2114              | version 2.2 current -- and great FUN!
----------------------------+-----------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.960623205421.10774A-100000>