From owner-freebsd-questions Sun Jun 23 17:59:19 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA08222 for questions-outgoing; Sun, 23 Jun 1996 17:59:19 -0700 (PDT) Received: from cicerone.uunet.ca (root@cicerone.uunet.ca [142.77.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA08217 for ; Sun, 23 Jun 1996 17:59:16 -0700 (PDT) Received: from why.whine.com ([205.150.249.1]) by mail.uunet.ca with ESMTP id <115263-918>; Sun, 23 Jun 1996 20:59:07 -0400 Received: from why (andrew@why [205.150.249.1]) by why.whine.com (8.7.5/8.6.12) with SMTP id UAA09723; Sun, 23 Jun 1996 20:59:01 -0400 (EDT) Date: Sun, 23 Jun 1996 20:59:01 -0400 From: Andrew Herdman X-Sender: andrew@why To: Chuck Robey 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, Chuck Robey wrote: > 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). Yes I know the binaries will be huge, even without libc they are huge (thanks to motif) I've tried -static with no luck, my associates who have gotten the binaries I have created have reported that they complained about the missing libc.so.3.0, but they didn't complain about any missing motif libraries. Andrew