From owner-freebsd-questions Tue Aug 21 1:32:20 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailb.telia.com (mailb.telia.com [194.22.194.6]) by hub.freebsd.org (Postfix) with ESMTP id 6A01E37B413 for ; Tue, 21 Aug 2001 01:32:15 -0700 (PDT) (envelope-from ertr1013@student.uu.se) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailb.telia.com (8.9.3/8.9.3) with ESMTP id KAA01914 for ; Tue, 21 Aug 2001 10:32:13 +0200 (CEST) Received: from ertr1013.student.uu.se (h185n2fls20o913.telia.com [212.181.163.185]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id KAA21888 for ; Tue, 21 Aug 2001 10:32:11 +0200 (CEST) Received: (qmail 55847 invoked by uid 1001); 21 Aug 2001 08:32:02 -0000 Date: Tue, 21 Aug 2001 10:32:02 +0200 From: Erik Trulsson To: "Groot, Ruben de" Cc: "'freebsd-questions@freebsd.org'" Subject: Re: making statically linked binaries Message-ID: <20010821103202.A55819@student.uu.se> Mail-Followup-To: "Groot, Ruben de" , "'freebsd-questions@freebsd.org'" References: <117300A106D0D411BAD200805F6516AA04550F@dto0nt10.dto.tudelft.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <117300A106D0D411BAD200805F6516AA04550F@dto0nt10.dto.tudelft.nl> User-Agent: Mutt/1.3.20i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Aug 21, 2001 at 10:23:39AM +0200, Groot, Ruben de wrote: > Hi, > > I am building a cvs server on FreeBSD-Stable and would like to run cvs from > a jail. Since this involves either creating another tree of libraries etc > within the jail or recompiling the binaries to be statically linked I > searched Google and the mailing archives for examples, without much succes. > Now, I have two questions: > > 1) How do I determine what shared libraries a binary depends upon. Is there > a command for this? ldd /path/to/binary > > 2) Can someone point me to some examples on how to compile statically linked > binaries? > Add '-static' to the linker flags. Ex. 'gcc -static -o binary objfile1.o objfile2.o' > Thanks in advance > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message