From owner-freebsd-questions Sun Jun 23 17:56:35 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA08122 for questions-outgoing; Sun, 23 Jun 1996 17:56:35 -0700 (PDT) Received: from jolt.eng.umd.edu (jolt.eng.umd.edu [129.2.102.5]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA08117 for ; Sun, 23 Jun 1996 17:56:33 -0700 (PDT) Received: from ginger.eng.umd.edu (ginger.eng.umd.edu [129.2.98.204]) by jolt.eng.umd.edu (8.7.5/8.7.3) with ESMTP id UAA12626; Sun, 23 Jun 1996 20:56:30 -0400 (EDT) Received: (from chuckr@localhost) by ginger.eng.umd.edu (8.7.5/8.7.3) id UAA11104; Sun, 23 Jun 1996 20:56:30 -0400 (EDT) Date: Sun, 23 Jun 1996 20:56:29 -0400 (EDT) From: Chuck Robey X-Sender: chuckr@ginger.eng.umd.edu To: Andrew Herdman cc: questions@freebsd.org Subject: Re: Creating a true static binary In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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! ----------------------------+-----------------------------------------------